You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-08-10 15:23:07 +03:00
Use OTEL semantic conventions constants for most attributes
This commit is contained in:
@@ -22,6 +22,7 @@ use mas_tower::{
|
||||
DurationRecorderLayer, DurationRecorderService, FnWrapper, InFlightCounterLayer,
|
||||
InFlightCounterService, TraceLayer, TraceService,
|
||||
};
|
||||
use opentelemetry_semantic_conventions::trace::SERVER_ADDRESS;
|
||||
use tower::Layer;
|
||||
use tracing::Span;
|
||||
|
||||
@@ -54,9 +55,10 @@ where
|
||||
let trace_layer = TraceLayer::from_fn(
|
||||
(|request: &Name| {
|
||||
tracing::info_span!(
|
||||
"dns.resolve",
|
||||
"dns.lookup",
|
||||
"otel.kind" = "client",
|
||||
"net.host.name" = %request,
|
||||
{ SERVER_ADDRESS } = %request,
|
||||
|
||||
)
|
||||
}) as fn(&Name) -> Span,
|
||||
);
|
||||
|
Reference in New Issue
Block a user