Skip to content

continueTrace doesn't propagate given trace ID (@sentry/cloudflare) #18296

@benvinegar

Description

@benvinegar

Is there an existing issue for this?

How do you use Sentry?

Sentry Saas (sentry.io)

Which SDK are you using?

@sentry/cloudflare

SDK Version

10.26.0

Framework Version

wrangler: ^4.45.2

Link to Sentry event

No response

Reproduction Example/SDK Setup

async function example(sentryContext) {
  // Restore trace context and wrap execution
  console.log('Trace ID before continueTrace', sentryContext.trace);

  return await Sentry.continueTrace(
      {
          sentryTrace: sentryContext.trace,
          baggage: sentryContext.baggage,
      },
      async () => {
          console.log('Trace ID after continueTrace', Sentry.getTraceData()['sentry-trace']);
      }
  );
}

Steps to Reproduce

Use the code above.

Expected Result

Trade ID before/after should be the same.

Actual Result

Trace ID before continueTrace 60069cc1ad20efb49eed40a7f47f1b8f-932954b3a43dbd9f-1
Trace ID after continueTrace 6dfe5f15e9e14d8f9087a315b3cf6fda-8fe9055201ea5a4d-1

Additional Context

This could be a limitation of the Cloudflare Workers environment, but I can't seem to get Sentry.continueTrace to work this way.

The background is I have a worker invocation with a trace already, and I'm trying to override that inside of continueTrace.

Priority

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it.

Metadata

Metadata

Assignees

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions