-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
feat(webvitals): Add profile id, replay id, and user to standalone INP spans #10849
feat(webvitals): Add profile id, replay id, and user to standalone INP spans #10849
Conversation
size-limit report 📦
|
@@ -632,6 +633,7 @@ export class Span implements SpanInterface { | |||
origin: this._attributes[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN] as SpanOrigin | undefined, | |||
_metrics_summary: getMetricSummaryJsonForSpan(this), | |||
measurements: this._attributes[SEMANTIC_ATTRIBUTE_MEASUREMENTS] as Measurements | undefined, | |||
profile_id: this._attributes[SEMANTIC_ATTRIBUTE_PROFILE_ID] as string | undefined, |
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.
We're putting profile_id
as a top level field because relay expects this
@@ -564,6 +574,9 @@ function registerInpInteractionListener( | |||
routeName, | |||
duration, | |||
parentContext, | |||
user, | |||
activeTransaction, | |||
replay, |
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.
IMO we should pass in the id's here instead of holding references to replay integration/active transaction
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.
I should be able to update this for replay ID.
For profiles, the profiling integration only attaches the profile id to the active transaction when the transaction finishes. So we don't immediately have access to a profile id when an interaction occurs. Keeping a reference to the transaction seemed like the easiest way to grab the profile id when we're ready to send an INP. Not sure if there is a better solution, but I can think about it if this is a blocker
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.
ahh I see, yeah let's hold the transaction reference then, np
…com:getsentry/sentry-javascript into egou/v7/profile-replay-and-user-for-inp
3336ff3
into
egou/v7/feat/add-sampling-rate-to-inp-spans
Adds profile id, replay id, and user to standalone INP spans.
getReplayId()
.