Commit Graph

1 Commits

Author SHA1 Message Date
Dave Protasowski f4787640a1
[webhook] OTel changes (#3189)
* webhook changes for observability

* go mod

* vendor

* Allow the webhook to accept a MetricsProvider. This makes it easier to unit test

Digging into OTel implementation it looks like instruments are cached.
Thus when different webhooks request the same instrument a cache lookup
for the instrument will occur.

* passthrough additional OTel interfaces

* linter fixes

* drop global meter in tests

* PR feedback

* PR feedback

* when recording the admission/conversion duration use the attributes from the labeler

* add a comment that otelhttp middleware creates the labeler

* simply code for readability

* change metric names to allow reuse across different webhook types

* fix linter

* tweak attribute names
2025-07-04 14:53:57 +00:00