Fix span kind for RPC client side

This commit is contained in:
Alex 2022-04-07 10:31:37 +02:00
parent b1425230cc
commit faecefc7a8
Signed by untrusted user: lx
GPG key ID: 0E496D15096376BE
3 changed files with 3 additions and 3 deletions

2
Cargo.lock generated
View file

@ -433,7 +433,7 @@ dependencies = [
[[package]] [[package]]
name = "netapp" name = "netapp"
version = "0.4.0" version = "0.4.1"
dependencies = [ dependencies = [
"arc-swap", "arc-swap",
"async-trait", "async-trait",

View file

@ -1,6 +1,6 @@
[package] [package]
name = "netapp" name = "netapp"
version = "0.4.1" version = "0.4.2"
authors = ["Alex Auvolat <alex@adnab.me>"] authors = ["Alex Auvolat <alex@adnab.me>"]
edition = "2018" edition = "2018"
license-file = "LICENSE" license-file = "LICENSE"

View file

@ -156,7 +156,7 @@ impl ClientConn {
if #[cfg(feature = "telemetry")] { if #[cfg(feature = "telemetry")] {
let tracer = opentelemetry::global::tracer("netapp"); let tracer = opentelemetry::global::tracer("netapp");
let mut span = tracer.span_builder(format!("RPC >> {}", path)) let mut span = tracer.span_builder(format!("RPC >> {}", path))
.with_kind(SpanKind::Server) .with_kind(SpanKind::Client)
.start(&tracer); .start(&tracer);
let propagator = BinaryPropagator::new(); let propagator = BinaryPropagator::new();
let telemetry_id = Some(propagator.to_bytes(span.span_context()).to_vec()); let telemetry_id = Some(propagator.to_bytes(span.span_context()).to_vec());