Skip to content

Commit 8f104ba

Browse files
mydeaandreiborza
authored andcommitted
fix
1 parent d4fba89 commit 8f104ba

File tree

1 file changed

+3
-2
lines changed
  • packages/cloudflare/src/opentelemetry

1 file changed

+3
-2
lines changed

packages/cloudflare/src/opentelemetry/tracer.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { Context, Span, SpanOptions, Tracer, TracerProvider } from '@opentelemetry/api';
22
import { trace } from '@opentelemetry/api';
3-
import { startInactiveSpan, startSpan } from '@sentry/core';
3+
import { startInactiveSpan, startSpanManual } from '@sentry/core';
44

55
/**
66
* Set up a mock OTEL tracer to allow inter-op with OpenTelemetry emitted spans.
@@ -64,6 +64,7 @@ class SentryCloudflareTracer implements Tracer {
6464
() => {}
6565
) as F;
6666

67-
return startSpan(spanOpts, callback) as ReturnType<F>;
67+
// In OTEL the semantic matches `startSpanManual` because spans are not auto-ended
68+
return startSpanManual(spanOpts, callback) as ReturnType<F>;
6869
}
6970
}

0 commit comments

Comments
 (0)