Skip to content

Conversation

@brett0000FF
Copy link
Contributor

@brett0000FF brett0000FF commented Nov 5, 2025

What does this PR do? What is the motivation?

Adds documentation for new Datadog Rust SDK, which is built on the OTel SDK.

TODO

  • Engineering review and update
  • Add Rust tile
  • Add Library Compatibility page?

Merge instructions

Merge readiness:

  • Ready for merge

For Datadog employees:

Your branch name MUST follow the <name>/<description> convention and include the forward slash (/). Without this format, your pull request will not pass CI, the GitLab pipeline will not run, and you won't get a branch preview. Getting a branch preview makes it easier for us to check any issues with your PR, such as broken links.

If your branch doesn't follow this format, rename it or create a new branch and PR.

[6/5/2025] Merge queue has been disabled on the documentation repo. If you have write access to the repo, the PR has been reviewed by a Documentation team member, and all of the required checks have passed, you can use the Squash and Merge button to merge the PR. If you don't have write access, or you need help, reach out in the #documentation channel in Slack.

Additional notes

@brett0000FF brett0000FF requested a review from a team as a code owner November 5, 2025 19:29
@brett0000FF brett0000FF marked this pull request as draft November 5, 2025 19:29
@github-actions github-actions bot added the Architecture Everything related to the Doc backend label Nov 6, 2025
fn do_work() {
let tracer = global::tracer("my-component");

tracer.in_span("operation_name", |span| {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tracer.in_span("operation_name", |span| {
tracer.in_span("operation_name", |cx| {

All the in_span calls have a context as parameter, and not a span.


## Unified Service Tagging

It is recommended to use `DD_ENV`, `DD_SERVICE`, and `DD_VERSION` to set `env`, `service`, and `version` for your services.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The full list of the configuration options and default values are now documented here https://github.com/DataDog/dd-trace-rs/blob/main/supported-configurations.json

use axum::http::HeaderMap;

// AXUM example
async fn axum_handler(headers: HeaderMap) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.with_kind(SpanKind::Server)
.start_with_context(tracer, &parent_cx);

// ... your handler logic ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably mention that you have to create a Context like this let cx = parent_cx.with_span(span); and then attach it either directly or around the future for async calls to make the span become the current span.

```toml
[dependencies]
# Provides HeaderInjector and HeaderExtractor
opentelemetry-http = "0.31"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This version should be kept in sync with the other OTel versions, or things will break.

@brett0000FF brett0000FF marked this pull request as ready for review November 12, 2025 23:37
@brett0000FF brett0000FF requested a review from a team as a code owner November 12, 2025 23:37
@brett0000FF brett0000FF added the editorial review Waiting on a more in-depth review label Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Architecture Everything related to the Doc backend editorial review Waiting on a more in-depth review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants