Open joprice opened 3 years ago
Right now I think you can only do this by writing a custom STTP backend wrapping the real one, like described here: https://sttp.softwaremill.com/en/latest/backends/wrappers/custom.html#example-metrics-backend-wrapper
I think it wold be nice to introduce a concept of K8sCallAspect
s similar to what I did in zio-aws (https://vigoo.github.io/zio-aws/docs/aspects.html) that can be simply applied to any K8s client layer to attach custom logging/metrics functionality.
I'd like to swap a client with custom watcher reconnection handling with this one, but the custom client has metrics around connection failures and reconnection attempts. Any recommendation for intercepting those calls for collecting metrics?