Package io.opentelemetry.api.internal
Class InstrumentationUtil
java.lang.Object
io.opentelemetry.api.internal.InstrumentationUtil
This class is internal and is hence not for public use. Its APIs are unstable and can change at
any time.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
shouldSuppressInstrumentation
(Context context) Checks if an automatic instrumentation should be suppressed with the provided Context.static void
suppressInstrumentation
(Runnable runnable) Adds a Context boolean key that will allow to identify HTTP calls coming from OTel exporters.
-
Field Details
-
SUPPRESS_INSTRUMENTATION_KEY
-
-
Constructor Details
-
InstrumentationUtil
private InstrumentationUtil()
-
-
Method Details
-
suppressInstrumentation
Adds a Context boolean key that will allow to identify HTTP calls coming from OTel exporters. The key later be checked by an automatic instrumentation to avoid tracing OTel exporter's calls. -
shouldSuppressInstrumentation
Checks if an automatic instrumentation should be suppressed with the provided Context.- Returns:
- TRUE to suppress the automatic instrumentation, FALSE to continue with the instrumentation.
-