feat: collect-and-flush-analytics-evaluation-events#377
Open
feat: collect-and-flush-analytics-evaluation-events#377
Conversation
4 tasks
Comment on lines
+79
to
+82
| if (url.includes('v1/analytics/batch')) { | ||
| return {status: 202, text: () => Promise.resolve('')} | ||
| } | ||
| if (url.includes('analytics/flags')) { |
Contributor
There was a problem hiding this comment.
I see that 'v1/analytics/batch' and 'analytics/flags' appear multiple times. Would be better to add it as const ?
Not blocking, just a suggestion
talissoncosta
previously approved these changes
Mar 5, 2026
Contributor
talissoncosta
left a comment
There was a problem hiding this comment.
Great work @Zaimwa9
…feat/send-evaluation-data-to-analytics-pipeline
…feat/send-evaluation-data-to-analytics-pipeline
Zaimwa9
commented
Mar 6, 2026
| expect(valueEvent.event_type).toBe('flag_evaluation'); | ||
| expect(valueEvent.value).toBe(16); | ||
| expect(valueEvent.enabled).toBe(true); | ||
| expect(valueEvent.identity_identifier).toBe(''); |
Contributor
Author
There was a problem hiding this comment.
This is temporary to allow testing without redeploying the rust service. Will be reverted to null once made optional there
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.
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature.Changes
Contributes to 6636
evaluationAnalyticsConfig)Usage
Bonus
Improvements for V2
visibilitychange/beforeunload+navigator.sendBeacon()to flush buffered events before tab close (the size of the payload might be too heavy versus the simple count of previous analytics to be stored in localStorage)PipelineAnalyticsclass: isolate analytics logic (buffer, flush, intervals) from the core to gain in flexibility without sacrificing maintainabilitydestroy()method (cf openFeature): proper teardown to prevent memory leaks in SSR/Next.js (pre-existing gap in all interval-based feature in SDK atm)How did you test this code?