Skip to content

[BUG]: Unsampled OTel spans are always dropped client-side #4624

Description

@sdwa0

Tracer Version(s)

2.6.0

Go Version(s)

go version go1.26.1 darwin/arm64

Bug Report

The OpenTelemetry implementation in dd-trace-go handles unsampled spans differently than the native Datadog tracer. The native tracer doesn't drop traces client-side (unless client-side stats computation is enabled), ensuring the trace agent always receives all traces and trace metrics are generated for 100% of generated traces. However, the OpenTelemetry implementation unconditionally drops unsampled spans (code), so they don't reach the trace agent, and trace metrics aren't generated out of them.

The OpenTelemetry SDK (the OTel implementation of the OTel API) drops unsampled traces client-side, but this is the Datadog implementation of the OpenTelemetry API, and it should match the native Datadog tracer contract.

Reproduction Code

No response

Error Logs

No response

Go Env Output

No response

Metadata

Metadata

Assignees

Labels

apm:corefixedThis is a bug that has been fixed.otel

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions