frigus02 / opentelemetry-application-insights

OpenTelemetry exporter for Azure Application Insights
MIT License
22 stars 12 forks source link

How to deal with cargo features of HTTP client crates? #51

Open frigus02 opened 2 years ago

frigus02 commented 2 years ago

opentelemetry-application-insights requires users to bring an HTTP client. opentelemetry-http brings implementations for reqwest, surf and isahc currently. But users are free to implement the corresponding trait for other HTTP clients, too. Each HTTP client crate may have cargo features.

opentelemetry-application-insights started adding "proxy" features for some reqwest features: https://github.com/frigus02/opentelemetry-application-insights/blob/1e5727a79c6d59631d640854879e05116cd1bc87/Cargo.toml#L29-L30

But doing that for all clients and all their features doesn't seem maintainable.

I would like to: