We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 29f728e commit dbeb3abCopy full SHA for dbeb3ab
router/src/http/server.rs
@@ -1634,9 +1634,12 @@ pub async fn run(
1634
}
1635
});
1636
1637
- let prom_handle = prom_builder
1638
- .install_recorder()
1639
- .context("failed to install metrics recorder")?;
+ // See: https://github.com/metrics-rs/metrics/issues/467#issuecomment-2022755151
+ let (recorder, _) = prom_builder
+ .build()
1640
+ .context("failed to build prometheus recorder")?;
1641
+ let prom_handle = recorder.handle();
1642
+ metrics::set_global_recorder(recorder).context("Failed to set global recorder")?;
1643
1644
// CORS layer
1645
let allow_origin = allow_origin.unwrap_or(AllowOrigin::any());
0 commit comments