Add requestId to the $feature_flag_called event.#66
Merged
Conversation
These are the only properties we're concerned about now.
Contributor
There was a problem hiding this comment.
PR Summary
This PR adds support for request IDs in PostHog's /decide endpoint responses, enabling better tracking and debugging of feature flag evaluations.
- Added new
FlagsResultrecord to encapsulate feature flags with request IDs and quota information - Modified
IFeatureFlagCacheto support caching fullFlagsResultwhile maintaining backward compatibility - Updated
HttpContextFeatureFlagCacheto store and retrieveFlagsResultobjects instead of just feature flag dictionaries - Added request ID propagation to
$feature_flag_calledevents for better tracing - Removed unused properties from
DecideApiResult(Config, IsAuthenticated, Analytics) to focus on core functionality
6 file(s) reviewed, 3 comment(s)
Edit PR Review Bot Settings | Greptile
ad8e669 to
0ec9187
Compare
This includes `$feature_flag_request_id` as a property of the captured event `$feature_flag_called`. See PostHog/posthog-js#1793 for an example in another client-sdk. Fixes #63
0ec9187 to
2800c41
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes #63