adriangb opened a new issue, #528:
URL: https://github.com/apache/arrow-rs-object-store/issues/528

   I have an HTTP object store that supports distributed tracing.
   I would like the ObjectStore HTP client to propagate the trace context to 
this service.
   This would mean grabbing the trace context from `tracing` and putting it 
into HTTP headers.
   
   I see three paths forward:
   1. Add `ClientOptions::propagate_trace_context: bool` that configures it for 
you.
     a. Add `reqwest_middleware` as a non-feature flagged dep (see note 1) and 
add `reqwest_tracing` as a feature flagged dep and use its `TracingMiddleware`. 
The pro of this is that it's not much extra code or complexity, the con is 
extra deps / features.
     b. Implement [the spec for context 
propagation](https://www.w3.org/TR/trace-context/) ourselves to avoid any extra 
dependencies. The pro of this is no deps, the con is more code and possibly 
bugs.
   2. Add `reqwest_middleware` as a non-feature flagged dep  (see note 1) and 
expose a `ClientOptions ::with_middleware`. The con of this is that it locks us 
into `reqwest` as the backing http client and is more complexity for users. The 
pro is that it would be relatively little code for us.
   
   
   Note 1: I think it's going to be way too painful to be generic over 
`request::Client` and `reqwest_middleware::ClientWithMiddleware`, we should 
probably just add `reqwest_middleware` as a dependency if were going to use it 
at all.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to