Files
quic-go/metrics/dashboards/README.md
Marten Seemann 4d0562d13c metrics: add an example Grafana dashboard (#4559)
* metrics: add an example Grafana dashboard

* metrics: rename Handshake Duration to Handshake Latency

Co-authored-by: sukun <sukunrt@gmail.com>

---------

Co-authored-by: sukun <sukunrt@gmail.com>
2024-06-06 02:13:35 -07:00

832 B

quic-go Prometheus / Grafana Local Development Setup

For local development and debugging, it can be useful to spin up a local Prometheus and Grafana instance.

Please refer to the documentation for how to configure quic-go to expose Prometheus metrics.

The configuration files in this directory assume that the application exposes the Prometheus endpoint at http://localhost:5001/prometheus:

import "github.com/prometheus/client_golang/prometheus/promhttp"

go func() {
    http.Handle("/prometheus", promhttp.Handler())
    log.Fatal(http.ListenAndServe("localhost:5001", nil))
}()

Prometheus and Grafana can be started using Docker Compose:

Running:

docker compose up

quic-go.json contains the JSON model of an example Grafana dashboard.