@@ -15,6 +15,8 @@ Table of Contents
15
15
- [ Get current Context] ( #get-current-context )
16
16
- [ Attach Context] ( #attach-context )
17
17
- [ Detach Context] ( #detach-context )
18
+ - [ Predefined Keys] ( #predefined-keys )
19
+ - [ Suppress Instrumentation] ( #suppress-instrumentation )
18
20
19
21
</details >
20
22
@@ -125,3 +127,26 @@ The API MUST accept the following parameters:
125
127
126
128
The API MAY return a value used to check whether the operation
127
129
was successful or not.
130
+
131
+ ## Predefined Keys
132
+
133
+ The following are predefined keys that may modify the behavior of multiple signals.
134
+ For each key, there MUST be corresponding methods to set and get its value.
135
+ The key itself MUST NOT be exposed publicly.
136
+
137
+ ### Suppress Instrumentation
138
+
139
+ In some cases it may be useful to temporarily disable instrumentation.
140
+ For example, this may be used to prevent span exports from being traced and exported,
141
+ or by an instrumentation which wraps a lower-level package which may also be
142
+ instrumented in order to prevent duplicate spans.
143
+
144
+ If this key is set to ` true ` , the following behavior is changed:
145
+
146
+ - Any ` Span ` created by ` StartSpan ` MUST be a non-recording ` Span ` .
147
+ - ` Propagator#Inject ` MUST NOT modify the carrier.
148
+ - ` Propagator#Extract ` MUST return the ` Context ` passed to it as an argument unchanged.
149
+ - ` Metrics ` MUST NOT be recorded.
150
+
151
+ If this key is not set it is assumed to be ` false ` .
152
+ The ` get ` method for this key MAY return ` false ` if the key is unset.
0 commit comments