Our solution
GraphQL-aware Prometheus metrics, built in
The router exports R.E.D. metrics for router and subgraph traffic with the GraphQL labels operators actually need. Cardinality is bounded out of the box.
What happens on every request
The router collects R.E.D. metrics via the OpenTelemetry SDK on every request.
A Prometheus exporter publishes them on http://127.0.0.1:8088/metrics by default.
Labels carry GraphQL context: wg_operation_type, wg_operation_protocol, wg_client_name, wg_client_version, wg_subgraph_name, wg_subgraph_id, and http_status_code. wg_operation_name is added when the router exports to Cosmo Cloud or you turn on the operation_name metric attribute.
Prometheus scrapes the endpoint on its configured interval and stores the series.
Grafana reads the series for dashboards. Prometheus alerting rules evaluate them for alerts.
A default cardinality limit of 2000 (experimental) and regex exclusions keep cardinality bounded.
Plug Prometheus into the endpoint. Dashboards and alerts follow.

