pomerium/internal/telemetry/metrics
Kenneth Jenkins 247cd175fe
metrics: restore global registry in unit tests (#5399)
Currently there appears to be a test order dependency between a couple
of the info_test.go test cases and the Test_PrometheusHandler test. This
can be exposed by running:

  go test -count 2 ./internal/telemetry/metrics

The test cases in info_test.go overwrite the global 'registry' variable,
which seems to prevent Test_PrometheusHandler from being able to export
the internal Go metrics. Add a helper method to restore the original
registry after these test cases.
2024-12-18 13:21:06 -08:00
..
autocert.go autocert: add metrics for renewal count, total and next expiration (#2019) 2021-03-25 08:03:04 -06:00
const.go Envoy resource monitoring & overload manager configuration (#5106) 2024-05-28 16:57:09 -04:00
doc.go *: remove import path comments (#545) 2020-03-16 10:13:47 -07:00
envoy.go core/logging: change log.Error function (#5251) 2024-09-05 15:42:46 -06:00
grpc.go core/logging: change log.Error function (#5251) 2024-09-05 15:42:46 -06:00
grpc_test.go config: remove source, remove deadcode, fix linting issues (#4118) 2023-04-21 17:25:11 -06:00
helpers_test.go core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
http.go core/logging: change log.Error function (#5251) 2024-09-05 15:42:46 -06:00
http_test.go core/lint: upgrade golangci-lint, replace interface{} with any (#5099) 2024-05-02 14:33:52 -06:00
info.go logging: remove ctx from global log methods (#5337) 2024-10-23 14:18:52 -06:00
info_test.go metrics: restore global registry in unit tests (#5399) 2024-12-18 13:21:06 -08:00
processes.go fix(deps): update module github.com/prometheus/procfs to v0.6.0 (#1969) 2021-03-16 22:03:01 -04:00
processes_test.go config: remove source, remove deadcode, fix linting issues (#4118) 2023-04-21 17:25:11 -06:00
providers.go metrics: make sure to flush buffered writer (#5398) 2024-12-18 12:50:12 -08:00
providers_test.go Update to Go 1.23 (#5216) 2024-08-14 14:12:01 -04:00
registry.go core/logging: change log.Error function (#5251) 2024-09-05 15:42:46 -06:00
storage.go core/logging: change log.Error function (#5251) 2024-09-05 15:42:46 -06:00
storage_test.go dev: update linter (#1728) 2020-12-30 09:02:57 -08:00