Class SdkLogEmitterProvider

java.lang.Object
io.opentelemetry.sdk.logs.SdkLogEmitterProvider
All Implemented Interfaces:
Closeable, AutoCloseable

public final class SdkLogEmitterProvider extends Object implements Closeable
SDK registry for creating LogEmitters.
  • Method Details

    • builder

      public static SdkLogEmitterProviderBuilder builder()
      Returns:
      a new builder instance
    • get

      public LogEmitter get(String instrumentationScopeName)
      Gets or creates a named log emitter instance.
      Parameters:
      instrumentationScopeName - A name uniquely identifying the instrumentation scope, such as the instrumentation library, package, or fully qualified class name. Must not be null.
      Returns:
      a log emitter instance
    • logEmitterBuilder

      public LogEmitterBuilder logEmitterBuilder(String instrumentationScopeName)
      Creates a LogEmitterBuilder instance.
      Parameters:
      instrumentationScopeName - the name of the instrumentation scope
      Returns:
      a log emitter builder instance
    • forceFlush

      public io.opentelemetry.sdk.common.CompletableResultCode forceFlush()
      Request the active log processor to process all logs that have not yet been processed.
      Returns:
      a CompletableResultCode which is completed when the flush is finished
    • shutdown

      public io.opentelemetry.sdk.common.CompletableResultCode shutdown()
      Attempt to shut down the active log processor.
      Returns:
      a CompletableResultCode which is completed when the active log process has been shut down.
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable