ttrss/vendor/open-telemetry/api/Logs
Andrew Dolgov cdd7ad020e
jaeger-client -> opentelemetry
2023-10-20 21:13:39 +03:00
..
Map jaeger-client -> opentelemetry 2023-10-20 21:13:39 +03:00
EventLogger.php jaeger-client -> opentelemetry 2023-10-20 21:13:39 +03:00
EventLoggerInterface.php jaeger-client -> opentelemetry 2023-10-20 21:13:39 +03:00
LogRecord.php jaeger-client -> opentelemetry 2023-10-20 21:13:39 +03:00
LoggerInterface.php jaeger-client -> opentelemetry 2023-10-20 21:13:39 +03:00
LoggerProviderInterface.php jaeger-client -> opentelemetry 2023-10-20 21:13:39 +03:00
NoopLogger.php jaeger-client -> opentelemetry 2023-10-20 21:13:39 +03:00
NoopLoggerProvider.php jaeger-client -> opentelemetry 2023-10-20 21:13:39 +03:00
README.md jaeger-client -> opentelemetry 2023-10-20 21:13:39 +03:00

README.md

Logs API

This Logger API is not designed to be used by application developers, but rather by library developers for the purpose of integrating existing logging libraries with OpenTelemetry.

Logging from 3rd party loggers

3rd party loggers should log to OpenTelemetry in accordance with the logs bridge API specification.

This means that a "log appender" in the 3rd party logging library (sometimes known as a "handler") should:

  • accept an OpenTelemetry\API\Logs\LoggerProviderInterface, or obtain a globally registered one from OpenTelemetry\API\Instrumentation\Globals
  • obtain a Logger from the logger provider (optionally adding any resources that should be associated with logs emitted)
  • convert logs from its own log format into OpenTelemetry's LogRecord format
  • send the logs to OpenTelemetry via Logger::logRecord()

See monolog-otel-integration for an example.