File: README.md

package info (click to toggle)
golang-github-lucas-clemente-quic-go 0.54.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 4,312 kB
  • sloc: sh: 54; makefile: 7
file content (24 lines) | stat: -rw-r--r-- 832 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# 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](https://quic-go.net/docs/quic/metrics/) 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`:
```go
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:
```shell
docker compose up
```

[quic-go.json](./quic-go.json) contains the JSON model of an example Grafana dashboard.