Skip to content

Honor the sampling flag in traceparent header for OpenTelemetry tracing #8474

@verdie-g

Description

@verdie-g

Is your feature request related to a problem? Please describe.

When using OpenTelemetry tracing, Triton currently ignores the sampling flag ("sampled" bit) in the W3C traceparent header. This means that even when a client sets the sampling flag to 0 (not sampled), Triton will still record and export traces for those requests.

Describe the solution you'd like

Triton reads the sampled flag in the traceparent and stops sending spans for not sampled traces.

Describe alternatives you've considered

The client could stop the tracing propagation when it calls Triton from a not sampled trace but this can be tricky because clients are usually auto-instrumented. Additionally, this is not the OpenTelemetry way. You want to propagate the tracing context even if the trace is not sampled, for example to be able to include the trace id in the logs.

Additional context

Metadata

Metadata

Assignees

Labels

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions