Closed easybe closed 3 weeks ago
What's the best way to do this you think? It seems like its an issue with running the actual prometheus client, is there a way to hook it into fastAPI directly? How do those metrics work with multiple worker instances?
I have no idea. I would assume that one shared Prometheus collector instance should be enough. But, I don't know how it will collect the metrics.
For now, an option to disable the feature (or temporarily remove it) would do the trick.
Ill add that to my settings PR.
https://github.com/UpstreamDataInc/goosebit/blob/c787cb4a30ab1e64daeb50410fed11ffccdd9750/goosebit/telemetry/prometheus.py#L10
This does not work when running multiple instances e.g. with gunicorn workers. We need to keep concurrency in mind.