Skip to content

Conversation

@edwardgou-sentry
Copy link
Contributor

@edwardgou-sentry edwardgou-sentry commented Feb 19, 2024

Creates standalone span when onINP is triggered, and sends the span to sentry. An InteractionRouteNameMapping is maintained to get the origin route name of the candidate INP span. The mapping is capped at 10 entries to minimize memory.

Requires the following PRs
#10702
#10704
#10706

…hub.com:getsentry/sentry-javascript into egou/v7/feat/add-span-envelope-and-datacategory
…ns' of github.com:getsentry/sentry-javascript into egou/v7/feat/add-span-envelope-and-datacategory
startTimestamp: startTime,
endTimestamp: startTime + duration,
op: 'ui.interaction.click',
name: entry.target?.nodeName,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think nodeName is correct. Need to update this to get some identifier for the target interaction element

},
release,
environment,
transaction: routeName,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Passing the origin route name of the interaction as transaction

…:getsentry/sentry-javascript into egou/v7/feat/create-interaction-spans-on-inp
…ns' of github.com:getsentry/sentry-javascript into egou/v7/feat/create-interaction-spans-on-inp
…hub.com:getsentry/sentry-javascript into egou/v7/feat/create-interaction-spans-on-inp
….com:getsentry/sentry-javascript into egou/v7/feat/add-sampling-rate-to-inp-spans
…hub.com:getsentry/sentry-javascript into egou/v7/feat/create-interaction-spans-on-inp
….com:getsentry/sentry-javascript into egou/v7/feat/add-sampling-rate-to-inp-spans
@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2024

size-limit report 📦

Path Size
@sentry/browser (incl. Tracing, Replay, Feedback) - Webpack (gzipped) 78.64 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack (gzipped) 69.86 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing, Replay with Canvas) - Webpack (gzipped) 73.8 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing, Replay) - Webpack with treeshaking flags (gzipped) 63.47 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing) - Webpack (gzipped) 33.83 KB (+0.11% 🔺)
@sentry/browser (incl. browserTracingIntegration) - Webpack (gzipped) 34.87 KB (+3.46% 🔺)
@sentry/browser (incl. Feedback) - Webpack (gzipped) 31.38 KB (0%)
@sentry/browser (incl. sendFeedback) - Webpack (gzipped) 31.39 KB (0%)
@sentry/browser - Webpack (gzipped) 22.67 KB (0%)
@sentry/browser (incl. Tracing, Replay, Feedback) - ES6 CDN Bundle (gzipped) 76.88 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (gzipped) 68.37 KB (+0.05% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (gzipped) 34.16 KB (+0.1% 🔺)
@sentry/browser - ES6 CDN Bundle (gzipped) 25.07 KB (0%)
@sentry/browser (incl. Tracing, Replay) - ES6 CDN Bundle (minified & uncompressed) 215.45 KB (+0.06% 🔺)
@sentry/browser (incl. Tracing) - ES6 CDN Bundle (minified & uncompressed) 103.25 KB (+0.12% 🔺)
@sentry/browser - ES6 CDN Bundle (minified & uncompressed) 75.28 KB (0%)
@sentry/browser (incl. Tracing) - ES5 CDN Bundle (gzipped) 37.33 KB (+0.1% 🔺)
@sentry/react (incl. Tracing, Replay) - Webpack (gzipped) 70.24 KB (+0.07% 🔺)
@sentry/react - Webpack (gzipped) 22.7 KB (0%)
@sentry/nextjs Client (incl. Tracing, Replay) - Webpack (gzipped) 89.09 KB (+1.35% 🔺)
@sentry/nextjs Client - Webpack (gzipped) 53.27 KB (+2.23% 🔺)
@sentry-internal/feedback - Webpack (gzipped) 17.24 KB (0%)

…com:getsentry/sentry-javascript into egou/v7/profile-replay-and-user-for-inp
edwardgou-sentry and others added 11 commits February 29, 2024 15:20
…P spans (#10849)

Adds profile id, replay id, and user to standalone INP spans.

User comes from the current scope.
Replay Id is retrieved from the relay integration module and calling getReplayId().
Profile Id is retrieved from getting the active transaction at the time of the interaction
Since profile id isn't added to the transaction until the transaction ends, we need to hold onto a reference to the transaction instead of trying to grab the profile id right away
…, profile id, and user.

Updates INP spans to check for sampling rate, similar to transactions.
Also Adds profile id, replay id, and user to standalone INP spans.

User comes from the current scope.
Replay Id is retrieved from the relay integration module and calling getReplayId().
Profile Id is retrieved from getting the active transaction at the time of the interaction
Since profile id isn't added to the transaction until the transaction ends, we need to hold onto a reference to the transaction instead of trying to grab the profile id right away
@edwardgou-sentry edwardgou-sentry merged commit 82eaed0 into v7 Feb 29, 2024
@edwardgou-sentry edwardgou-sentry deleted the egou/v7/feat/create-interaction-spans-on-inp branch February 29, 2024 22:00
@mydea
Copy link
Member

mydea commented Mar 1, 2024

small note for the next time, please make sure to squash and merge! (we sadly cannot disallow merge commits for now because we need it for gitflow 😬 )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants