pomerium/internal/telemetry/metrics
Denis Mishin d9412f957a
metrics: don't add units and scope tags to prometheus metrics (#5749)
## Summary

With metrics now going via OTEL -> Prometheus exporter, there were
couple issues:

- some newer metrics had non-standard units that ended up in metric
names like `pomerium_storage_global_cache_hits__hit__total`
- we had three additional tags (`otel_scope_name`,
`otel_scope_schema_url`, `otel_scope_version`) added to each metric,
which do not really carry much meaningful information for us and expand
metric cardinality.

This PR reverts those two changes and updates the prometheus exporter.

## Related issues

Related: https://github.com/open-telemetry/opentelemetry-go/issues/7039

## User Explanation

<!-- How would you explain this change to the user? If this
change doesn't create any user-facing changes, you can leave
this blank. If filled out, add the `docs` label -->

## Checklist

- [x] reference any related issues
- [ ] updated unit tests
- [x] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
2025-07-24 14:34:11 -04:00
..
autocert.go
bench_test.go upgrade to go v1.24 (#5562) 2025-04-02 15:53:09 -06:00
const.go Envoy resource monitoring & overload manager configuration (#5106) 2024-05-28 16:57:09 -04:00
doc.go
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 chore(deps): bump the go group with 24 updates (#5638) 2025-06-17 09:36:50 -07: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: standardize on hyphens in attribute names (#5577) 2025-04-22 10:57:19 -07:00
info_test.go chore(deps): bump the go group with 24 updates (#5638) 2025-06-17 09:36:50 -07:00
otel.go metrics: don't add units and scope tags to prometheus metrics (#5749) 2025-07-24 14:34:11 -04:00
processes.go
processes_test.go chore(deps): bump the go group with 24 updates (#5638) 2025-06-17 09:36:50 -07:00
providers.go upgrade to go v1.24 (#5562) 2025-04-02 15:53:09 -06:00
providers_test.go metrics: reduce gc pressure (#5530) 2025-03-18 13:48:49 -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 chore(deps): bump the go group with 24 updates (#5638) 2025-06-17 09:36:50 -07:00