feat: expose prometheus metrics on different port

This commit is contained in:
trafficlunar 2026-01-01 23:46:54 +00:00
parent d93f3f2797
commit 498b45eab3
5 changed files with 19 additions and 4 deletions

View file

@ -0,0 +1,14 @@
package server
import (
"net/http"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
func StartPrometheusServer() {
go func() {
http.HandleFunc("/", promhttp.Handler().ServeHTTP)
http.ListenAndServe(":8889", nil)
}()
}