Observability · Grafana Integration

Get federated GraphQL dashboards in under 30 minutes

Two pre-built Grafana dashboards (Router Cache Metrics and Go Runtime Metrics) with Prometheus and ClickHouse data sources already wired up. Use them as-is or as a starting point.

One make target. Grafana, Prometheus, ClickHouse.

Two dashboards, Docker Compose included

Cosmo RoutermetricsPrometheusMetrics storeClickHouseAnalyticsGrafanaRouter Cache MetricsGo Runtime MetricsPre-built · customizable

Available onFreeProEnterprise

The problem

Dashboards take days that nobody has

Production visibility shouldn't block on a Grafana project. Most teams want a sensible starting point and the freedom to extend.

Building dashboards from scratch is a project

Picking the right metrics, writing PromQL, and laying out panels takes days. None of that work is differentiated, and most teams reinvent it.

Trial and error is the default

Without proven queries, teams iterate against production traffic to figure out what to graph and how. Mistakes ship to dashboards executives look at.

Generic templates miss GraphQL

Off-the-shelf Grafana dashboards do not know about wg_operation_name, wg_subgraph_name, or cache hit ratios. Adapting them takes as long as starting over.

Our solution

Production dashboards in one make target

A Docker Compose stack with Grafana, Prometheus, and ClickHouse. Pre-configured data sources. Two dashboards that load on first start. Open the JSON, change the panels, keep going.

What you get on day one

  1. Clone the Cosmo repository and run make infra-debug-up.

  2. Docker Compose brings up Grafana, Prometheus, and ClickHouse with the right configuration baked in.

  3. Prometheus data source is pre-configured for router metrics. ClickHouse data source is pre-configured for analytics.

  4. Two dashboards load on first start: Router Cache Metrics and Go Runtime Metrics.

  5. Point the router metrics endpoint at the Prometheus scrape job.

  6. Customize the panels to match your SLOs or use the queries as templates for your own dashboards.

Production visibility in under 30 minutes.

Grafana

Before & After

Before CosmoWith Cosmo
Weeks building GraphQL-aware Grafana dashboards from scratchTwo pre-built dashboards with federation-aware PromQL
Trial-and-error panel layout for cache and runtime signalsRouter Cache and Go Runtime views ready on first boot
Generic templates that ignore wg_operation_name and cache metricsDashboards built for Cosmo Router metric names and labels
Manual wiring of Prometheus and ClickHouse in Grafanamake infra-debug-up ships the full debug stack configured

Dashboard 2

Go Runtime Metrics

Memory usage, GC duration, goroutine counts. The view that surfaces a subscription handler leaking goroutines days before the router needs a restart.

How the Grafana stack ships with Cosmo

01
Compose lives in the Cosmo repo.

Clone

Clone the Cosmo repository. The Docker Compose definition that brings up the observability stack lives alongside the router source.

02
One make target, full stack.

Boot

Run make infra-debug-up. Grafana, Prometheus, and ClickHouse start with data sources and dashboards already wired up.

03
Two dashboards loaded on boot.

Visualize

Open Grafana. The Router Cache Metrics dashboard shows hit ratios, costs, and key statistics. The Go Runtime Metrics dashboard shows memory, GC, and goroutine counts.

04
Templates first, not the whole answer.

Customize

Treat the dashboards as templates. Extend the PromQL queries to match your SLOs and add custom panels next to the defaults.

Telemetry controls

Dashboards and data sources

Router Cache Metrics and Go Runtime Metrics: import JSON into any Grafana you already run.

Setup time

Under 30 minutes to a complete local stack with dashboards visible.

Data sources

Prometheus for metrics and ClickHouse for analytics, both pre-configured in Grafana.

Dashboard source

Dashboard JSON definitions live at wundergraph/cosmo. Import them into any Grafana instance.

Portable PromQL

The queries work with any Prometheus-compatible setup; the panels can be recreated in any compatible visualization tool.

Open pre-built Grafana dashboards

Clone the Cosmo repo, run one make target, and open Router Cache and Go Runtime dashboards.

FAQ

Grafana integration for Cosmo Router

Deep dive in the Grafana integration documentation.