metrics-rs / metrics

A metrics ecosystem for Rust.
MIT License
1.08k stars 148 forks source link

Make tls support optional and add rustls #418

Open nstinus opened 9 months ago

nstinus commented 9 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 7 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 4 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 4 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 3 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. ;-)