Skip to content

[receiver/datadog] Make gRPC, HTTP, and AWS-SDK spans compliant with the OTel Semconv#44702

Merged
MovieStoreGuy merged 12 commits intoopen-telemetry:mainfrom
cyrille-leclerc:dd-receiver-rpc-spans
Dec 4, 2025
Merged

[receiver/datadog] Make gRPC, HTTP, and AWS-SDK spans compliant with the OTel Semconv#44702
MovieStoreGuy merged 12 commits intoopen-telemetry:mainfrom
cyrille-leclerc:dd-receiver-rpc-spans

Conversation

@cyrille-leclerc
Copy link
Member

@cyrille-leclerc cyrille-leclerc commented Dec 2, 2025

Description

  • gRPC: Make client & server gRPC spans compliant with the OTel Semconv
  • HTTP: Make http.request and web.request span names compliant with OTel semconv
  • Database: Compliance improvements on database client call spans received via the Datadog receiver:
    • The db.instance tag is now mapped to the OTel attribute db.namespace instead of db.collection.name.
    • The db.sql.table tag is mapped to the OTel attribute db.collection.name.
    • The db.statement tag is mapped to the OTel attribute db.query.text.
  • AWS SDK: Improve the compliance with OTel Semantic Conventions for AWS SDK spans in the Datadog receiver.
    • Set span name according to AWS SDK conventions.
    • Set rpc.system, rpc.method and rpc.service attributes.
  • Bump OTel Semantic Conventions from v1.30.0 to v1.37.0 in the Datadog receiver.
    • The Datadog tag runtime is now mapped to the OTel attribute container.runtime.name instead of container.runtime.

Link to tracking issue

Fixes:

Testing

End to end test with dd-trace-java

gRPC span

image

HTTP request span

image

Documentation

Copy link
Contributor

@dehaansa dehaansa left a comment

Choose a reason for hiding this comment

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

One question, and needs a changelog, otherwise LGTM

func processGRPCSpan(span *pb.Span, newSpan *ptrace.Span) {
// ddSpan.Attributes["grpc.status.code"] contains the gRPC status code name (eg "OK")
// not the numeric value (eg "0")
// it's ddSpan.error that indicates whether the status code value
Copy link
Contributor

Choose a reason for hiding this comment

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

(nit) this seems to be missing a word

Copy link
Member Author

Choose a reason for hiding this comment

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

fixed

@cyrille-leclerc
Copy link
Member Author

As seen with @xiu , does work with RPC spans produced by dd-trace-java that use slightly different span tags

@cyrille-leclerc cyrille-leclerc marked this pull request as ready for review December 3, 2025 15:39
@cyrille-leclerc cyrille-leclerc requested review from a team and MovieStoreGuy as code owners December 3, 2025 15:39
@cyrille-leclerc
Copy link
Member Author

Build failing due to flaky tests that are not related to this PR

FAIL	github.com/open-telemetry/opentelemetry-collector-contrib/processor/k8sattributesprocessor	410.594s

@cyrille-leclerc cyrille-leclerc changed the title [receiver/datadog] Make client & server gRPC spans compliant with the OTel Semconv [receiver/datadog] Make client & server gRPC & HTTP spans compliant with the OTel Semconv Dec 3, 2025
@cyrille-leclerc cyrille-leclerc requested a review from xiu December 3, 2025 17:33
@cyrille-leclerc cyrille-leclerc changed the title [receiver/datadog] Make client & server gRPC & HTTP spans compliant with the OTel Semconv [receiver/datadog] Make gRPC, HTTP, and AWS-SDK spans compliant with the OTel Semconv Dec 3, 2025
@@ -0,0 +1,30 @@
# Use this changelog template to create an entry for release notes.
Copy link
Contributor

Choose a reason for hiding this comment

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

You are adding changelogs from other PRs or something.

Copy link
Member Author

Choose a reason for hiding this comment

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

This PR contains several distinct but related improvements so I created multiple change log files.

Copy link
Contributor

@dehaansa dehaansa left a comment

Choose a reason for hiding this comment

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

LGTM. I don't have a strong opinion on multiple changelogs from one PR, I don't see anything in the contributing.md that explicitly states only one per PR, seems like added clarity is always good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants