opentelemetry-datadog
[DEPRECATED] Datadog exporters and propagators for OpenTelemetry. Use https://github.com/DataDog/dd-trace-rs instead.
0.20.1
29M downloads/mo
#1696 most downloaded on crates.io
open-telemetry/opentelemetry-rust-contrib
What this package is like to depend on
Last release 18 days ago
05 Aug 2026
Ships fairly regularly
a new release about every 2 months
Nearly every release is documented
notes for 21 of 22 stable releases
Nothing withdrawn
no release was ever pulled
5 years old
22 releases · first in 2021
3 releases in the last 12 months
see the full history below
Release timeline
22 releases · Mar 2021 to Aug 2026Releases
latest 22-
0.20.105 Aug 2026Release notes
Open source →Deprecation release. This marks opentelemetry-datadog as deprecated on crates.io. No functional code changes.
DEPRECATED: This crate is deprecated and will be removed from this repository in a future release (#674). Datadog ships a first-party integration, dd-trace-rs, built on top of opentelemetry_sdk. New users should adopt dd-trace-rs; existing users are encouraged to migrate. See #609 for context.
Release notes
Open source →Released 2026-Aug-05
- DEPRECATED: This crate is now deprecated and will be removed from this
repository in a future release. Datadog ships a first-party integration,
dd-trace-rs, built on top ofopentelemetry_sdk. New users should adoptdd-trace-rs, and existing users are encouraged to migrate. See issue #609 for context.
- DEPRECATED: This crate is now deprecated and will be removed from this
repository in a future release. Datadog ships a first-party integration,
-
0.20.014 May 2026Release notes
Open source →Released 2026-May-13
- Bump opentelemetry and opentelemetry_sdk versions to 0.32
- Bump opentelemetry-http and opentelemetry-semantic-conventions versions to 0.32
- Bump
reqwestfrom 0.12 to 0.13 (required byopentelemetry-http0.32). - Breaking
DatadogPipelineBuilder::build_exporter,install_simple, andinstall_batchnow returnResult<_, opentelemetry_datadog::Error>(previouslyopentelemetry_sdk::trace::TraceError, which was removed upstream in 0.32).
-
0.19.001 Oct 2025Release notes
Open source →- Bump opentelemetry and opentelemetry_sdk versions to 0.31
- Bump opentelemetry-http and opentelemetry-semantic-conventions versions to 0.31
-
0.18.028 May 2025Release notes
Open source →- Bump opentelemetry and opentelemetry_sdk versions to 0.30
- Bump opentelemetry-http and opentelemetry-semantic-conventions versions to 0.30
Release notes
Open source →Released 2026-Jul-28
Added
- Added OpenTelemetry trace support
- Configurable route extraction with built-in extractors:
NoRouteExtractor- No route, safest for cardinalityPathExtractor- Uses the URL path without query params (e.g.,/users/123)AxumMatchedPathExtractor- Uses Axum'sMatchedPathfor route templates (requiresaxumfeature)FnRouteExtractor- Custom function-based extraction viawith_route_extractor_fn()
- Default route extractor depends on features:
- With
axumfeature: UsesAxumMatchedPathExtractor(route templates, low cardinality) - Without
axumfeature: UsesNoRouteExtractor(safest)
- With
- If a route is extracted, the same value is used for both the
http.routeattribute and the tracing span name. If no route is extracted, the span name is the HTTP method only, per semantic conventions.
Changed
- BREAKING: Removed public
with_meter()method. The middleware now uses global meter and tracer providers by default viaopentelemetry::global::meter()andopentelemetry::global::tracer(). Thewith_meter()method is retained as a non-public test utility to allow injecting custom meters without relying on global state. - BREAKING: Renamed types. Use the new names:
HTTPMetricsLayer→HTTPLayerHTTPMetricsService→HTTPServiceHTTPMetricsResponseFuture→ResponseFutureHTTPMetricsLayerBuilder→HTTPLayerBuilder
- BREAKING: Update default
http.server.request.durationhistogram boundaries to OTel semantic conventions. - BREAKING: Remove
with_request_duration_boundsbuilder method. Alternate histogram bucket boundaries can be applied with the standard OpenTelemetry Views; seeexamplesdirectory in crate for usage.
Migration Guide
Route Extraction Configuration
use opentelemetry_instrumentation_tower::{ HTTPLayerBuilder, NoRouteExtractor, PathExtractor, }; // No route (default without axum feature) - span name: "GET" let layer = HTTPLayerBuilder::builder() .with_route_extractor(NoRouteExtractor) .build() .unwrap(); // Path (strips query params) - span name: "GET /users/123" let layer = HTTPLayerBuilder::builder() .with_route_extractor(PathExtractor) .build() .unwrap(); // Custom function - return Some(route) or None for method-only let layer = HTTPLayerBuilder::builder() .with_route_extractor_fn(|req: &http::Request<_>| { Some(req.uri().path().to_owned()) }) .build() .unwrap();API Changes
Before:
use opentelemetry_instrumentation_tower::HTTPMetricsLayerBuilder; let layer = HTTPMetricsLayerBuilder::builder() .with_meter(meter) .build() .unwrap();After:
use opentelemetry_instrumentation_tower::HTTPLayer; // Set global providers global::set_meter_provider(meter_provider); global::set_tracer_provider(tracer_provider); // for tracing support // Then create the layer - simple API using global providers let layer = HTTPLayer::new();Type Name Changes
- Replace
HTTPMetricsLayerBuilderwithHTTPLayerBuilder - Replace
HTTPMetricsLayerwithHTTPLayer - Replace
HTTPMetricsServicewithHTTPService - Replace
HTTPMetricsResponseFuturewithResponseFuture
-
0.17.002 Apr 2025Release notes
Open source →DatadogExporter.export()doesn't require mutability anymore- Bump opentelemetry and opentelemetry_sdk versions to 0.29
- Bump opentelemetry-http and opentelemetry-semantic-conventions versions to 0.29
Release notes
Open source →Changed
- Update to OpenTelemetry v0.31
- Migrate to use
opentelemetry-semantic-conventionspackage for metric names and attribute keys instead of hardcoded strings - Add dependency on otel semantic conventions crate and use constants from it instead of hardcoded attribute names. The
values are unchanged
HTTP_SERVER_ACTIVE_REQUESTS_METRICnow usessemconv::metric::HTTP_SERVER_ACTIVE_REQUESTSHTTP_SERVER_REQUEST_BODY_SIZE_METRICnow usessemconv::metric::HTTP_SERVER_REQUEST_BODY_SIZEHTTP_SERVER_RESPONSE_BODY_SIZE_METRICnow usessemconv::metric::HTTP_SERVER_RESPONSE_BODY_SIZEHTTP_SERVER_DURATION_METRICnow usessemconv::metric::HTTP_SERVER_REQUEST_DURATION
- Update attribute keys to use semantic conventions constants:
NETWORK_PROTOCOL_NAME_LABELnow usessemconv::attribute::NETWORK_PROTOCOL_NAMEHTTP_REQUEST_METHOD_LABELnow usessemconv::attribute::HTTP_REQUEST_METHODHTTP_ROUTE_LABELnow usessemconv::attribute::HTTP_ROUTEHTTP_RESPONSE_STATUS_CODE_LABELnow usessemconv::attribute::HTTP_RESPONSE_STATUS_CODE
Added
- Add comprehensive test coverage for all HTTP server metrics with attribute validation
-
0.16.011 Feb 2025Release notes
Open source →- Bump mvrv to 1.75.0
- Bump opentelemetry and opentelemetry_sdk versions to 0.28
- Bump opentelemetry-http and opentelemetry-semantic-conventions versions to 0.28
- Bump thiserror to 2.0
- [Breaking] Replace
opentelemetry::global::shutdown_tracer_provider()withtracer_provider.shutdown()(original PR opentelemetry-rust#2369) - [Breaking]
DatadogPipelineBuilder::install_simple()andDatadogPipelineBuilder::install_batch()now returnTracerProvider. Additionally, global tracer provider now needs to be set by the user by callingglobal::set_tracer_provider(tracer_provider.clone())(original PR opentelemetry-rust#1812)
Release notes
Open source →Initial release of OpenTelemetry Tower instrumentation middleware for HTTP metrics collection.
Added
- HTTP server metrics middleware for Tower-compatible services
- Support for Axum framework via
axumfeature flag - Metrics collection for:
http.server.request.duration- Request duration histogramhttp.server.active_requests- Active requests counterhttp.server.request.body.size- Request body size histogramhttp.server.response.body.size- Response body size histogram
- Configurable request duration histogram boundaries
- Custom request and response attribute extractors
- Automatic protocol version, HTTP method, URL scheme, and status code labeling
- Route extraction for Axum applications
-
0.15.026 Nov 2024Release notes
Open source →Changed
- Bump opentelemetry and opentelemetry_sdk versions to 0.27
- Bump opentelemetry-http and opentelemetry-semantic-conventions versions to 0.27
-
0.14.029 Oct 2024Release notes
Open source →Changed
- Bump opentelemetry and opentelemetry_sdk versions to 0.26
- Bump opentelemetry-http and opentelemetry-semantic-conventions versions to 0.26
- Remove unused itertools dependency
-
0.13.030 Sep 2024 -
0.12.002 Aug 2024Release notes
Open source →Changed
- Bump opentelemetry and opentelemetry_sdk version to 0.24
- Bump hyper to version 1
-
0.11.021 Jun 2024Nothing published for this version
-
0.10.027 Feb 2024Release notes
Open source →Added
- Pass DD_GIT_REPOSITORY_URL and DD_GIT_COMMIT_SHA during build
Changed
- Bump opentelemetry version to 0.22, opentelemetry_sdk version to 0.22
Changed
- allow send all traces to
datadog-agentwithagent-samplingfeature. - allow
datadog-agentgenerate metrics from spans for APM.
-
0.9.006 Nov 2023Release notes
Open source →Changed
Fixed
- Do not set an empty span as the active span when the propagator does not find a remote span.
- Change type signature of
with_http_client()to use the provided generic as argument.
-
0.8.030 Jul 2023Release notes
Open source →Changed
- Update to opentelemetry-api v0.20.0
Fixed
- Fix the array encoding length of datadog version 05 exporter #1002
-
0.7.026 Mar 2023 -
0.6.013 Sep 2022Release notes
Open source →Changed
- Allow custom mapping #770
- Update to opentelemetry v0.18.0
- Update to opentelemetry-http v0.7.0
- Update to opentelemetry-semantic-conventions v0.10.0
- Parse config endpoint to remove tailing slash #787
- Add sampling priority tag in spans #792
-
0.5.022 Jan 2022Release notes
Open source →Changed
- Update to opentelemetry v0.17.0
- Update to opentelemetry-http v0.6.0
- Update to opentelemetry-semantic-conventions v0.9.0
-
0.4.007 Aug 2021 -
0.3.124 Jun 2021 -
0.3.017 Jun 2021 -
0.2.010 May 2021Release notes
Open source →Changed
- Disable optional features for reqwest
- Remove default surf features #546
- Update to opentelemetry v0.14.0
-
0.1.024 Mar 2021Release notes
Open source →Added
- Datadog exporter #446
- Datadog propagator #440
Changed
- Rename trace config with_default_sampler to with_sampler #482