|
1 | 1 | import type { Context, Span, SpanContext, SpanOptions, Tracer } from '@opentelemetry/api';
|
2 | 2 | import { SpanStatusCode, TraceFlags, context, trace } from '@opentelemetry/api';
|
3 | 3 | import { suppressTracing } from '@opentelemetry/core';
|
4 |
| -import type { Client, DynamicSamplingContext, Scope, Span as SentrySpan, TraceContext } from '@sentry/core'; |
| 4 | +import type { |
| 5 | + Client, |
| 6 | + DynamicSamplingContext, |
| 7 | + Scope, |
| 8 | + Span as SentrySpan, |
| 9 | + TraceContext, |
| 10 | + continueTrace as baseContinueTrace, |
| 11 | +} from '@sentry/core'; |
5 | 12 | import {
|
6 | 13 | SDK_VERSION,
|
7 | 14 | SEMANTIC_ATTRIBUTE_SENTRY_OP,
|
8 |
| - continueTrace as baseContinueTrace, |
9 | 15 | getClient,
|
10 | 16 | getCurrentScope,
|
11 | 17 | getDynamicSamplingContextFromScope,
|
@@ -247,9 +253,7 @@ function getContextForScope(scope?: Scope): Context {
|
247 | 253 | * It propagates the trace as a remote span, in addition to setting it on the propagation context.
|
248 | 254 | */
|
249 | 255 | export function continueTrace<T>(options: Parameters<typeof baseContinueTrace>[0], callback: () => T): T {
|
250 |
| - return baseContinueTrace(options, () => { |
251 |
| - return continueTraceAsRemoteSpan(context.active(), options, callback); |
252 |
| - }); |
| 256 | + return continueTraceAsRemoteSpan(context.active(), options, callback); |
253 | 257 | }
|
254 | 258 |
|
255 | 259 | /**
|
|
0 commit comments