mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix: bind prometheus listener to ipv6
This commit is contained in:
parent
701bafdf97
commit
1ebb7decde
1 changed files with 5 additions and 3 deletions
|
|
@ -1,4 +1,6 @@
|
|||
#![feature(let_chains)]
|
||||
use std::net::SocketAddr;
|
||||
|
||||
use metrics_exporter_prometheus::PrometheusBuilder;
|
||||
use sentry::IntoDsn;
|
||||
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
|
||||
|
|
@ -34,9 +36,9 @@ pub fn init_logging(component: &str) -> anyhow::Result<()> {
|
|||
|
||||
pub fn init_metrics() -> anyhow::Result<()> {
|
||||
if config.run_metrics_server {
|
||||
// automatically spawns a http listener at :9000
|
||||
let builder = PrometheusBuilder::new();
|
||||
builder.install()?;
|
||||
PrometheusBuilder::new()
|
||||
.with_http_listener("[::]:9000".parse::<SocketAddr>().unwrap())
|
||||
.install()?;
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue