-
I'd like to skip tracing of certain methods. I cannot see how this can be done as
let trace_layer = TraceLayer::new(SharedClassifier::new(GrpcErrorsAsFailures::new()))
.make_span_with(|request: &http::Request<_>| {
tracing::info_span!(
"request",
otel.name = format!("{} {}", request.method(), request.uri().path()),
method = %request.method(),
uri = %request.uri(),
version = ?request.version(),
)
})
.on_request(DefaultOnRequest::default().level(Level::INFO))
.on_response(DefaultOnResponse::default().level(Level::INFO))
.on_eos(DefaultOnEos::default().level(Level::INFO))
.on_failure(DefaultOnFailure::default().level(Level::ERROR)); |
Beta Was this translation helpful? Give feedback.
Answered by
jplatte
Sep 28, 2024
Replies: 1 comment
-
You can return |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lcmgh
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You can return
Span::none
.