-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
✨ [RUM-6581] Add an init parameter to chose feature flags event collection #3283
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3283 +/- ##
==========================================
+ Coverage 93.67% 93.68% +0.01%
==========================================
Files 288 289 +1
Lines 7600 7618 +18
Branches 1730 1735 +5
==========================================
+ Hits 7119 7137 +18
Misses 481 481 ☔ View full report in Codecov by Sentry. |
Bundles Sizes Evolution
🚀 CPU Performance
🧠 Memory Performance
|
if (trackFeatureFlagsForEvents.includes(eventType)) { | ||
const featureFlagContext = featureFlagContexts.findFeatureFlagEvaluations(eventStartTime) | ||
if (featureFlagContext && !isEmptyObject(featureFlagContext)) { | ||
rawRumEvent.feature_flags = featureFlagContext | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💬 suggestion: refactor your PR by moving this in assembly.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@RomanGaignault, just for context, the assembly is where we set attributes that apply on multiple event types.
For instance:
- If an attribute applies on only on resources =>
resourceCollection.ts
- If an attribute applies on resource, error etc. =>
assembly.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can probably look at what we do here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, I will update that ! Thanks for context 👍
Motivation
For now, feature flags are only included in views and errors. This was chosen to limit the feature flags impact on bandwidth, but now that we implemented compression, we could re-evaluate.
Changes
Instead of enabling feature flag collections on all events at once, we could provide an init parameter to allow customers to chose on which events they want to collect feature flags:
init({
collectFeatureFlagsOn: ['long_task', 'error', 'vital']
})
Testing
I have gone over the contributing documentation.