-
-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Hi!
I use your library to instrument my gRPC service, so great thanks for delivering and maintaining the lib!
I wonder if this condition should log warning:
tracing-opentelemetry-instrumentation-sdk/tonic-tracing-opentelemetry/src/middleware/server.rs
Lines 82 to 85 in 5925051
| let span = if self.filter.is_none_or(|f| f(req.uri().path())) { | |
| let span = otel_http::grpc_server::make_span_from_request(&req); | |
| if let Err(error) = span.set_parent(otel_http::extract_context(req.headers())) { | |
| tracing::warn!(?error, "can not set parent trace_id to span"); |
If there is an external call from gRPC client that is not properly instrumented and does not pass the "parent span", then the the code here would log a warning, where in fact the warning is not really actionable. This seems "fine" to just carry on without setting the parent span, if the span is not delivered in the request context.
I would change tracing::warn! to tracing::debug!, since this log might be useful for debugging, but not for day-to-day operation.
What do you think?