mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
udp: actually register global metrics handler
This commit is contained in:
parent
f2d063d6a6
commit
b4e27903dc
1 changed files with 6 additions and 1 deletions
|
|
@ -193,6 +193,11 @@ pub fn run(config: Config) -> ::anyhow::Result<()> {
|
|||
.build()
|
||||
.context("build prometheus recorder and exporter")?;
|
||||
|
||||
let recorder_handle = recorder.handle();
|
||||
|
||||
::metrics::set_global_recorder(recorder)
|
||||
.context("set global metrics recorder")?;
|
||||
|
||||
::tokio::spawn(async move {
|
||||
let mut interval = ::tokio::time::interval(Duration::from_secs(5));
|
||||
|
||||
|
|
@ -201,7 +206,7 @@ pub fn run(config: Config) -> ::anyhow::Result<()> {
|
|||
|
||||
// Periodically render metrics to make sure
|
||||
// idles are cleaned up
|
||||
recorder.handle().render();
|
||||
recorder_handle.render();
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue