open-telemetry / opentelemetry-rust

The Rust OpenTelemetry implementation
https://opentelemetry.io
Apache License 2.0
1.71k stars 386 forks source link

SpanContext should implement serde::Serialize, Deserialize #1074

Open shaun-cox opened 1 year ago

shaun-cox commented 1 year ago

Per Rust API Guidelines for Interoperability I think SpanContext should implement serde::Serialize and Deserialize.

I'll see about making this contribution myself, but wanted to open the issue in case there is disagreement with the approach. (From my understanding, we want to prefer idiomatic usage of the language features for the API.) This will help me and others in building domain-specific propagators ala .with_remote_span_context.

djc commented 1 year ago

Closing this in favor of discussion on #1075.

djc commented 1 year ago

Sorry, I missed that #1075 is the PR for fixing this.