The Datadog Rust SDK is in Preview.

The Rust SDK does not provide automatic instrumentation. Tracing is achieved by manually instrumenting your application using the OpenTelemetry API.

Overview

Datadog provides tracing support for Rust applications through the datadog-opentelemetry crate, which is built on the OpenTelemetry (OTel) API and SDK.

To get started, make sure you have installed and configured the Datadog Agent.

Instrumentation

The Datadog Rust SDK does not provide automatic instrumentation.

You must manually instrument your application using the OpenTelemetry API. This includes:

  • Creating spans for functions or operations.
  • Adding attributes (tags) and events to spans.
  • Manually propagating trace context for distributed traces.

For examples, see the Rust Custom Instrumentation documentation.

Configuration

The Rust SDK can be configured using environment variables. For a full list of options, see the Library Configuration documentation.

Compatibility

The Rust SDK requires a Minimum Supported Rust Version (MSRV) and specific OpenTelemetry library versions. For a full list of compatibility requirements, see the Compatibility Requirements page.

Further reading

Additional helpful documentation, links, and articles: