tower-http icon indicating copy to clipboard operation
tower-http copied to clipboard

`tower_http::trace` doc clarification regarding ingestion of parent spans from incoming requests

Open lcmgh opened this issue 1 year ago • 3 comments

Does https://docs.rs/tower-http/latest/tower_http/trace/index.html also take care of ingesting the parent span/trace id from incoming requests to basically enable cross-service tracing?

That is not clear to me when reading the docs.

lcmgh avatar Sep 05 '24 08:09 lcmgh

No, it doesn't.

jplatte avatar Sep 05 '24 08:09 jplatte

okay, that's probably why https://github.com/davidB/tracing-opentelemetry-instrumentation-sdk/tree/main/tonic-tracing-opentelemetry exists

What I understand is that tower_http::trace exists to get request/response traces and tonic-tracing-opentelemetry crate exists to get the span connection to parent trace ids from incoming requests and not to log request/Response data?

lcmgh avatar Sep 05 '24 09:09 lcmgh

Hi @jplatte, would you be OK with this feature potentially existing? I could try my hands at adding this as part of a PR

FalkWoldmann avatar Sep 11 '25 15:09 FalkWoldmann