kopf
kopf copied to clipboard
Wanted to implement prometheus metrics for my operator
Keywords
prometheus metrics
Problem
I have successfully built an operator with kopf framework. For my operator to be production ready i need to expose /metrics endpoint for scrapping the application or operator metrics.
I see your discussion regarding this. I was trying to run per-operator daemon but it fails ( TypeError: Unspecific resource with no names.) . I am wondering if it works and wanted to know your inputs on how I can run standalone web service for prometheus to expose the metrics endpoint
As observability is becoming more and more relevant, It will be very useful if we have some documentation around how to setup prom metrics for the operator.
Hi, i would suggest you to use the @kopf.on.startup decorator to spin up an webserver that will serve the /metrics endpoint.
I will give it a try. Thanks for the response.