aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex <alex@adnab.me>2022-09-26 16:57:37 +0200
committerAlex <alex@adnab.me>2022-09-26 16:57:37 +0200
commitea7a571d883fcf40822ccd265e4975ac607b234a (patch)
treed5f0f052e805b9b8cce89de5ccd2ca4cf39f2bf4
parentaf2b2f26b4bd9fcdeedf2cd03f9e1392e5781abc (diff)
parent1778e4b3187af979cd67098e555455be422c9500 (diff)
downloadgarage-ea7a571d883fcf40822ccd265e4975ac607b234a.tar.gz
garage-ea7a571d883fcf40822ccd265e4975ac607b234a.zip
Merge pull request 'Fix span name for api server requests' (#392) from fix-span-name into main
Reviewed-on: https://git.deuxfleurs.fr/Deuxfleurs/garage/pulls/392
-rw-r--r--src/api/generic_server.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/api/generic_server.rs b/src/api/generic_server.rs
index a48be1bc..62fe4e5a 100644
--- a/src/api/generic_server.rs
+++ b/src/api/generic_server.rs
@@ -174,7 +174,11 @@ impl<A: ApiHandler> ApiServer<A> {
let current_context = Context::current();
let current_span = current_context.span();
- current_span.update_name::<String>(format!("S3 API {}", endpoint.name()));
+ current_span.update_name::<String>(format!(
+ "{} API {}",
+ A::API_NAME_DISPLAY,
+ endpoint.name()
+ ));
current_span.set_attribute(KeyValue::new("endpoint", endpoint.name()));
endpoint.add_span_attributes(current_span);