Skip to content

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

@frigus02

Description

@frigus02

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:

reqwest-client-vendored-tls = ["opentelemetry-http/reqwest", "reqwest/native-tls-vendored"]
reqwest-client-rustls = ["opentelemetry-http/reqwest", "reqwest/rustls-tls"]

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

I would like to:

  • Figure out how users are supposed to enable features for the HTTP client crate of their choosing.
  • Make this clear through documentation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions