src: Use new BinaryPropagator methods in opentelemetry_contrib/0.10.

This commit is contained in:
Jonathan Davies 2023-01-31 13:45:43 +00:00
parent 14ba9a811f
commit c034bdedfe
2 changed files with 2 additions and 2 deletions

View file

@ -162,7 +162,7 @@ impl ClientConn {
.with_kind(SpanKind::Client)
.start(&tracer);
let propagator = BinaryPropagator::new();
let telemetry_id: Bytes = propagator.to_bytes(span.span_context()).to_vec().into();
let telemetry_id: Bytes = propagator.serialize_into_bytes(span.span_context()).to_vec().into();
} else {
let telemetry_id: Bytes = Bytes::new();
}

View file

@ -142,7 +142,7 @@ impl ServerConn {
let mut span = if !req_enc.telemetry_id.is_empty() {
let propagator = BinaryPropagator::new();
let context = propagator.from_bytes(req_enc.telemetry_id.to_vec());
let context = propagator.deserialize_from_bytes(req_enc.telemetry_id.to_vec());
let context = Context::new().with_remote_span_context(context);
tracer.span_builder(format!(">> RPC {}", path))
.with_kind(SpanKind::Server)