getsentry / sentry-javascript

Official Sentry SDKs for JavaScript
https://sentry.io
MIT License
7.85k stars 1.55k forks source link

Inject meta tags in Tracing-without-Performance-mode #8520

Open AbhiPrasad opened 1 year ago

AbhiPrasad commented 1 year ago

Extracted from https://github.com/getsentry/sentry-javascript/issues/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
- [ ] [Remix] Inject meta tags in Tracing-without-Performance-mode
- [ ] [Nuxt] Inject meta tags in Tracing-without-Performance-mode
- [ ] [SolidStart] Inject meta tags in Tracing-without-Perfomance-mode
lforst commented 10 months ago

@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 10 months ago

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: https://github.com/getsentry/sentry-javascript/blob/530f786219864cd5d58a0dafa507333a28d21720/packages/node/src/integrations/undici/index.ts#L175-L185

lforst commented 10 months ago

Got it. Thanks!

lforst commented 9 months ago

@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...