Skip to content

Export HTTP metrics for metrics-server

Matthias Käppler requested to merge 348942-metrics-server-http-metrics into master

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

Screenshot_from_2021-12-28_16-37-44

How to set up and validate locally

  1. Enable the sidekiq exporter (a monitoring component)
  2. Boot prometheus
  3. 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.

Related to #348942 (closed)

Edited by Matthias Käppler

Merge request reports