PackageTrack
Sign in Get early access

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 2026
2020 2021 2022 2023 2024 2025 2026
Release Pre-release Withdrawn

Releases

latest 39
  1. 0.33.0 18 May 2026
    Release notes

    Fixed

    • [breaking] avoid deadlock when entering a span (#251)

    Other

    Open source →
  2. 0.32.1 12 Jan 2026
    Release notes

    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

    • Remove unwanted dependency on opentelemetry sdk crate (#241)
    • update README.md links to use the latest version (#239)
    • remove thiserror and unused dependencies (#238)
    Open source →
  3. 0.32.0 30 Sep 2025
    Release notes

    Added

    • Add configuration for including target in spans (#222)

    Changed

    • OpenTelemetry context activation (#202)
      • Trace ID and span ID can be obtained from OtelData via dedicated functions. Note that these
        will be available only if the context has already been built. (#233)
    • 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, and code.namespace have been renamed to
      code.file.path, and code.line.number, and code.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 MetricsProvider in MetricsLayer (#224)
    • The attribute otel.status_message was changed to otel.status_description to align with the
      opentelemetry semantic conventions for code. (#209)
    • Remove the metrics_gauge_unstable feature.
    Open source →
  4. 0.31.0 02 Jun 2025
    Release notes

    Breaking Changes

    • Upgrade from opentelemetry 0.29.0 to 0.30.0. Refer to the upstream
      changelog
      for more information.

    Added

    • Add OpenTelemetrySpanExt::add_event and OpenTelemetrySpanExt::add_event_with_timestamp
      functions to allow adding OpenTelemetry events directly to a tracing::Span, enabling the use of dynamic attribute keys
      and custom event timestamps.
    Open source →
    Release notes

    Breaking Changes

    • Upgrade from opentelemetry 0.29.0 to 0.30.0. Refer to the upstream changelog for more information.

    Added

    • Add OpenTelemetrySpanExt::add_event and OpenTelemetrySpanExt::add_event_with_timestamp functions to allow adding OpenTelemetry events directly to a tracing::Span, enabling the use of dynamic attribute keys and custom event timestamps.
    Open source →
  5. 0.30.0 23 Mar 2025
    Release notes

    What's Changed

    Open source →
    Release notes

    Breaking Changes

    • Upgrade from opentelemetry 0.28.0 to 0.29.0. Refer to the upstream changelog for more information.
    Open source →
  6. 0.29.0 12 Feb 2025
    Release notes

    What's Changed

    • Fix the example installing OpenTelemetryLayer into a global subscriber by @mzabaluev in #175
    • Update dependencies by @djc in #187
    • Use renamed WASI target by @djc in #189
    • use the tracing event name as the otel event name by @zzlk in #188
    • Update opentelemetry to 0.28 by @cschramm in #193
    Open source →
  7. 0.28.0 13 Nov 2024
    Release notes

    What's Changed

    • Reduce locking in the implementation of Layer::on_close by @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
    Open source →
  8. 0.27.0 09 Oct 2024
    Release notes

    Breaking Changes

    • Upgrade to opentelemetry 0.26. Refer to the upstream
      changelog
      for more information.
    Open source →
    Release notes

    Breaking Changes

    • Upgrade to opentelemetry 0.26. Refer to the upstream changelog for more information.
    Open source →
  9. 0.26.0 10 Sep 2024
    Release notes

    What's Changed

    Open source →
    Release notes

    Breaking Changes

    • Upgrade to opentelemetry 0.25. Refer to the upstream changelog for more information.
    Open source →
  10. 0.25.0 21 Jul 2024
    Release notes

    What's Changed

    Open source →
    Release notes

    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)
    Open source →
  11. 0.24.0 29 May 2024
    Release notes

    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)
    Open source →
  12. 0.23.0 05 Mar 2024
    Release notes

    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.
    Open source →
  13. 0.22.0 07 Nov 2023
    Release notes

    Breaking Changes

    • Upgrade to v0.21.0 of opentelemetry For list of breaking changes in OpenTelemetry, see the v0.21.0 changelog.
    • Update MSRV to require Rust 1.65+, as opentelemetry requires it now. (#68)

    Fixed

    • WASM Support (#57)
    • Fix potential deadlock (#59)

    Thanks to @jesseditson, @AsmPrgmC3, and @rthomas for contributing to this release!

    Open source →
    Release notes

    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
    Open source →
  14. 0.21.0 29 Aug 2023
    Release notes

    Added

    • Ability to produce measurement with attributes (#43)

    Breaking Changes

    • MetricsLayer is now generic over the its Subscriber impl 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!

    Open source →
  15. 0.20.0 04 Aug 2023
    Release notes

    Added

    • Add OpenTelemetrySpanExt::set_attribute function (#34)

    Breaking Changes

    • Upgrade to v0.20.0 of opentelemetry (#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!

    Open source →
  16. 0.19.0 23 May 2023
    Release notes

    Breaking Changes

    • Upgrade to v0.19.0 of opentelemetry (#12) For list of breaking changes in OpenTelemetry, see the v0.19.0 changelog.
    • Update MSRV to require Rust 1.60+, as opentelemetry requires it now (#12)

    Thanks to @jaysonsantos, @briankung, and @humb1t for contributing to this release!

    Open source →
  17. 0.18.0 19 Sep 2022
    Release notes

    Breaking Changes

    • Upgrade to v0.18.0 of opentelemetry ([#2303]) For list of breaking changes in OpenTelemetry, see the v0.18.0 changelog.

    Fixed

    • on_event respects event's explicit parent ([#2296])

    Thanks to @wprzytula for contributing to this release!

    Open source →
  18. 0.17.4 01 Jul 2022
    Release notes

    This release adds optional support for recording std::error::Errors using [OpenTelemetry's semantic conventions for exceptions][exn-semconv].

    Added

    • Layer::with_exception_fields to enable emitting exception.message and exception.backtrace semantic-convention fields when an Error is recorded as a span or event field (#2135)
    • Layer::with_exception_field_propagation to enable setting exception.message and exception.backtrace semantic-convention fields on the current span when an event with an Error field is recorded (#2135)

    Thanks to @lilymara-onesignal for contributing to this release!

    Open source →
  19. 0.17.3 07 Jun 2022
    Release notes

    This release adds support for emitting thread names and IDs to OpenTelemetry, as well as recording std::error::Error values 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_threads to enable recording thread names/IDs according to OpenTelemetry semantic conventions (#2134)
    • Error::source chain when recording std::error::Error values (#2122)
    • Layer::with_location method (replaces Layer::with_event_location) (#2124)

    Changed

    • std::error::Error values are now recorded using fmt::Display rather than fmt::Debug (#2122)

    Fixed

    • Fixed event source code locations overwriting the parent span's source location (#2099)
    • Fixed Layer::with_event_location not controlling whether locations are emitted for spans as well as events (#2124)

    Deprecated

    • Layer::with_event_location: renamed to Layer::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!

    Open source →
  20. 0.17.2 21 Feb 2022
    Release notes

    This release fixes an issue introduced in v0.17.1 where tracing-opentelemetry could not be compiled with default-features = false.

    Fixed

    • Compilation failure with tracing-log feature disabled (#1949)
    Open source →
  21. 0.17.1 11 Feb 2022 withdrawn
    Release notes

    Added

    • OpenTelemetryLayer can now add detailed location information to forwarded events (defaults to on) (#1911)
    • OpenTelemetryLayer::with_event_location to 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!

    Open source →
  22. 0.17.0 04 Feb 2022
    Release notes

    Breaking Changes

    • Upgrade to v0.17.0 of opentelemetry (#1853) For list of breaking changes in OpenTelemetry, see the v0.17.0 changelog.
    Open source →
  23. 0.16.0 23 Oct 2021

    Nothing published for this version

  24. 0.15.0 17 Aug 2021
    Release notes

    Breaking Changes

    • Upgrade to v0.17.1 of opentelemetry (#1497) For list of breaking changes in OpenTelemetry, see the v0.17.1 changelog.
    Open source →
  25. 0.14.0 09 Jul 2021
    Release notes

    Breaking Changes

    • Upgrade to v0.15.0 of opentelemetry (#1441) For list of breaking changes in OpenTelemetry, see the v0.14.0 changelog.

    Added

    • Spans now include Opentelemetry code.namespace, code.filepath, and code.lineno attributes (#1411)

    Changed

    • Improve performance by pre-allocating attribute Vecs (#1327)

    Thanks to @Drevoed, @lilymara-onesignal, and @Folyd for contributing to this release!

    Open source →
  26. 0.13.0 20 May 2021
    Release notes

    Breaking Changes

    • Upgrade to v0.14.0 of opentelemetry (#1394) For list of breaking changes in OpenTelemetry, see the v0.14.0 changelog.
    Open source →
  27. 0.12.0 01 Apr 2021
    Release notes

    Breaking Changes

    • Upgrade to v0.13.0 of opentelemetry (#1322) For list of breaking changes in OpenTelemetry, see the v0.13.0 changelog.

    Changed

    • Improve performance when tracked inactivity is disabled (#1315)
    Open source →
  28. 0.11.0 26 Jan 2021
    Release notes

    Breaking Changes

    • Upgrade to v0.12.0 of opentelemetry (#1200) For list of breaking changes in OpenTelemetry, see the v0.12.0 changelog.
    Open source →
  29. 0.10.0 04 Jan 2021
    Release notes

    Breaking Changes

    • Upgrade to v0.11.0 of opentelemetry (#1161) For list of breaking changes in OpenTelemetry, see the v0.11.0 changelog.
    • Update OpenTelemetrySpanExt::set_parent to take a context by value as it is now stored and propagated. (#1161)
    • Rename PreSampledTracer::sampled_span_context to PreSampledTracer::sampled_context as it now returns a full otel context. (#1161)
    Open source →
  30. 0.9.0 15 Nov 2020
    Release notes

    Added

    • Track busy/idle timings as attributes via with_tracked_inactivity (#1096)

    Breaking Changes

    • Upgrade to v0.10.0 of opentelemetry (#1049) For list of breaking changes in OpenTelemetry, see the v0.10.0 changelog.
    Open source →
  31. 0.8.0 13 Oct 2020
    Release notes

    Added

    • Implement additional record types (bool, i64, u64) (#1007)

    Breaking changes

    • Add PreSampledTracer interface, removes need to specify sampler (#962)

    Fixed

    • Connect external traces (#956)
    • Assign default ids if missing (#1027)
    Open source →
  32. 0.7.0 14 Aug 2020
    Release notes

    Breaking Changes

    • Upgrade to v0.8.0 of opentelemetry (#932) For list of breaking changes in OpenTelemetry, see the v0.8.0 changelog.
    Open source →
  33. 0.6.0 04 Aug 2020
    Release notes

    Breaking Changes

    • Upgrade to v0.7.0 of opentelemetry (#867) For list of breaking changes in OpenTelemetry, see the v0.7.0 changelog.
    Open source →
  34. 0.5.0 02 Jun 2020
    Release notes

    Added

    • Support tracing-log special values (#735)
    • Support Span::follows_from creating otel span links (#723)
    • Dynamic otel span names via otel.name field (#732)

    Breaking Changes

    • Upgrade to v0.6.0 of opentelemetry (#745)

    Fixed

    • Filter out invalid parent contexts when building span contexts (#743)
    Open source →
  35. 0.4.0 13 May 2020
    Release notes

    Added

    • tracing_opentelemetry::layer() method to construct a default layer.
    • OpenTelemetryLayer::with_sampler method to configure the opentelemetry sampling behavior.
    • OpenTelemetryLayer::new method to configure both the tracer and sampler.

    Breaking Changes

    • OpenTelemetrySpanExt::set_parent now accepts a reference to an extracted parent Context instead of a SpanContext to match propagators.
    • OpenTelemetrySpanExt::context now returns a Context instead of a SpanContext to match propagators.
    • OpenTelemetryLayer::with_tracer now takes &self as a parameter
    • Upgrade to v0.5.0 of opentelemetry.

    Fixed

    • Fixes bug where child spans were always marked as sampled
    Open source →
  36. 0.3.1 20 Apr 2020
    Release notes

    Added

    • Change span status code to unknown on error event
    Open source →
  37. 0.3.0 05 Apr 2020
    Release notes

    Added

    • Span extension for injecting and extracting opentelemetry span contexts into tracing spans

    Removed

    • Disabled the metrics feature of the opentelemetry as it is unused.
    Open source →
  38. 0.2.0 08 Feb 2020
    Release notes

    Changed

    • Update tracing-subscriber to 0.2.0 stable
    • Update to opentelemetry 0.2.0
    Open source →
  39. 0.1.0 20 Nov 2019

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive