Class CoreRuntimeAttach
java.lang.Object
io.opentelemetry.contrib.attach.core.CoreRuntimeAttach
This class allows you to attach the OpenTelemetry Java agent at runtime.
-
Constructor Summary
ConstructorsConstructorDescriptionCoreRuntimeAttach(String agentJarResourceName) Creates a newDistroRuntimeAttachfrom the resource name of the agent jar. -
Method Summary
Modifier and TypeMethodDescriptionvoidAttach the OpenTelemetry Java agent to the current JVM.
-
Constructor Details
-
CoreRuntimeAttach
Creates a newDistroRuntimeAttachfrom the resource name of the agent jar.- Parameters:
agentJarResourceName- Resource name of the agent jar.
-
-
Method Details
-
attachJavaagentToCurrentJvm
public void attachJavaagentToCurrentJvm()Attach the OpenTelemetry Java agent to the current JVM. The attachment must be requested at the beginning of the main method.
-