mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 09:45:31 +00:00
fix prometheus timeout mask metrics
This commit is contained in:
parent
c4f645e03e
commit
40e33d8af1
7 changed files with 15 additions and 7 deletions
|
|
@ -19,7 +19,7 @@ name = "aquatic_http"
|
|||
|
||||
[features]
|
||||
default = ["prometheus"]
|
||||
prometheus = ["aquatic_common/prometheus", "metrics"]
|
||||
prometheus = ["aquatic_common/prometheus", "metrics", "dep:metrics-util"]
|
||||
metrics = ["dep:metrics"]
|
||||
|
||||
[dependencies]
|
||||
|
|
@ -54,6 +54,7 @@ thiserror = "1"
|
|||
|
||||
# metrics feature
|
||||
metrics = { version = "0.22", optional = true }
|
||||
metrics-util = { version = "0.16", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
quickcheck = "1"
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ pub fn run(config: Config) -> ::anyhow::Result<()> {
|
|||
let handle = aquatic_common::spawn_prometheus_endpoint(
|
||||
config.metrics.prometheus_endpoint_address,
|
||||
Some(Duration::from_secs(idle_timeout)),
|
||||
Some(metrics_util::MetricKindMask::GAUGE),
|
||||
)?;
|
||||
|
||||
join_handles.push((WorkerType::Prometheus, handle));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue