otel_loggy 0.2.0
otel_loggy: ^0.2.0 copied to clipboard
OpenTelemetry log bridge for package:loggy. Mirrors every Loggy record into the OTel logs pipeline, inheriting trace_id/span_id, while Loggy keeps rendering its own output.
Changelog #
0.2.0 - 2026-08-10 #
Changed #
- Attribute keys are now typed constants:
exception.type/exception.message/exception.stacktracecome from the registryExceptionAttributesenum andlogger.namefrom the newLoggySemanticsenum. No raw string attribute keys remain (the on-wire keys are unchanged). - Dependency floors raised to
dartastic_opentelemetry ^1.1.0-beta.12anddartastic_opentelemetry_api ^1.0.0-rc.1. The previous floors declared compatibility with API versions that predate the semconv enums this package uses and could not actually resolve-and-compile. loggyfloor raised to^2.0.2: 2.0.0 lacks theLoggyPrinterbase class and 2.0.1'slogErrorcannot carry an error/stackTrace, so the declared 2.0.0 lower bound never compiled.repositoryURL corrected to the canonicalDartasticorg casing so pub.dev repository verification succeeds.
Added #
-
example/otel_loggy_example.dartshowing initialization, exception logging, and zone-scoped suppression. -
OTelLoggyPrinter— apackage:loggyLoggyPrinterthat mirrors every record into the OpenTelemetry logs pipeline. -
Severity mapping (debug → DEBUG, info → INFO, warning → WARN, error → ERROR; all → TRACE; everything else → INFO).
-
logger.nameattribute on every record;exception.type/exception.message/exception.stacktracewhenrecord.error/record.stackTraceare set. -
Zone-trap fix: the printer re-enters
record.zonebefore emit so zone-scoped suppression works and the active span'strace_id/span_idare correlated correctly. -
runWithoutLoggyInstrumentation()zone helper.