pkg/webhook/resourcesemantics
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
..
conversion [webhook] OTel changes (#3189) 2025-07-04 14:53:57 +00:00
defaulting [webhook] OTel changes (#3189) 2025-07-04 14:53:57 +00:00
validation [webhook] OTel changes (#3189) 2025-07-04 14:53:57 +00:00
interface.go Fix #2115, allow selective verbs / subresources for webhooks. (#2547) 2022-08-24 01:10:17 +00:00