Fix span name for api server requests

This commit is contained in:
Alex Auvolat 2022-09-26 16:20:30 +02:00
parent af2b2f26b4
commit 1778e4b318
No known key found for this signature in database
GPG Key ID: 0E496D15096376BE

View File

@ -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);