Skip to content

metrics: serve Prometheus /metrics on a private mux - #1023

Open
2dvorak wants to merge 1 commit into
kaiachain:devfrom
2dvorak:harden-prometheus-metrics-mux
Open

metrics: serve Prometheus /metrics on a private mux#1023
2dvorak wants to merge 1 commit into
kaiachain:devfrom
2dvorak:harden-prometheus-metrics-mux

Conversation

@2dvorak

@2dvorak 2dvorak commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Proposed changes

  • Starting the exporter with a nil handler served http.DefaultServeMux, exposing net/http/pprof's /debug/pprof/* (including cmdline) on the Prometheus port even with --pprof off
  • Use a private mux; listen address unchanged. Add a regression test.

Types of changes

  • 🐛 Bug fix
  • ✨ Non-hardfork changes (node upgrade not required)
  • 💥 Hardfork / consensus-breaking changes
  • 🧪 Test improvements
  • 🧰 CI / build tool
  • ♻️ Chore / Refactor / Non-functional changes

Checklist

  • 📖 I have read the CONTRIBUTING GUIDELINES doc
  • 📝 I have signed in the PR comment I have read the CLA Document and I hereby sign the CLA in first time contribute after having read CLA
  • 🟢 Lint and unit tests pass locally with my changes ($ make test)

Related issues

Further comments

@2dvorak 2dvorak self-assigned this Aug 7, 2026
@2dvorak 2dvorak added the do not merge Do not merge just yet label Aug 7, 2026
Starting the exporter with a nil handler served http.DefaultServeMux, exposing
net/http/pprof's /debug/pprof/* (including cmdline) on the Prometheus port even
with --pprof off. Use a private mux; listen address unchanged. Add a regression
test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@2dvorak
2dvorak force-pushed the harden-prometheus-metrics-mux branch from 956a13d to f247a1a Compare August 7, 2026 15:11
@2dvorak
2dvorak marked this pull request as ready for review August 7, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

do not merge Do not merge just yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants