move prometheus behind a feature flag

This commit is contained in:
Tamo 2022-08-29 12:36:54 +02:00 committed by Kerollmops
parent 47a1aa69f0
commit 6aa3ad6b6c
No known key found for this signature in database
GPG key ID: 92ADA4E935E71FA4
7 changed files with 79 additions and 47 deletions

View file

@ -147,6 +147,7 @@ pub struct Opt {
pub log_level: String,
/// Enables Prometheus metrics and /metrics route.
#[cfg(feature = "metrics")]
#[clap(long, env = "MEILI_ENABLE_METRICS_ROUTE")]
pub enable_metrics_route: bool,