mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-09 22:26:29 +00:00
Changed prometheus metrics feature as optional
This commit is contained in:
@ -146,6 +146,10 @@ pub struct Opt {
|
||||
#[clap(long, env = "MEILI_LOG_LEVEL", default_value = "info")]
|
||||
pub log_level: String,
|
||||
|
||||
// Enables Prometheus metrics and /metrics route.
|
||||
#[clap(long, requires = "enable-metrics-route")]
|
||||
pub enable_metrics_route: bool,
|
||||
|
||||
#[serde(flatten)]
|
||||
#[clap(flatten)]
|
||||
pub indexer_options: IndexerOpts,
|
||||
@ -161,7 +165,7 @@ impl Opt {
|
||||
pub fn analytics(&self) -> bool {
|
||||
!self.no_analytics
|
||||
}
|
||||
|
||||
|
||||
pub fn get_ssl_config(&self) -> anyhow::Result<Option<rustls::ServerConfig>> {
|
||||
if let (Some(cert_path), Some(key_path)) = (&self.ssl_cert_path, &self.ssl_key_path) {
|
||||
let config = rustls::ServerConfig::builder().with_safe_defaults();
|
||||
|
Reference in New Issue
Block a user