mirror of
https://github.com/pomerium/pomerium.git
synced 2025-08-03 16:59:22 +02:00
internal/telemetry/metrics: document concurrently using (#891)
Document that metricRegistry is not safe for concurrently use. While at it, remove t.Parallel() in tests which use metricRegistry, which causes data race, caught by: go test -race ./internal/telemetry/metrics
This commit is contained in:
parent
e0bdd906f9
commit
34d06e521d
2 changed files with 2 additions and 6 deletions
|
@ -18,6 +18,8 @@ var (
|
|||
// metricRegistry holds the non-view metrics and handles safe
|
||||
// initialization and updates. Behavior without using newMetricRegistry()
|
||||
// is undefined.
|
||||
//
|
||||
// It is not safe to use metricRegistry concurrently.
|
||||
type metricRegistry struct {
|
||||
registry *metric.Registry
|
||||
buildInfo *metric.Int64Gauge
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue