Class: OpenTelemetry::Logs::Logger

Inherits:
Object
  • Object
show all
Defined in:
lib/opentelemetry/logs/logger.rb

Overview

No-op implementation of logger.

Direct Known Subclasses

Internal::ProxyLogger

Instance Method Summary collapse

Instance Method Details

#on_emit(timestamp: nil, observed_timestamp: nil, severity_number: nil, severity_text: nil, body: nil, trace_id: nil, span_id: nil, trace_flags: nil, attributes: nil, context: nil) ⇒ Object

Emit a OpenTelemetry::Logs::LogRecord to the processing pipeline.

Parameters:

  • timestamp (optional Time) (defaults to: nil)

    Time when the event occurred.

  • observed_timestamp (optional Time) (defaults to: nil)

    Time when the event was observed by the collection system.

  • context (optional Context) (defaults to: nil)

    The Context to associate with the LogRecord. Intended default: OpenTelemetry::Context.current

  • severity_number (optional Integer) (defaults to: nil)

    Numerical value of the severity. Smaller numerical values correspond to less severe events (such as debug events), larger numerical values correspond to more severe events (such as errors and critical events).

  • severity_text (optional String) (defaults to: nil)

    Original string representation of the severity as it is known at the source. Also known as log level.

  • body (optional String, Numeric, Boolean, Array<String, Numeric, Boolean>, Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}) (defaults to: nil)

    A value containing the body of the log record.

  • trace_id (optional String) (defaults to: nil)

    The trace ID associated with the current context.

  • span_id (optional String) (defaults to: nil)

    The span ID associated with the current context.

  • trace_flags (optional TraceFlags) (defaults to: nil)

    The trace flags associated with the current context.

  • attributes (optional Hash{String => String, Numeric, Boolean, Array<String, Numeric, Boolean>}) (defaults to: nil)

    Additional information about the event.

  • context (optional Context) (defaults to: nil)

    The Context to associate with the LogRecord. Intended default: OpenTelemetry::Context.current



42
43
44
45
46
47
48
49
50
51
52
53
54
# File 'lib/opentelemetry/logs/logger.rb', line 42

def on_emit(
  timestamp: nil,
  observed_timestamp: nil,
  severity_number: nil,
  severity_text: nil,
  body: nil,
  trace_id: nil,
  span_id: nil,
  trace_flags: nil,
  attributes: nil,
  context: nil
)
end