pingora
pingora copied to clipboard
Make prometheus as optional dependency
Fixes #560.
Change summary:
- Made the prometheus dependency optional in Cargo.toml
- Added a new feature flag called prometheus in the
[features]section of the Cargo.toml - Added
#[cfg(feature = "prometheus")]attributes to all Prometheus-related code - Updated documentation
I'm not a project member, this comment is FWIW.
It should be in a separate crate (like pingora-prometheus, pingora-extras or something), not optional: nothing in pingora-core depends on prometheus, except single file prometheus_http_app.rs. Features complicate dependency trees, introduce compilation errors due to being hard to test all permutation of features, make compilation slower.