Log not implemented messages as debug in prometheus metrics. (#477)

This commit is contained in:
Juraj Bubniak
2023-06-17 03:48:38 +02:00
committed by GitHub
parent c7d6273037
commit 473bb3d17d

View File

@@ -1,6 +1,6 @@
use hyper::service::{make_service_fn, service_fn}; use hyper::service::{make_service_fn, service_fn};
use hyper::{Body, Method, Request, Response, Server, StatusCode}; use hyper::{Body, Method, Request, Response, Server, StatusCode};
use log::{error, info, warn}; use log::{error, info, debug};
use phf::phf_map; use phf::phf_map;
use std::collections::HashMap; use std::collections::HashMap;
use std::fmt; use std::fmt;
@@ -275,7 +275,7 @@ fn push_address_stats(lines: &mut Vec<String>) {
{ {
lines.push(prometheus_metric.to_string()); lines.push(prometheus_metric.to_string());
} else { } else {
warn!("Metric {} not implemented for {}", key, address.name()); debug!("Metric {} not implemented for {}", key, address.name());
} }
} }
} }
@@ -293,7 +293,7 @@ fn push_pool_stats(lines: &mut Vec<String>) {
{ {
lines.push(prometheus_metric.to_string()); lines.push(prometheus_metric.to_string());
} else { } else {
warn!("Metric {} not implemented for ({})", name, *pool_id); debug!("Metric {} not implemented for ({})", name, *pool_id);
} }
} }
} }
@@ -318,7 +318,7 @@ fn push_database_stats(lines: &mut Vec<String>) {
{ {
lines.push(prometheus_metric.to_string()); lines.push(prometheus_metric.to_string());
} else { } else {
warn!("Metric {} not implemented for {}", key, address.name()); debug!("Metric {} not implemented for {}", key, address.name());
} }
} }
} }