Skip to content
This repository was archived by the owner on Nov 17, 2025. It is now read-only.

Commit 0a3bee4

Browse files
authored
chore: remove suppress instrumentation (#65)
1 parent 26ae4c4 commit 0a3bee4

File tree

2 files changed

+0
-118
lines changed

2 files changed

+0
-118
lines changed

src/trace/context-utils.ts

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,6 @@ import { NonRecordingSpan } from './NonRecordingSpan';
2525
*/
2626
const SPAN_KEY = createContextKey('OpenTelemetry Context Key SPAN');
2727

28-
/**
29-
* Shared key for indicating if instrumentation should be suppressed beyond
30-
* this current scope.
31-
*/
32-
const SUPPRESS_INSTRUMENTATION_KEY = createContextKey(
33-
'OpenTelemetry Context Key SUPPRESS_INSTRUMENTATION'
34-
);
35-
3628
/**
3729
* Return the span if one exists
3830
*
@@ -74,33 +66,3 @@ export function setSpanContext(
7466
export function getSpanContext(context: Context): SpanContext | undefined {
7567
return getSpan(context)?.spanContext();
7668
}
77-
78-
/**
79-
* Sets value on context to indicate that instrumentation should
80-
* be suppressed beyond this current scope.
81-
*
82-
* @param context context to set the suppress instrumentation value on.
83-
*/
84-
export function suppressInstrumentation(context: Context): Context {
85-
return context.setValue(SUPPRESS_INSTRUMENTATION_KEY, true);
86-
}
87-
88-
/**
89-
* Sets value on context to indicate that instrumentation should
90-
* no-longer be suppressed beyond this current scope.
91-
*
92-
* @param context context to set the suppress instrumentation value on.
93-
*/
94-
export function unsuppressInstrumentation(context: Context): Context {
95-
return context.setValue(SUPPRESS_INSTRUMENTATION_KEY, false);
96-
}
97-
98-
/**
99-
* Return current suppress instrumentation value for the given context,
100-
* if it exists.
101-
*
102-
* @param context context check for the suppress instrumentation value.
103-
*/
104-
export function isInstrumentationSuppressed(context: Context): boolean {
105-
return Boolean(context.getValue(SUPPRESS_INSTRUMENTATION_KEY));
106-
}

test/trace/context-utils.test.ts

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)