@@ -41,7 +41,7 @@ async fn handle_health_check(
4141 _req : Request < Incoming > ,
4242) -> Result < Response < BoxBody < Bytes , hyper:: Error > > , Infallible > {
4343 let tracer = get_tracer ( ) ;
44- let _span = tracer
44+ let _ = tracer
4545 . span_builder ( "health_check" )
4646 . with_kind ( SpanKind :: Internal )
4747 . start ( tracer) ;
@@ -61,7 +61,7 @@ async fn handle_echo(
6161 req : Request < Incoming > ,
6262) -> Result < Response < BoxBody < Bytes , hyper:: Error > > , Infallible > {
6363 let tracer = get_tracer ( ) ;
64- let _span = tracer
64+ let _ = tracer
6565 . span_builder ( "echo" )
6666 . with_kind ( SpanKind :: Internal )
6767 . start ( tracer) ;
@@ -77,9 +77,6 @@ async fn router(
7777) -> Result < Response < BoxBody < Bytes , hyper:: Error > > , Infallible > {
7878 // Extract the context from the incoming request headers
7979 let parent_cx = extract_context_from_request ( & req) ;
80- for bag in parent_cx. baggage ( ) {
81- println ! ( "Baggage: {:?} = {:?}" , bag. 0 , bag. 1 ) ;
82- }
8380 let response = {
8481 // Create a span parenting the remote client span.
8582 let tracer = get_tracer ( ) ;
@@ -107,6 +104,8 @@ async fn router(
107104 response
108105}
109106
107+ /// A custom log processor that enriches LogRecords with baggage attributes.
108+ /// Baggage information is not added automatically without this processor.
110109#[ derive( Debug ) ]
111110struct EnrichWithBaggageLogProcessor ;
112111impl LogProcessor for EnrichWithBaggageLogProcessor {
@@ -127,6 +126,8 @@ impl LogProcessor for EnrichWithBaggageLogProcessor {
127126 }
128127}
129128
129+ /// A custom span processor that enriches spans with baggage attributes. Baggage
130+ /// information is not added automatically without this processor.
130131#[ derive( Debug ) ]
131132struct EnrichWithBaggageSpanProcessor ;
132133impl SpanProcessor for EnrichWithBaggageSpanProcessor {
0 commit comments