Skip to content

Commit

Permalink
Simplify tracing-grpc example
Browse files Browse the repository at this point in the history
  • Loading branch information
utpilla committed Jun 17, 2024
1 parent 3e49f23 commit 7a6a153
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/tracing-grpc/src/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ pub mod hello_world {
async fn greet() -> Result<(), Box<dyn std::error::Error + Send + Sync + 'static>> {
let tracer = global::tracer("example/client");
let span = tracer
.span_builder(String::from("Greeter/client"))
.span_builder("Greeter/client")
.with_kind(SpanKind::Client)
.with_attributes(vec![KeyValue::new("component", "grpc")])
.with_attributes([KeyValue::new("component", "grpc")])
.start(&tracer);
let cx = Context::current_with_span(span);
let mut client = GreeterClient::connect("http://[::1]:50051").await?;
Expand Down

0 comments on commit 7a6a153

Please sign in to comment.