diff --git a/packages/browser/src/tracing/linkedTraces.ts b/packages/browser/src/tracing/linkedTraces.ts index 741212cf2065..e60f3fd59ff1 100644 --- a/packages/browser/src/tracing/linkedTraces.ts +++ b/packages/browser/src/tracing/linkedTraces.ts @@ -191,8 +191,8 @@ export function addPreviousTraceSpanLink( }, }); - // TODO(v12): Remove this once the Sentry trace view finds linked traces via span links. EAP stores - // span links, but the trace view still reads this attribute to navigate to the previous/next trace. + // TODO(v12): Remove once EAP can filter span links by type. The Sentry trace view searches this attribute to find the NEXT trace. + // Sentry 26.9 and older also read it to find the PREVIOUS trace. Newer versions read the span link. span.setAttribute( PREVIOUS_TRACE_TMP_SPAN_ATTRIBUTE, `${previousTraceSpanCtx.traceId}-${previousTraceSpanCtx.spanId}-${ diff --git a/packages/cloudflare/src/wrapMethodWithSentry.ts b/packages/cloudflare/src/wrapMethodWithSentry.ts index c6ff06393d6a..fe1927833e7e 100644 --- a/packages/cloudflare/src/wrapMethodWithSentry.ts +++ b/packages/cloudflare/src/wrapMethodWithSentry.ts @@ -217,9 +217,9 @@ export function wrapMethodWithSentry( if (storedContext) { span.addLinks(buildSpanLinks(storedContext)); - // TODO(v12): Remove this once the Sentry trace view finds linked traces via span links. - // EAP stores span links, but the trace view still reads this attribute to navigate to the - // previous/next trace. + + // TODO(v12): Remove once EAP can filter span links by type. The Sentry trace view searches this attribute to find the NEXT trace. + // Sentry 26.9 and older also read it to find the PREVIOUS trace. Newer versions read the span link. const sampledFlag = storedContext.sampled ? '1' : '0'; span.setAttribute( 'sentry.previous_trace',