First of all, thank you for making this crate!
Bug description
When using reqwest-tracing without any of the opentelemetry features enabled, the crate still contains quite a bit of code related to and crates needed for opentelemetry. Example of crates are matchit, which does routing.
To Reproduce
The easiest example I can find:
- Create a new crate
- Add
reqwest-tracing as dependency without any enabled features.
- Check
Cargo.lock and notice it contains matchit (for routing logic).
Expected behavior
I would expect the crate to be slimmer and contain only the required dependencies needed to get tracing working.
Environment
reqwest-tracing: 0.5.4
rustc: 1.83.0
Additional context
After inspecting the code I understand that "simply not adding it" isn't as easy as it sounds and that this might not be solved in the near future. Hence might I mention, as food for thought, that splitting the opentelemetry logic of reqwest-tracing into a separate reqwest-opentelemetry crate might be a method to make this simpler?
On the other hand I can also imagine that I am not fully understanding the codebase (as I've just looked through it after noticing the matchit dep), so I might be fully wrong here. Please let me know so and feel free to close this if that's the case!
First of all, thank you for making this crate!
Bug description
When using
reqwest-tracingwithout any of theopentelemetryfeatures enabled, the crate still contains quite a bit of code related to and crates needed foropentelemetry. Example of crates arematchit, which does routing.To Reproduce
The easiest example I can find:
reqwest-tracingas dependency without any enabled features.Cargo.lockand notice it containsmatchit(for routing logic).Expected behavior
I would expect the crate to be slimmer and contain only the required dependencies needed to get
tracingworking.Environment
reqwest-tracing:0.5.4rustc:1.83.0Additional context
After inspecting the code I understand that "simply not adding it" isn't as easy as it sounds and that this might not be solved in the near future. Hence might I mention, as food for thought, that splitting the
opentelemetrylogic ofreqwest-tracinginto a separatereqwest-opentelemetrycrate might be a method to make this simpler?On the other hand I can also imagine that I am not fully understanding the codebase (as I've just looked through it after noticing the
matchitdep), so I might be fully wrong here. Please let me know so and feel free to close this if that's the case!