From da368d4085bcc3bbc8c3b2932a07827bc600dbbd Mon Sep 17 00:00:00 2001 From: Utkarsh Umesan Pillai <66651184+utpilla@users.noreply.github.com> Date: Mon, 17 Jun 2024 15:55:13 -0700 Subject: [PATCH] Simplify tracing-grpc example (#1886) --- examples/tracing-grpc/src/client.rs | 10 ++++------ examples/tracing-http-propagator/src/client.rs | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/examples/tracing-grpc/src/client.rs b/examples/tracing-grpc/src/client.rs index c35dee079e..38a7c93f92 100644 --- a/examples/tracing-grpc/src/client.rs +++ b/examples/tracing-grpc/src/client.rs @@ -50,9 +50,9 @@ pub mod hello_world { async fn greet() -> Result<(), Box> { 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?; @@ -75,10 +75,8 @@ async fn greet() -> Result<(), Box