open-telemetry / opentelemetry-rust

The Rust OpenTelemetry implementation

Home Page:https://opentelemetry.io

Repository from Github https://github.comopen-telemetry/opentelemetry-rustRepository from Github https://github.comopen-telemetry/opentelemetry-rust

SpanBuilder should not allow with_span_id and with_trace_id

cijothomas opened this issue · comments

https://github.com/open-telemetry/opentelemetry-rust/blob/main/opentelemetry/src/trace/tracer.rs#L242
with_trace_id, with_span_id allow one to specify TraceId,SpanId via builder - there is no such capability in the specification.
If user want to control traceid,spanid generation, they can use IdGenerator.

This must be removed from SpanBuilder

@cijothomas I'd like to take this issue (and perhaps similar issues you put above).
Do I need to do anything other than just removing those methods from SpanBuilder?
It looks that there is no place which uses them in this repository.

This may have same dependency breaking issue as #2753 (comment)

If tracing-opentelemetry is not dependent on this, then we can remove it right away.