mirror of
https://github.com/TecharoHQ/anubis.git
synced 2026-04-05 08:18:17 +00:00
Compare commits
3 Commits
Xe/ci-mult
...
Xe/expose-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4b3ee0d4d4 | ||
|
|
dd58fd64c3 | ||
|
|
264187f90b |
@@ -17,6 +17,7 @@ import (
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
"net/http/pprof"
|
||||
"net/url"
|
||||
"os"
|
||||
"os/signal"
|
||||
@@ -542,6 +543,12 @@ func metricsServer(ctx context.Context, lg slog.Logger, done func()) {
|
||||
}
|
||||
})
|
||||
|
||||
mux.HandleFunc("GET /debug/pprof/", pprof.Index)
|
||||
mux.HandleFunc("GET /debug/pprof/cmdline", pprof.Cmdline)
|
||||
mux.HandleFunc("GET /debug/pprof/profile", pprof.Profile)
|
||||
mux.HandleFunc("GET /debug/pprof/symbol", pprof.Symbol)
|
||||
mux.HandleFunc("GET /debug/pprof/trace", pprof.Trace)
|
||||
|
||||
srv := http.Server{Handler: mux, ErrorLog: internal.GetFilteredHTTPLogger()}
|
||||
listener, metricsUrl := setupListener(*metricsBindNetwork, *metricsBind)
|
||||
lg.Debug("listening for metrics", "url", metricsUrl)
|
||||
|
||||
@@ -11,7 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
- Add Polish locale ([#1292](https://github.com/TecharoHQ/anubis/pull/1309))
|
||||
- Add Polish locale ([#1292](https://github.com/TecharoHQ/anubis/pull/1309)).
|
||||
- Expose [pprof endpoints](https://pkg.go.dev/net/http/pprof) on the metrics listener to enable profiling Anubis in production.
|
||||
|
||||
<!-- This changes the project to: -->
|
||||
|
||||
|
||||
@@ -7,18 +7,12 @@ source ../lib/lib.sh
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
build_anubis_ko
|
||||
mint_cert mimi.techaro.lol
|
||||
|
||||
docker run --rm -it \
|
||||
docker run --rm \
|
||||
-v ./conf/nginx:/etc/nginx:ro \
|
||||
-v ../pki:/techaro/pki:ro \
|
||||
nginx \
|
||||
nginx -t
|
||||
|
||||
docker compose up -d
|
||||
|
||||
docker compose down -t 1 || :
|
||||
docker compose rm -f || :
|
||||
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user