metrics: simplify constructor for the default connection tracer (#4555)

This commit is contained in:
Marten Seemann
2024-06-05 18:16:18 +08:00
committed by GitHub
parent 44e0147f2e
commit 91221b4a05
2 changed files with 22 additions and 23 deletions

View File

@@ -22,15 +22,11 @@ When using multiple `Transport`s, it is recommended to use the metrics tracer st
Set a metrics connection tracer on the `Config`:
```go
tracer := metrics.DefaultTracer()
quic.Config{
Tracer: tracer,
Tracer: metrics.DefaultConnectionTracer,
}
```
It is recommended to use the same connection tracer returned by `DefaultTracer` on the `Config`s for all connections.
Running:
```shell
docker-compose up