chore(flags): Decide v4 support - adds version, id, reason, and requestId to $feature_flag_called
events
#71
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is follow on work for PostHog/posthog#29693. The work here is similar to PostHog/posthog-python#207 and PostHog/posthog-go#91.
Updates to the
$feature_flag_called
eventWhen capturing the
$feature_flag_called
event, additional information are now captured:The end result is
$feature_flag_called
events will have additional properties:$feature_flag_version
$feature_flag_reason
$feature_flag_id
Backwards compatibility:
The changes are all backwards compatible with
/decide?v=3
.Testing
Unit tests and some manual testing