-
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
✨ [RUMF-909] add beforeSend context #883
Conversation
packages/rum-core/src/domain/rumEventsCollection/resource/resourceCollection.ts
Outdated
Show resolved
Hide resolved
packages/rum-core/src/domain/rumEventsCollection/resource/resourceCollection.ts
Outdated
Show resolved
Hide resolved
dc46438
to
3a5e9f1
Compare
3a5e9f1
to
ca9e9d3
Compare
packages/rum-core/src/domain/rumEventsCollection/longTask/longTaskCollection.ts
Outdated
Show resolved
Hide resolved
packages/rum-core/src/domain/rumEventsCollection/resource/resourceCollection.ts
Outdated
Show resolved
Hide resolved
packages/rum-core/src/domain/rumEventsCollection/view/trackViews.ts
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## main #883 +/- ##
==========================================
+ Coverage 89.09% 89.13% +0.04%
==========================================
Files 81 81
Lines 3787 3793 +6
Branches 845 848 +3
==========================================
+ Hits 3374 3381 +7
+ Misses 413 412 -1
Continue to review full report at Codecov.
|
Also, never expose PerformanceEntry objects directly for consistency.
d9afc38
to
d3e2519
Compare
packages/rum-core/src/domain/rumEventsCollection/error/errorCollection.spec.ts
Show resolved
Hide resolved
packages/rum-core/src/domain/rumEventsCollection/view/trackViews.ts
Outdated
Show resolved
Hide resolved
Also, prefix fetch-related fields with 'fetch'
2a3e6ea
to
5be2e79
Compare
packages/rum-core/src/domain/rumEventsCollection/longTask/longTaskCollection.ts
Outdated
Show resolved
Hide resolved
This is a middle ground between having a single type to make type inference on an internal type (RawRumEvent), and having a structures union making the overall type less strict. This avoids exposing internal types, and let the user cast the domain to particular, explicit interfaces. Also, export those types publicly.
Implement `toJSON` for RumPerformanceLongTaskTiming, so it can be used even during tests.
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 work 🎉
Motivation
Now that
beforeSend
can edit the event context, it would be useful to have access on a bit of information about the browser data that have been used to generate the event.Changes
For each kind of RUM event, expose a domain-related 'context' as a second argument of
beforeSend
.Testing
Manual, unit
I have gone over the contributing documentation.