Interface LogProcessor

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
BatchLogProcessor, SimpleLogProcessor

@ThreadSafe public interface LogProcessor extends Closeable
LogProcessor is the interface to allow synchronous hooks for logs emitted by LogEmitters.
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    Closes this LogProcessor after processing any remaining logs, releasing any resources.
    composite(LogProcessor... processors)
    Returns a LogProcessor which simply delegates to all processing to the processors in order.
    Returns a LogProcessor which simply delegates to all processing to the processors in order.
    void
    emit(LogData logData)
    Emit a log.
    default io.opentelemetry.sdk.common.CompletableResultCode
    Process all logs that have not yet been processed.
    default io.opentelemetry.sdk.common.CompletableResultCode
    Shutdown the log processor.
  • Method Details

    • composite

      static LogProcessor composite(LogProcessor... processors)
      Returns a LogProcessor which simply delegates to all processing to the processors in order.
    • composite

      static LogProcessor composite(Iterable<LogProcessor> processors)
      Returns a LogProcessor which simply delegates to all processing to the processors in order.
    • emit

      void emit(LogData logData)
      Emit a log.
      Parameters:
      logData - the log
    • shutdown

      default io.opentelemetry.sdk.common.CompletableResultCode shutdown()
      Shutdown the log processor.
      Returns:
      result
    • forceFlush

      default io.opentelemetry.sdk.common.CompletableResultCode forceFlush()
      Process all logs that have not yet been processed.
      Returns:
      result
    • close

      default void close()
      Closes this LogProcessor after processing any remaining logs, releasing any resources.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable