opentelemetry-appender-tracing
An OpenTelemetry log appender for the tracing crate
0.32.0
16M downloads/mo
#2430 most downloaded on crates.io
open-telemetry/opentelemetry-rust
What this package is like to depend on
Last release 3 months ago
09 May 2026
Release timing varies
gaps range from 2 weeks to 8 months
Nearly every release is documented
notes for 17 of 17 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
17 releases · first in 2023
3 releases in the last 12 months
see the full history below
Release timeline
17 releases · Jul 2023 to May 2026Releases
latest 17-
0.32.009 May 2026Release notes
Open source →Released 2026-May-08
-
Add tracing span attribute enrichment (experimental). When enabled, attributes attached to active
tracingspans are copied onto each emitted log record. "Span" here refers to atracing::span!from thetracingcrate (the appender's source), not an OpenTelemetry span. #3482, #3505Gated behind the new
experimental_span_attributescargo feature. As with allexperimental_*features in this repo, the API may change without a major version bump until it is stabilized; once stable, the feature flag will be removed.Enrichment is disabled by default (no per-span overhead) and must be opted into at runtime via a single builder method that accepts a [
TracingSpanAttributes] value:use opentelemetry_appender_tracing::layer::TracingSpanAttributes; // Copy all tracing-span attributes onto log records: let layer = OpenTelemetryTracingBridge::builder(&provider) .with_tracing_span_attributes(TracingSpanAttributes::all()) .build(); // Or copy only an allowlist of attributes: let layer = OpenTelemetryTracingBridge::builder(&provider) .with_tracing_span_attributes(TracingSpanAttributes::allowlist(["session.id"])) .build(); -
Remove the
experimental_use_tracing_span_contextsincetracing-opentelemetrynow supports activating the OpenTelemetry context for the current tracing span. This fixes #3190 — the circular dependency introduced by depending ontracing-opentelemetrythat depends onopentelemetry. -
"spec_unstable_logs_enabled" feature flag is removed. The capability (and the backing specification) is now stable and is enabled by default. #3278
-
-
0.31.102 Oct 2025 -
0.31.025 Sep 2025Release notes
Open source →Released 2025-Sep-25
- Updated
opentelemetrydependency to version 0.31.0.
- Updated
-
0.30.105 Jun 2025 -
0.30.023 May 2025Release notes
Open source →Released 2025-May-23
- Updated
opentelemetrydependency to version 0.30.0.
- Updated
-
0.29.124 Mar 2025 -
0.29.022 Mar 2025Release notes
Open source →Released 2025-Mar-21
Fixes 1682. "spec_unstable_logs_enabled" feature now do not suppress logs for other layers.
The special treatment of the "message" field has been extended when recording string values. With this change, when a log is emitted with a field named "message" (and string value), its value is directly assigned to the LogRecord’s body rather than being stored as an attribute named "message". This offers a slight performance improvement over previous.
For example, the below will now produce LogRecord with the message value populated as LogRecord's body:
error!(name: "my-event-name", target: "my-system", event_id = 20, user_name = "otel", user_email = "[email protected]", message = "This is an example message");Previously, Body was only populated when the below style was used.
error!(name: "my-event-name", target: "my-system", event_id = 20, user_name = "otel", user_email = "[email protected]", "This is an example message");This style, while slightly slower, should still be used when the value is not a simple string, but require format arguments as in the below example.
error!(name: "my-event-name", target: "my-system", event_id = 20, user_name = "otel", user_email = "[email protected]", "This is an example message with format arguments {} and {}", "foo", "bar");Fixes 2658 InstrumentationScope(Logger) used by the appender now uses an empty ("") named Logger. Previously, a Logger with name and version of the crate was used. Receivers (processors, exporters) are expected to use
LogRecord.target()as scope name. This is already done in OTLP Exporters, so this change should be transparent to most users.-
Passes event name to the
event_enabledmethod on theLogger. This allows implementations (SDK, processor, exporters) to leverage this additional information to determine if an event is enabled. -
u64,i128,u128andusizevalues are stored asopentelemetry::logs::AnyValue::Intwhen conversion is feasible. Otherwise stored asopentelemetry::logs::AnyValue::String. This avoids unnecessary string allocation when values can be represented in their original types. -
Byte arrays are stored as
opentelemetry::logs::AnyValue::Bytesinstead of string. -
Errorfields are reported using attribute named "exception.message". For example, the below will now report an attribute named "exception.message", instead of previously reporting the user provided attribute "error".error!(....error = &OTelSdkError::AlreadyShutdown as &dyn std::error::Error...) -
perf - small perf improvement by avoiding string allocation of
target -
Update
opentelemetrydependency version to 0.29.
-
-
0.28.112 Feb 2025 -
0.28.010 Feb 2025Release notes
Open source →Released 2025-Feb-10
- Update
opentelemetrydependency version to 0.28. - Bump msrv to 1.75.0.
Release notes
Open source →Released 2025-Feb-10
- Update to v1.29.0 of the semantic conventions.
- Bump msrv to 1.75.0.
- Update
-
0.27.012 Nov 2024Release notes
Open source → -
0.26.001 Oct 2024Release notes
Open source →Released 2024-Sep-30
- Update
opentelemetrydependency version to 0.26 - 2101 The
logevents emitted via thetracingpipeline using thelog-tracingcrate no longer include the target metadata as attributes. Exporters or backends that rely on this attribute should now access the target directly from theLogRecord::targetfield.
Release notes
Open source →Released 2024-Sep-30
Changed
- Starting with this version, this crate will use Weaver for the generation of the semantic conventions.
- Breaking Introduced a new feature
semconv_experimentalto enable experimental semantic conventions. This feature is disabled by default.
- Update
-
0.25.009 Sep 2024Release notes
Open source →- Update
opentelemetrydependency version to 0.25 - Starting with this version, this crate will align with
opentelemetrycrate on major,minor versions. - Reduce heap allocation by using
&'static strforSeverityText.
- Update
-
0.5.015 Jul 2024Release notes
Open source →-
1869 Utilize the
LogRecord::set_target()method to pass the tracing target to the SDK. Exporters might use the target to override the instrumentation scope, which previously contained "opentelemetry-appender-tracing". -
Breaking 1928 Insert tracing event name into LogRecord::event_name instead of attributes.
- If using a custom exporter, then they must serialize this field directly from LogRecord::event_name instead of iterating over the attributes. OTLP Exporter is modified to handle this.
-
Update
opentelemetrydependency version to 0.24
Release notes
Open source →Changed
- Update to opentelemetry v0.13.0
Removed
- Removed
from_envand use environment variables to initialize the configurations by default #459
-
-
0.4.015 May 2024Release notes
Open source →- Removed unwanted dependency on opentelemetry-sdk.
- Update
opentelemetrydependency version to 0.23
-
0.3.025 Feb 2024Release notes
Open source →Added
- New experimental metadata attributes feature (experimental_metadata_attributes) #1380
- Experimental new attributes for tracing metadata
- Fixes the following for events emitted using log crate
- Normalized metadata fields
- Remove redundant metadata
- New experimental metadata attributes feature (experimental_metadata_attributes) #1380
-
0.2.006 Nov 2023Release notes
Open source → -
0.1.029 Jul 2023