Class CoreRuntimeAttach

java.lang.Object
io.opentelemetry.contrib.attach.core.CoreRuntimeAttach

public final class CoreRuntimeAttach extends Object
This class allows you to attach the OpenTelemetry Java agent at runtime.
  • Constructor Details

    • CoreRuntimeAttach

      public CoreRuntimeAttach(String agentJarResourceName)
      Creates a new DistroRuntimeAttach from 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.