@@ -65,7 +65,7 @@ pub fn get_otel_operation_name_v2(span: &impl OtelSpan) -> Cow<'static, str> {
65
65
SpanKind :: Client | SpanKind :: Server | SpanKind :: Consumer | SpanKind :: Producer
66
66
)
67
67
{
68
- return Cow :: Owned ( format ! ( "{}.{}" , messaging_system , messaging_operation ) . to_lowercase ( ) ) ;
68
+ return Cow :: Owned ( format ! ( "{messaging_system }.{messaging_operation}" ) . to_lowercase ( ) ) ;
69
69
}
70
70
71
71
// RPC & AWS
@@ -91,7 +91,7 @@ pub fn get_otel_operation_name_v2(span: &impl OtelSpan) -> Cow<'static, str> {
91
91
let faas_invoked_name = span. get_attr_str ( FAAS_INVOKED_NAME ) ;
92
92
if is_client && !faas_invoked_provider. is_empty ( ) && !faas_invoked_name. is_empty ( ) {
93
93
return Cow :: Owned (
94
- format ! ( "{}.{}.invoke" , faas_invoked_provider , faas_invoked_name ) . to_lowercase ( ) ,
94
+ format ! ( "{faas_invoked_provider }.{faas_invoked_name }.invoke" ) . to_lowercase ( ) ,
95
95
) ;
96
96
}
97
97
@@ -147,7 +147,7 @@ pub fn get_otel_resource_v2(span: &impl OtelSpan) -> Cow<'static, str> {
147
147
if matches ! ( span. span_kind( ) , SpanKind :: Server ) {
148
148
let route = get_res_span_attributes ( span, & [ HTTP_ROUTE ] ) ;
149
149
if !route. is_empty ( ) {
150
- return Cow :: Owned ( format ! ( "{} {}" , m , route ) ) ;
150
+ return Cow :: Owned ( format ! ( "{m } {route}" ) ) ;
151
151
}
152
152
}
153
153
return m;
@@ -159,7 +159,7 @@ pub fn get_otel_resource_v2(span: &impl OtelSpan) -> Cow<'static, str> {
159
159
let messaging_destination =
160
160
get_res_span_attributes ( span, & [ MESSAGING_DESTINATION , MESSAGING_DESTINATION_NAME ] ) ;
161
161
if !messaging_destination. is_empty ( ) {
162
- res_name = Cow :: Owned ( format ! ( "{} {}" , res_name , messaging_destination ) ) ;
162
+ res_name = Cow :: Owned ( format ! ( "{res_name } {messaging_destination}" ) ) ;
163
163
}
164
164
return res_name;
165
165
}
@@ -169,7 +169,7 @@ pub fn get_otel_resource_v2(span: &impl OtelSpan) -> Cow<'static, str> {
169
169
let mut res_name = rpc_method;
170
170
let rpc_service = get_res_span_attributes ( span, & [ RPC_SERVICE ] ) ;
171
171
if !rpc_service. is_empty ( ) {
172
- res_name = Cow :: Owned ( format ! ( "{} {}" , res_name , rpc_service ) ) ;
172
+ res_name = Cow :: Owned ( format ! ( "{res_name } {rpc_service}" ) ) ;
173
173
}
174
174
return res_name;
175
175
}
@@ -179,7 +179,7 @@ pub fn get_otel_resource_v2(span: &impl OtelSpan) -> Cow<'static, str> {
179
179
let mut res_name = graphql_operation_type;
180
180
let graphql_operation_name = get_res_span_attributes ( span, & [ GRAPHQL_OPERATION_NAME ] ) ;
181
181
if !graphql_operation_name. is_empty ( ) {
182
- res_name = Cow :: Owned ( format ! ( "{} {}" , res_name , graphql_operation_name ) ) ;
182
+ res_name = Cow :: Owned ( format ! ( "{res_name } {graphql_operation_name}" ) ) ;
183
183
}
184
184
return res_name;
185
185
}
@@ -399,7 +399,7 @@ pub fn get_dd_key_for_otlp_attribute(k: &str) -> BorrowedString {
399
399
return BorrowedString :: Static ( mapped_key) ;
400
400
}
401
401
if let Some ( suffix) = k. strip_prefix ( "http.request.header." ) {
402
- return BorrowedString :: Owned ( format ! ( "http.request.headers.{}" , suffix ) ) ;
402
+ return BorrowedString :: Owned ( format ! ( "http.request.headers.{suffix}" ) ) ;
403
403
}
404
404
if is_datadog_convention_key ( k) {
405
405
return BorrowedString :: Static ( "" ) ;
0 commit comments