Hi all,
I have a fastapi app which generates some custom prometheus metrics with the prometheus client library.
I can start a separate server with start_http_server method from the prometheus client, but i would like to have the /metrics endpoint be served on the same port as my fastapi app.
I cant seem to find an easy way to do this, i see a prometheus offers integration with ASGI but i cant figure out how to piece everything together. AAnyone here done this before?
Today is pretty unusual day - my first Middleware for #FastApi (and, obviously, #starlette) is out. It deals with integration and customization metrics for #prometheus with, I hopefully, simple and intuitive way.
Working with #FastApi is delight and I hope this middleware will make life of couple of folks even easier :)
Will be happy with criticism and suggestions :)
https://github.com/kozhushman/prometheusrock