From 47728a4a5fbba4dbff71e77bc4f95e15da382ab6 Mon Sep 17 00:00:00 2001 From: s1gr1d <32902192+s1gr1d@users.noreply.github.com> Date: Wed, 7 Oct 2026 15:20:28 +0200 Subject: [PATCH] chore: Update comments related to span links with latest info --- packages/browser/src/tracing/linkedTraces.ts | 4 ++-- packages/cloudflare/src/wrapMethodWithSentry.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) 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',