tracing-opentelemetry
OpenTelemetry integration for tracing
0.33.0
190M downloads/mo
#524 most downloaded on crates.io
tokio-rs/tracing-opentelemetry
What this package is like to depend on
Last release 3 months ago
18 May 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 36 of 38 stable releases
1 version withdrawn
withdrawn after publishing
7 years old
39 releases · first in 2019
3 releases in the last 12 months
see the full history below
Release timeline
39 releases · Nov 2019 to May 2026Releases
latest 39-
0.33.018 May 2026Release notes
Open source →Fixed
- [breaking] avoid deadlock when entering a span (#251)
Other
- Upgrade to OpenTelemetry 0.32, see upstream changelog for details (#258)
- mimimize package size (#252)
-
0.32.112 Jan 2026Release notes
Open source →Added
- allow OpenTelemetry context access with SpanRef (#234)
- add event-counting filtering layer for spans (#228)
- publicly export
SetParentError
Fixed
- fix panic in multithreaded follows-from
Other
-
0.32.030 Sep 2025Release notes
Open source →Added
- Add configuration for including
targetin spans (#222)
Changed
- OpenTelemetry context activation (#202)
- Trace ID and span ID can be obtained from
OtelDatavia dedicated functions. Note that these
will be available only if the context has already been built. (#233)
- Trace ID and span ID can be obtained from
- Correctly track entered and exited state for timings (#212)
- Slightly improve error message on version mismatch (#211)
- Remove Lazy for thread_local static (#215)
- Update description of special fields and semantic conventions
Breaking Changes
- The attributes
code.filepath,code.lineno, andcode.namespacehave been renamed to
code.file.path, andcode.line.number, andcode.module.name, to align with the opentelemetry
semantic conventions for code. (#225) - Upgrade from opentelemetry to 0.31.0. Refer to the upstream
changelog
for more information. (#230) - Hold onto
MetricsProviderinMetricsLayer(#224) - The attribute
otel.status_messagewas changed tootel.status_descriptionto align with the
opentelemetry semantic conventions for code. (#209) - Remove the
metrics_gauge_unstablefeature.
- Add configuration for including
-
0.31.002 Jun 2025Release notes
Open source →Breaking Changes
- Upgrade from opentelemetry 0.29.0 to 0.30.0. Refer to the upstream
changelog
for more information.
Added
- Add
OpenTelemetrySpanExt::add_eventandOpenTelemetrySpanExt::add_event_with_timestamp
functions to allow adding OpenTelemetry events directly to atracing::Span, enabling the use of dynamic attribute keys
and custom event timestamps.
Release notes
Open source →Breaking Changes
- Upgrade from opentelemetry 0.29.0 to 0.30.0. Refer to the upstream changelog for more information.
Added
- Add
OpenTelemetrySpanExt::add_eventandOpenTelemetrySpanExt::add_event_with_timestampfunctions to allow adding OpenTelemetry events directly to atracing::Span, enabling the use of dynamic attribute keys and custom event timestamps.
- Upgrade from opentelemetry 0.29.0 to 0.30.0. Refer to the upstream
-
0.30.023 Mar 2025Release notes
Open source →What's Changed
- doc: tracked inactivity default by @aimericsr in #195
- chore: update from opentelemetry-sdk 0.28.0 to 0.29.0 by @alessandrobologna in #196
- chore: prepare for release 0.30.0 by @tisonkun in #197
Release notes
Open source →Breaking Changes
- Upgrade from opentelemetry 0.28.0 to 0.29.0. Refer to the upstream changelog for more information.
-
0.29.012 Feb 2025 -
0.28.013 Nov 2024Release notes
Open source →What's Changed
- Reduce locking in the implementation of
Layer::on_closeby @mzabaluev in #173 - adding support for setting the status of the span through SpanExt by @webfinesse in #176
- Add level metadata to spans by @mTsBucy1 in #182
- chore: update opentelemetry dependencies to 0.27.0 by @MathiasPius in #184
- Reduce locking in the implementation of
-
0.27.009 Oct 2024Release notes
Open source →Breaking Changes
- Upgrade to opentelemetry 0.26. Refer to the upstream
changelog
for more information.
Release notes
Open source →Breaking Changes
- Upgrade to opentelemetry 0.26. Refer to the upstream changelog for more information.
- Upgrade to opentelemetry 0.26. Refer to the upstream
-
0.26.010 Sep 2024Release notes
Open source →Breaking Changes
- Upgrade to opentelemetry 0.25. Refer to the upstream changelog for more information.
-
0.25.021 Jul 2024Release notes
Open source →Breaking Changes
- Upgrade to opentelemetry 0.24. Refer to the upstream changelog for more information.
Fixed
- Invalidate sample decision on set parent (#153)
- chore: fix on_close() comment (#148)
-
0.24.029 May 2024Release notes
Open source →Breaking Changes
- Upgrade to opentelemetry 0.23. Refer to the upstream changelog for more information.
Added
- Added gauge metrics (#129)
Fixed
- Fixed compilation on WASI targets (#147)
- Set span end time when it exists (#124)
-
0.23.005 Mar 2024Release notes
Open source →Breaking Changes
- Upgrade to opentelemetry 0.22. Refer to the upstream changelog for more information. In particular, i64 histograms will silently downgrade to key/value exports.
-
0.22.007 Nov 2023Release notes
Open source →Breaking Changes
- Upgrade to
v0.21.0ofopentelemetryFor list of breaking changes in OpenTelemetry, see the v0.21.0 changelog. - Update MSRV to require Rust 1.65+, as
opentelemetryrequires it now. (#68)
Fixed
- WASM Support (#57)
- Fix potential deadlock (#59)
Thanks to @jesseditson, @AsmPrgmC3, and @rthomas for contributing to this release!
Release notes
Open source →ab9415a
This commit was created on GitHub.com and signed with GitHub’s verified signature .
GPG key ID: B5690EEEBB952194
Verified Learn about vigilant mode .
API
Added
#1410 Add experimental synchronous gauge. This is behind the feature flag, and can be enabled by enabling the feature otel_unstable for opentelemetry crate.
#1410 Guidelines to add new unstable/experimental features.
Changed
-
Modified AnyValue.Map to be backed by HashMap instead of custom OrderMap, which internally used IndexMap. There was no requirement to maintain the order of entries, so moving from IndexMap to HashMap offers slight performance gains, and avoids IndexMap dependency. This affects body and attributes of LogRecord. #1353
-
Add TextMapCompositePropagator #1373
-
Turned off events for NoopLogger to save on operations #1455
Removed
-
Removed OrderMap type as there was no requirement to use this over regular HashMap. #1353
-
Remove API for Creating Histograms with signed integers. #1371
-
Remove global::shutdown_meter_provider, use SdkMeterProvider::shutdown directly instead ( #1412 ).
SDK
Deprecated
- XrayIdGenerator in the opentelemetry-sdk has been deprecated and moved to version 0.10.0 of the opentelemetry-aws crate.
Added
#1410 Add experimental synchronous gauge
#1471 Configure batch log record processor via OTEL_BLRP_* environment variables and via OtlpLogPipeline::with_batch_config
#1503 Make the documentation for In-Memory exporters visible.
#1526 Performance Improvement : Creating Spans and LogRecords are now faster, by avoiding expensive cloning of Resource for every Span/LogRecord.
Changed
Breaking #1313 #1350 Changes how Span links/events are stored to achieve performance gains. See below for details:
Behavior Change : When enforcing max_links_per_span , max_events_per_span from SpanLimits , links/events are kept in the first-come order. The previous "eviction" based approach is no longer performed.
Breaking Change Affecting Exporter authors :
SpanData now stores links as SpanLinks instead of EvictedQueue where SpanLinks is a struct with a Vec of links and dropped_count .
SpanData now stores events as SpanEvents instead of EvictedQueue where SpanEvents is a struct with a Vec of events and dropped_count .
Breaking Remove TextMapCompositePropagator #1373 . Use TextMapCompositePropagator in opentelemetry API.
#1375 Fix metric collections during PeriodicReader shutdown
Breaking #1480 Remove fine grained BatchConfig configurations from BatchLogProcessorBuilder and BatchSpanProcessorBuilder . Use BatchConfigBuilder to construct a BatchConfig instance and pass it using BatchLogProcessorBuilder::with_batch_config or BatchSpanProcessorBuilder::with_batch_config .
Breaking #1480 Remove mutating functions from BatchConfig , use BatchConfigBuilder to construct a BatchConfig instance.
Breaking #1495 Remove Batch LogRecord&Span Processor configuration via non-standard environment variables. Use the following table to migrate from the no longer supported non-standard environment variables to the standard ones.
No longer supported Standard equivalent
OTEL_BLRP_SCHEDULE_DELAY_MILLIS OTEL_BLRP_SCHEDULE_DELAY
OTEL_BLRP_EXPORT_TIMEOUT_MILLIS OTEL_BLRP_EXPORT_TIMEOUT
OTEL_BSP_SCHEDULE_DELAY_MILLIS OTEL_BSP_SCHEDULE_DELAY
OTEL_BSP_EXPORT_TIMEOUT_MILLIS OTEL_BSP_EXPORT_TIMEOUT
Breaking 1455 Make the LoggerProvider Owned
-
Logger now takes an Owned Logger instead of a Weak<LoggerProviderInner>
-
LoggerProviderInner is no longer pub (crate)
-
Logger.provider() now returns &LoggerProvider instead of an Option<LoggerProvider>
1519 Performance improvements when calling Counter::add() and UpDownCounter::add() with an empty set of attributes (e.g. counter.Add(5, &[]) )
Fixed
- #1481 Fix error message caused by race condition when using PeriodicReader
- Upgrade to
-
0.21.029 Aug 2023Release notes
Open source →Added
- Ability to produce measurement with attributes (#43)
Breaking Changes
MetricsLayeris now generic over the itsSubscriberimpl to support per-layer filtering (#43)
Fixed
- Trace IDs not matching when propagating invalid contexts (#55)
Thanks to @ymgyt and @hdost for contributing to this release!
-
0.20.004 Aug 2023Release notes
Open source →Added
- Add
OpenTelemetrySpanExt::set_attributefunction (#34)
Breaking Changes
- Upgrade to
v0.20.0ofopentelemetry(#36) For list of breaking changes in OpenTelemetry, see the v0.20.0 changelog.
Thanks to @ymgyt, @mladedav, @shaun-cox, and @Protryon for contributing to this release!
- Add
-
0.19.023 May 2023Release notes
Open source →Breaking Changes
- Upgrade to
v0.19.0ofopentelemetry(#12) For list of breaking changes in OpenTelemetry, see the v0.19.0 changelog. - Update MSRV to require Rust 1.60+, as
opentelemetryrequires it now (#12)
Thanks to @jaysonsantos, @briankung, and @humb1t for contributing to this release!
- Upgrade to
-
0.18.019 Sep 2022Release notes
Open source →Breaking Changes
- Upgrade to
v0.18.0ofopentelemetry([#2303]) For list of breaking changes in OpenTelemetry, see the v0.18.0 changelog.
Fixed
on_eventrespects event's explicit parent ([#2296])
Thanks to @wprzytula for contributing to this release!
- Upgrade to
-
0.17.401 Jul 2022Release notes
Open source →This release adds optional support for recording
std::error::Errors using [OpenTelemetry's semantic conventions for exceptions][exn-semconv].Added
Layer::with_exception_fieldsto enable emittingexception.messageandexception.backtracesemantic-convention fields when anErroris recorded as a span or event field (#2135)Layer::with_exception_field_propagationto enable settingexception.messageandexception.backtracesemantic-convention fields on the current span when an event with anErrorfield is recorded (#2135)
Thanks to @lilymara-onesignal for contributing to this release!
-
0.17.307 Jun 2022Release notes
Open source →This release adds support for emitting thread names and IDs to OpenTelemetry, as well as recording
std::error::Errorvalues in a structured manner with their source chain included. Additionally, this release fixes issues related to event and span source code locations.Added
Layer::with_threadsto enable recording thread names/IDs according to OpenTelemetry semantic conventions (#2134)Error::sourcechain when recordingstd::error::Errorvalues (#2122)Layer::with_locationmethod (replacesLayer::with_event_location) (#2124)
Changed
std::error::Errorvalues are now recorded usingfmt::Displayrather thanfmt::Debug(#2122)
Fixed
- Fixed event source code locations overwriting the parent span's source location (#2099)
- Fixed
Layer::with_event_locationnot controlling whether locations are emitted for spans as well as events (#2124)
Deprecated
Layer::with_event_location: renamed toLayer::with_location, as it now controls both span and event locations (#2124)
Thanks to new contributors @lilymara-onesignal, @hubertbudzynski, and @DevinCarr for contributing to this release!
-
0.17.221 Feb 2022Release notes
Open source →This release fixes an issue introduced in v0.17.1 where
tracing-opentelemetrycould not be compiled withdefault-features = false.Fixed
- Compilation failure with
tracing-logfeature disabled (#1949)
- Compilation failure with
-
0.17.111 Feb 2022 withdrawnRelease notes
Open source →Added
OpenTelemetryLayercan now add detailed location information to forwarded events (defaults to on) (#1911)OpenTelemetryLayer::with_event_locationto control whether source locations are recorded (#1911)
Changed
- Avoid unnecessary allocations to improve performance when recording events (#1917)
Thanks to @djc for contributing to this release!
-
0.17.004 Feb 2022Release notes
Open source →Breaking Changes
- Upgrade to
v0.17.0ofopentelemetry(#1853) For list of breaking changes in OpenTelemetry, see the v0.17.0 changelog.
- Upgrade to
-
0.16.023 Oct 2021Nothing published for this version
-
0.15.017 Aug 2021Release notes
Open source →Breaking Changes
- Upgrade to
v0.17.1ofopentelemetry(#1497) For list of breaking changes in OpenTelemetry, see the v0.17.1 changelog.
- Upgrade to
-
0.14.009 Jul 2021Release notes
Open source →Breaking Changes
- Upgrade to
v0.15.0ofopentelemetry(#1441) For list of breaking changes in OpenTelemetry, see the v0.14.0 changelog.
Added
- Spans now include Opentelemetry
code.namespace,code.filepath, andcode.linenoattributes (#1411)
Changed
- Improve performance by pre-allocating attribute
Vecs (#1327)
Thanks to @Drevoed, @lilymara-onesignal, and @Folyd for contributing to this release!
- Upgrade to
-
0.13.020 May 2021Release notes
Open source →Breaking Changes
- Upgrade to
v0.14.0ofopentelemetry(#1394) For list of breaking changes in OpenTelemetry, see the v0.14.0 changelog.
- Upgrade to
-
0.12.001 Apr 2021Release notes
Open source →Breaking Changes
- Upgrade to
v0.13.0ofopentelemetry(#1322) For list of breaking changes in OpenTelemetry, see the v0.13.0 changelog.
Changed
- Improve performance when tracked inactivity is disabled (#1315)
- Upgrade to
-
0.11.026 Jan 2021Release notes
Open source →Breaking Changes
- Upgrade to
v0.12.0ofopentelemetry(#1200) For list of breaking changes in OpenTelemetry, see the v0.12.0 changelog.
- Upgrade to
-
0.10.004 Jan 2021Release notes
Open source →Breaking Changes
- Upgrade to
v0.11.0ofopentelemetry(#1161) For list of breaking changes in OpenTelemetry, see the v0.11.0 changelog. - Update
OpenTelemetrySpanExt::set_parentto take a context by value as it is now stored and propagated. (#1161) - Rename
PreSampledTracer::sampled_span_contexttoPreSampledTracer::sampled_contextas it now returns a full otel context. (#1161)
- Upgrade to
-
0.9.015 Nov 2020Release notes
Open source →Added
- Track busy/idle timings as attributes via
with_tracked_inactivity(#1096)
Breaking Changes
- Upgrade to
v0.10.0ofopentelemetry(#1049) For list of breaking changes in OpenTelemetry, see the v0.10.0 changelog.
- Track busy/idle timings as attributes via
-
0.8.013 Oct 2020Release notes
Open source →Added
- Implement additional record types (bool, i64, u64) (#1007)
Breaking changes
- Add
PreSampledTracerinterface, removes need to specify sampler (#962)
Fixed
- Connect external traces (#956)
- Assign default ids if missing (#1027)
-
0.7.014 Aug 2020Release notes
Open source →Breaking Changes
- Upgrade to
v0.8.0ofopentelemetry(#932) For list of breaking changes in OpenTelemetry, see the v0.8.0 changelog.
- Upgrade to
-
0.6.004 Aug 2020Release notes
Open source →Breaking Changes
- Upgrade to
v0.7.0ofopentelemetry(#867) For list of breaking changes in OpenTelemetry, see the v0.7.0 changelog.
- Upgrade to
-
0.5.002 Jun 2020Release notes
Open source →Added
- Support
tracing-logspecial values (#735) - Support
Span::follows_fromcreating otel span links (#723) - Dynamic otel span names via
otel.namefield (#732)
Breaking Changes
- Upgrade to
v0.6.0ofopentelemetry(#745)
Fixed
- Filter out invalid parent contexts when building span contexts (#743)
- Support
-
0.4.013 May 2020Release notes
Open source →Added
tracing_opentelemetry::layer()method to construct a default layer.OpenTelemetryLayer::with_samplermethod to configure the opentelemetry sampling behavior.OpenTelemetryLayer::newmethod to configure both the tracer and sampler.
Breaking Changes
OpenTelemetrySpanExt::set_parentnow accepts a reference to an extracted parentContextinstead of aSpanContextto match propagators.OpenTelemetrySpanExt::contextnow returns aContextinstead of aSpanContextto match propagators.OpenTelemetryLayer::with_tracernow takes&selfas a parameter- Upgrade to
v0.5.0ofopentelemetry.
Fixed
- Fixes bug where child spans were always marked as sampled
-
0.3.120 Apr 2020 -
0.3.005 Apr 2020Release notes
Open source →Added
- Span extension for injecting and extracting
opentelemetryspan contexts intotracingspans
Removed
- Disabled the
metricsfeature of the opentelemetry as it is unused.
- Span extension for injecting and extracting
-
0.2.008 Feb 2020Release notes
Open source →Changed
- Update
tracing-subscriberto 0.2.0 stable - Update to
opentelemetry0.2.0
- Update
-
0.1.020 Nov 2019Nothing published for this version