Custom Trace and Span IDs Generation #677
Labels
area:sdk
release:required-for-ga
To be resolved before GA release
spec-compliance
Not compliant to OpenTelemetry specs
Milestone
Custom IDs would allow users to set IDs that they need right at the beginning of a span. This is important if the downstream services or eventual backend that receives these spans need them to be in a certain format.
As per the specs:
https://github.com/open-telemetry/opentelemetry-specification/blob/b67faa4e0106cac194a837e3d419ae4fab9fc1c4/specification/trace/sdk.md#id-generators
The SDK MUST provide a mechanism for customizing the way IDs are generated for both the TraceId and the SpanId.
This is how other languages support it:
JS: https://github.com/open-telemetry/opentelemetry-js/blob/b7d6e74c5bec6a24f5d617d31402ea95c54f126f/packages/opentelemetry-core/src/trace/IdGenerator.ts
Java: https://github.com/open-telemetry/opentelemetry-java/blob/485cc52c6ff1bb3fa12cd950d6eb97d3ceae6e41/sdk/tracing/src/main/java/io/opentelemetry/sdk/trace/IdsGenerator.java
The text was updated successfully, but these errors were encountered: