Skip to content

feat(metrics): expose worker metrics over HTTP#547

Merged
neSpecc merged 2 commits intomasterfrom
feat/worker-metrics-endpoint
May 2, 2026
Merged

feat(metrics): expose worker metrics over HTTP#547
neSpecc merged 2 commits intomasterfrom
feat/worker-metrics-endpoint

Conversation

@Kuchizu
Copy link
Copy Markdown
Member

@Kuchizu Kuchizu commented Apr 29, 2026

Expose worker metrics via an HTTP /metrics endpoint instead of Pushgateway.

neSpecc
neSpecc previously approved these changes Apr 29, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR migrates worker Prometheus metrics from a Pushgateway-based model to a scraper-based HTTP endpoint (/metrics), aligning with pull-based monitoring (e.g., VictoriaMetrics/Prometheus scraping).

Changes:

  • Replace Pushgateway metrics exporting with an HTTP server exposing /metrics and /-/healthy.
  • Update runner wiring to start/stop the metrics exporter via startMetricsServer().
  • Update sample/test environment files to the new metrics endpoint configuration variables.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 6 comments.

File Description
runner.ts Switches runner metrics startup/shutdown logic to the new metrics server.
lib/metrics.ts Implements an HTTP server exposing Prometheus metrics instead of Pushgateway pushing.
.env.test Replaces Pushgateway env var with metrics endpoint port configuration.
.env.sample Documents/configures metrics endpoint host/port/path env vars.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/metrics.ts
Comment thread lib/metrics.ts Outdated
Comment thread lib/metrics.ts Outdated
Comment thread lib/metrics.ts
Comment thread lib/metrics.ts Outdated
Comment thread runner.ts
@Kuchizu Kuchizu requested review from akulistus and talyguryn April 30, 2026 21:24
@neSpecc neSpecc merged commit 3529d73 into master May 2, 2026
5 checks passed
@neSpecc neSpecc deleted the feat/worker-metrics-endpoint branch May 2, 2026 17:06
Kuchizu added a commit that referenced this pull request May 2, 2026
Co-authored-by: Kuchizu <70284260+Kuchizu@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants