feat(webvitals): Add profile id, replay id, and user to standalone INP spans#10849
Conversation
size-limit report 📦
|
| 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.
We're putting profile_id as a top level field because relay expects this
| parentContext, | ||
| user, | ||
| activeTransaction, | ||
| replay, |
There was a problem hiding this comment.
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.
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.
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().