Class AgentLogEmitterProvider

java.lang.Object
io.opentelemetry.javaagent.bootstrap.AgentLogEmitterProvider

public final class AgentLogEmitterProvider extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    static io.opentelemetry.instrumentation.api.appender.internal.LogEmitterProvider
    get()
    Returns the registered global LogEmitterProvider.
    static void
    Unsets the LogEmitterProvider.
    static void
    set(io.opentelemetry.instrumentation.api.appender.internal.LogEmitterProvider logEmitterProvider)
    Sets the LogEmitterProvider that should be used by the agent.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • get

      public static io.opentelemetry.instrumentation.api.appender.internal.LogEmitterProvider get()
      Returns the registered global LogEmitterProvider.
    • set

      public static void set(io.opentelemetry.instrumentation.api.appender.internal.LogEmitterProvider logEmitterProvider)
      Sets the LogEmitterProvider that should be used by the agent. Future calls to get() will return the provided LogEmitterProvider instance. It should only be called once - an attempt to call it a second time will result in an error. If trying to set the instance LogEmitterProvider multiple times in tests, use LogEmitterProviderHolder.resetForTest() between them.
    • resetForTest

      public static void resetForTest()
      Unsets the LogEmitterProvider. This is only meant to be used from tests which need to reconfigure LogEmitterProvider.