Use /metrics route

This commit is contained in:
jude 2023-10-22 10:39:12 +01:00
parent 48b50f783d
commit 4c17286614
3 changed files with 4 additions and 3 deletions

2
Cargo.lock generated
View File

@ -2215,7 +2215,7 @@ dependencies = [
[[package]]
name = "soundfx-rs"
version = "1.5.12"
version = "1.5.13"
dependencies = [
"axum",
"dashmap",

View File

@ -2,7 +2,7 @@
name = "soundfx-rs"
description = "Discord bot for custom sound effects and soundboards"
license = "AGPL-3.0-only"
version = "1.5.12"
version = "1.5.14"
authors = ["jellywx <judesouthworth@pm.me>"]
edition = "2018"
@ -30,6 +30,7 @@ metrics = ["dep:prometheus", "dep:axum"]
serenity = { version = "0.11.6" }
[package.metadata.deb]
features = ["metrics"]
depends = "$auto, ffmpeg"
suggests = "mysql-server-8.0"
maintainer-scripts = "debian"

View File

@ -20,7 +20,7 @@ pub fn init_metrics() {
}
pub async fn serve() {
let app = Router::new().route("/", get(metrics));
let app = Router::new().route("/metrics", get(metrics));
let addr = SocketAddr::from(([127, 0, 0, 1], 31755));
axum::Server::bind(&addr)