core: more metrics (#5629)

## Summary
Add some more metrics:

- Authenticate token verification
- Authorization log duration
- Authorization evaluator and header evaluator
- IDP token session creator

HTTP and gRPC endpoints are already instrumented via middleware, which
covers authenticate, proxy and databroker endpoints. Postgres is also
already instrumented using `otelpgx`.

## Related issues
-
[ENG-2407](https://linear.app/pomerium/issue/ENG-2407/add-additional-metrics-and-tracing-spans-to-pomerium)


## Checklist

- [x] reference any related issues
- [ ] updated unit tests
- [ ] add appropriate label (`enhancement`, `bug`, `breaking`,
`dependencies`, `ci`)
- [x] ready for review
This commit is contained in:
Caleb Doxsey 2025-05-29 09:34:41 -06:00 committed by GitHub
parent 957e0982c1
commit 13554ec78d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 164 additions and 2 deletions

View file

@ -31,3 +31,12 @@ func Int64Counter(name string, options ...metric.Int64CounterOption) metric.Int6
}
return c
}
// Int64Histogram returns an int64 histogram.
func Int64Histogram(name string, options ...metric.Int64HistogramOption) metric.Int64Histogram {
c, err := Meter.Int64Histogram(name, options...)
if err != nil {
panic(err)
}
return c
}