Export HTTP metrics for metrics-server
What does this MR do and why?
We recently broke out a new metrics server process from the main app, starting with Sidekiq: &6409 (closed)
With !76553 (merged), we added the ability for the metrics server to sample and exports its own metrics. We started by using an existing sampler, which only exports Ruby VM and procfs metrics.
This MR expands on this functionality to also emit request metrics into Prometheus, so that we can observe request volume on the server itself.
The metrics we emit:
exporter_http_requests_total
-
exporter_http_request_duration_seconds
(histogram)
we attach a pid
label to distinguish the different exporters (web_exporter
, sidekiq_exporter
).
Screenshots or screen recordings
How to set up and validate locally
- Enable the sidekiq exporter (a
monitoring
component) - Boot prometheus
- Send requests to the exporter (e.g.
curl localhost:3807/metrics
)
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #348942 (closed)
Edited by Matthias Käppler