src: Use new BinaryPropagator methods in opentelemetry_contrib/0.10.
This commit is contained in:
parent
8b49005b57
commit
1e805d8bf3
2 changed files with 2 additions and 2 deletions
|
@ -162,7 +162,7 @@ impl ClientConn {
|
||||||
.with_kind(SpanKind::Client)
|
.with_kind(SpanKind::Client)
|
||||||
.start(&tracer);
|
.start(&tracer);
|
||||||
let propagator = BinaryPropagator::new();
|
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 {
|
} else {
|
||||||
let telemetry_id: Bytes = Bytes::new();
|
let telemetry_id: Bytes = Bytes::new();
|
||||||
}
|
}
|
||||||
|
|
|
@ -142,7 +142,7 @@ impl ServerConn {
|
||||||
|
|
||||||
let mut span = if !req_enc.telemetry_id.is_empty() {
|
let mut span = if !req_enc.telemetry_id.is_empty() {
|
||||||
let propagator = BinaryPropagator::new();
|
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);
|
let context = Context::new().with_remote_span_context(context);
|
||||||
tracer.span_builder(format!(">> RPC {}", path))
|
tracer.span_builder(format!(">> RPC {}", path))
|
||||||
.with_kind(SpanKind::Server)
|
.with_kind(SpanKind::Server)
|
||||||
|
|
Loading…
Reference in a new issue