Class OpenTelemetrySdkAccess
java.lang.Object
io.opentelemetry.javaagent.bootstrap.OpenTelemetrySdkAccess
A helper to facilitate accessing OpenTelemetry SDK methods from instrumentation. Because
instrumentation runs in the app class loader, they do not have access to our SDK in the agent
class loader. So we use this class in the bootstrap class loader to bridge between the two - the
agent class loader will register implementations of needed SDK functions that can be called from
instrumentation.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interface
Interface matchingio.opentelemetry.sdk.trace.SdkTracerProvider#forceFlush()
to allow holding a reference to it. -
Method Summary
Modifier and TypeMethodDescriptionstatic void
forceFlush
(int timeout, TimeUnit unit) Forces flushing of pending spans.static void
Sets theRunnable
to execute when instrumentation needs to force flush.
-
Method Details
-
forceFlush
Forces flushing of pending spans. -
internalSetForceFlush
Sets theRunnable
to execute when instrumentation needs to force flush. This is called from the agent class loader to execute the SDK's force flush mechanism. Instrumentation must not call this.
-