@@ -25,14 +25,6 @@ import { NonRecordingSpan } from './NonRecordingSpan';
2525 */
2626const 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(
7466export 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- }
0 commit comments