io.opentelemetry.javaagent.bootstrap.InstrumentationHolder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of opentelemetry-javaagent-bootstrap Show documentation
Show all versions of opentelemetry-javaagent-bootstrap Show documentation
Instrumentation of Java libraries using OpenTelemetry.
The newest version!
/*
* Copyright The OpenTelemetry Authors
* SPDX-License-Identifier: Apache-2.0
*/
package io.opentelemetry.javaagent.bootstrap;
import java.lang.instrument.Instrumentation;
import javax.annotation.Nullable;
/** This class serves as an "everywhere accessible" source of {@link Instrumentation} instance. */
public final class InstrumentationHolder {
@Nullable private static volatile Instrumentation instrumentation;
@Nullable
public static Instrumentation getInstrumentation() {
return instrumentation;
}
public static void setInstrumentation(Instrumentation instrumentation) {
InstrumentationHolder.instrumentation = instrumentation;
}
private InstrumentationHolder() {}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy