feature: expand nym-node prometheus metrics (#5298)
* fixed bearer auth for prometheus route * basic prometheus metrics * added rates on global values * improved structure on the prometheus metrics * added additional metrics for ingress websockets and egress mixnet connections * some channel business metrics * fixed metrics registration and added additional variants * added counter for number of disk persisted packets * counter for pending egress packets * counter for pending egress forward packets * clippy
This commit is contained in:
@@ -9,8 +9,6 @@ pub use nym_verloc::measurements::metrics::SharedVerlocStats;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct MetricsAppState {
|
||||
pub(crate) prometheus_access_token: Option<String>,
|
||||
|
||||
pub(crate) metrics: NymNodeMetrics,
|
||||
|
||||
pub(crate) verloc: SharedVerlocStats,
|
||||
|
||||
@@ -24,17 +24,7 @@ impl AppState {
|
||||
// does it have to be?
|
||||
// also no.
|
||||
startup_time: Instant::now(),
|
||||
metrics: MetricsAppState {
|
||||
prometheus_access_token: None,
|
||||
metrics,
|
||||
verloc,
|
||||
},
|
||||
metrics: MetricsAppState { metrics, verloc },
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn with_metrics_key(mut self, bearer_token: impl Into<Option<String>>) -> Self {
|
||||
self.metrics.prometheus_access_token = bearer_token.into();
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user