otel_logger 0.1.0-beta.1
otel_logger: ^0.1.0-beta.1 copied to clipboard
OpenTelemetry instrumentation for `package:logger` (the popular pretty-print logger by leisim). Provides a `LogOutput` subclass that mirrors every log event into the OTel logs pipeline, carrying `trac [...]
Changelog #
0.1.0-beta.1 - 2026-05-13 #
Added #
OTelLogOutput extends LogOutput— drops into anyLogger(...)construction and mirrors every event into the OpenTelemetry logs pipeline. Carriestrace_id/span_idfromContext.currentso log lines inside aTracer.startActiveSpanblock are auto-correlated with the surrounding span.- Maps
logger.Level→ OTelSeverity: trace → TRACE, debug → DEBUG, info → INFO, warning → WARN, error → ERROR, fatal → FATAL. Deprecatedverbosealiases TRACE andwtfaliases FATAL. LogEvent.error/LogEvent.stackTracelift to OTelexception.type/exception.message/exception.stacktraceattributes.includeStackTrace: falseopts out of the trace.runWithoutLoggerInstrumentation/ async variant — zone-scoped suppression matching the rest of the OSS wrappers.- 5 tests covering severity mapping, exception attribute attachment, opt-out, and suppression.