File tree Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Expand file tree Collapse file tree 2 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 11import type { Scope , TraceContext } from '@sentry/types' ;
22import type { Client } from '@sentry/types' ;
3- import { dropUndefinedKeys , generateSentryTraceHeader , getGlobalSingleton } from '@sentry/utils' ;
3+ import { dropUndefinedKeys , getGlobalSingleton } from '@sentry/utils' ;
44import { getAsyncContextStrategy } from './asyncContext' ;
55import { getMainCarrier } from './carrier' ;
66import { Scope as ScopeClass } from './scope' ;
@@ -122,7 +122,7 @@ export function getClient<C extends Client>(): C | undefined {
122122}
123123
124124/**
125- * Get a trace context for the currently active scopes .
125+ * Get a trace context for the given scope .
126126 */
127127export function getTraceContextFromScope ( scope : Scope ) : TraceContext {
128128 const propagationContext = scope . getPropagationContext ( ) ;
@@ -137,11 +137,3 @@ export function getTraceContextFromScope(scope: Scope): TraceContext {
137137
138138 return traceContext ;
139139}
140-
141- /**
142- * Get a sentry-trace header value for the currently active scopes.
143- */
144- export function scopesToTraceHeader ( scope : Scope ) : string {
145- const { traceId, sampled, spanId } = scope . getPropagationContext ( ) ;
146- return generateSentryTraceHeader ( traceId , spanId , sampled ) ;
147- }
Original file line number Diff line number Diff line change 11import type { Client , Scope , Span } from '@sentry/types' ;
2- import { dynamicSamplingContextToSentryBaggageHeader } from '@sentry/utils' ;
3- import { getCurrentScope , scopesToTraceHeader } from '../currentScopes' ;
2+ import { dynamicSamplingContextToSentryBaggageHeader , generateSentryTraceHeader } from '@sentry/utils' ;
3+ import { getCurrentScope } from '../currentScopes' ;
44import { spanToTraceHeader } from '../utils/spanUtils' ;
55import { getDynamicSamplingContextFromScope , getDynamicSamplingContextFromSpan } from './dynamicSamplingContext' ;
66
@@ -25,3 +25,11 @@ export function getSentryHeaders({
2525 baggage,
2626 } ;
2727}
28+
29+ /**
30+ * Get a sentry-trace header value for the given scope.
31+ */
32+ function scopesToTraceHeader ( scope : Scope ) : string {
33+ const { traceId, sampled, spanId } = scope . getPropagationContext ( ) ;
34+ return generateSentryTraceHeader ( traceId , spanId , sampled ) ;
35+ }
You can’t perform that action at this time.
0 commit comments