GeezerVison is showing github.com — Inject meta tags in Tracing-without-Performance-mode · Issue #8520 · getsentry/sentry-javascript
Inject meta tags in Tracing-without-Performance-mode #8520DescriptionExtracted from #8352 as standalone task. Make sure tracing without performance works for injecting meta tags.
We should gate this with a new boolean option.
### Tasks
- [x] https://github.com/getsentry/sentry-javascript/pull/13134
- [ ] https://github.com/getsentry/sentry-javascript/pull/13201
- [ ] https://github.com/getsentry/sentry-javascript/issues/13106
- [ ] https://github.com/getsentry/sentry-javascript/issues/13303
- [x] [Nuxt] Inject meta tags in Tracing-without-Performance-mode
- [x] [SolidStart] Inject meta tags in Tracing-without-Perfomance-mode
- [x] [Remix] Inject meta tags in Tracing-without-Performance-mode
Activitylforst commented on Nov 9, 2023 @AbhiPrasad What exactly needs to be done here? I would like to do this for Next.js but don't fully understand the task. AbhiPrasad commented on Nov 9, 2023 ContributorAuthor More actions Right now we only inject meta tags if there is a sampled transaction/span. It would be great if we can remove this condition and inject meta tags based on the propagation context.
Same conditional logic like we have for undici:
|
if (span) { |
|
const dynamicSamplingContext = span?.transaction?.getDynamicSamplingContext(); |
|
const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext); |
|
|
|
setHeadersOnRequest(request, span.toTraceparent(), sentryBaggageHeader); |
|
} else { |
|
const { traceId, sampled, dsc } = scope.getPropagationContext(); |
|
const sentryTrace = generateSentryTraceHeader(traceId, undefined, sampled); |
|
const dynamicSamplingContext = dsc || getDynamicSamplingContextFromClient(traceId, client, scope); |
|
const sentryBaggageHeader = dynamicSamplingContextToSentryBaggageHeader(dynamicSamplingContext); |
|
setHeadersOnRequest(request, sentryTrace, sentryBaggageHeader); |
lforst commented on Nov 9, 2023 lforst commented on Nov 14, 2023 @AbhiPrasad I wonder if this will screw with the trace view in replays a lot. This would essentially cause browser sessions of multiple different users to be grouped together under one server process 🤔 Maybe this is not what we want at all... changed the title [-]Use propagation context when injecting meta tags[/-] [+]Inject meta tags in Tracing-without-Performance-mode [/+] on Jul 30, 2024s1gr1d commented on Dec 11, 2024 Closing this because it has been implemented
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|