@@ -363,12 +363,18 @@ impl TraceAgent {
363363 }
364364 }
365365 request_builder = request_builder. header ( "DD-API-KEY" , & config. api_key ) ;
366- request_builder = request_builder. header ( "X-Datadog-Additional-Tags" , format ! ( "_dd.origin:lambda;functionname:{}" , env:: var( "AWS_LAMBDA_FUNCTION_NAME" ) . unwrap_or_default( ) ) ) ;
366+ request_builder = request_builder. header (
367+ "X-Datadog-Additional-Tags" ,
368+ format ! (
369+ "_dd.origin:lambda;functionname:{}" ,
370+ env:: var( "AWS_LAMBDA_FUNCTION_NAME" ) . unwrap_or_default( )
371+ ) ,
372+ ) ;
367373 let response = match request_builder. body ( body_bytes) . send ( ) . await {
368374 Ok ( resp) => resp,
369375 Err ( err) => {
370376 return log_and_create_http_response (
371- & format ! ( "Error sending request to {} backend: {err}" , error_context ) ,
377+ & format ! ( "Error sending request to {error_context } backend: {err}" ) ,
372378 StatusCode :: BAD_GATEWAY ,
373379 ) ;
374380 }
@@ -391,7 +397,9 @@ impl TraceAgent {
391397 Ok ( bytes) => bytes,
392398 Err ( err) => {
393399 return log_and_create_http_response (
394- & format ! ( "Error reading response from {} backend: {err}" , error_context) ,
400+ & format ! (
401+ "Error reading response from {error_context} backend: {err}"
402+ ) ,
395403 StatusCode :: BAD_GATEWAY ,
396404 ) ;
397405 }
@@ -411,7 +419,14 @@ impl TraceAgent {
411419 config : Arc < config:: Config > ,
412420 req : Request < Body > ,
413421 ) -> http:: Result < Response < Body > > {
414- Self :: handle_proxy ( config, req, "intake.profile" , PROFILING_BACKEND_PATH , "profiling" ) . await
422+ Self :: handle_proxy (
423+ config,
424+ req,
425+ "intake.profile" ,
426+ PROFILING_BACKEND_PATH ,
427+ "profiling" ,
428+ )
429+ . await
415430 }
416431
417432 #[ must_use]
0 commit comments