metrics-rs / metrics

A metrics ecosystem for Rust.
MIT License
1.14k stars 159 forks source link

Make tls support optional and add rustls #418

Open nstinus opened 12 months ago

nstinus commented 12 months ago

Tls support was recently added by forcing the usage of openssl via hyper-tls. It means that either this lib is installed or it needs to be compiled. For users unconcerned with tls, we could remove the dependency. Alternatively, rustls provides a pure rust tls implementation.

bushkov commented 10 months ago

I am also facing an issue because of the added dependency on hyper-tls. I have to cross compile a project to a statically linked binary to be able to run on aarch64-unknown-linux-gnu, which is currently impossible to do with the dependency on hyper-tls added in version 0.13.0 of metrics-exporter-prometheus.

Please switch either to rustls or provide a way to opt out of HTTPS (which would be my preference since I don't need a secure connection for my use case).

justin13888 commented 7 months ago

Are there any plans on moving forward with @nstinus' suggestions? On my end, either switching to rustls and removing hyper-tls outright would be acceptable.

tobz commented 7 months ago

I left feedback on their PR, which hasn't (yet?) been incorporated. I don't have the time/need to modularize TLS support, so this is waiting on someone to submit a PR doing so, or an update to the aforementioned PR based on my feedback.

tessus commented 5 months ago

@tobz if you are ok with switching to rustls, I can create a PR for that. Tomorrow (or actually this evening) that is. It's way past my bedtime. ;-)