Skip to content

feat: Add optional Prometheus metrics endpoint - #24

Draft
MoeMahhouk wants to merge 2 commits into
moe/mirror-modefrom
moe/prometheus-metrics
Draft

feat: Add optional Prometheus metrics endpoint#24
MoeMahhouk wants to merge 2 commits into
moe/mirror-modefrom
moe/prometheus-metrics

Conversation

@MoeMahhouk

Copy link
Copy Markdown
Member

📝 Summary

New -metrics-addr flag (env METRICS_ADDR, empty = disabled) serving /metrics on a separate listener. Exposes syncproxy_forwards_total{method,backend,result} — where success means the backend answered 2xx (the EL demonstrably received and accepted the forwarded call, also in mirror mode), http_error a non-2xx answer, and error a transport failure or timeout — plus a syncproxy_forward_duration_seconds histogram. Adds prometheus/client_golang v1.23.2 (latest compatible with the repo's Go 1.24 pin).

⛱ Motivation and Context

Lets operators alert on "is the backend EL actually receiving engine calls", which is otherwise invisible in mirror mode since callers only get an empty ACK.

📚 References

Stacked on #22


✅ I have run these commands

  • make lint
  • make test-race
  • go mod tidy
  • I have seen and agree to CONTRIBUTING.md

New -metrics-addr flag (env METRICS_ADDR, empty = disabled) serves
/metrics on a separate listener. Records syncproxy_forwards_total
{method,backend,result} where success means the backend answered 2xx
(i.e. the EL demonstrably received and accepted the forwarded call,
including in mirror mode where the caller only gets an empty ACK), and
a forward duration histogram.
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.

1 participant