mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 00:30:11 +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)]
|
#![feature(let_chains)]
|
||||||
|
use std::net::SocketAddr;
|
||||||
|
|
||||||
use metrics_exporter_prometheus::PrometheusBuilder;
|
use metrics_exporter_prometheus::PrometheusBuilder;
|
||||||
use sentry::IntoDsn;
|
use sentry::IntoDsn;
|
||||||
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
|
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<()> {
|
pub fn init_metrics() -> anyhow::Result<()> {
|
||||||
if config.run_metrics_server {
|
if config.run_metrics_server {
|
||||||
// automatically spawns a http listener at :9000
|
PrometheusBuilder::new()
|
||||||
let builder = PrometheusBuilder::new();
|
.with_http_listener("[::]:9000".parse::<SocketAddr>().unwrap())
|
||||||
builder.install()?;
|
.install()?;
|
||||||
}
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue