How can i integrate prometheus exporter with falcon? #2161
-
Hi, I know that falcon prometheus exporter exists but i don't like it too much as for example it does not serve openmetrics seamless, so it would make sense to use a dispatcher middleware like in flask https://github.com/prometheus/client_python/tree/master#flask I don't find any way how to make this easily in falcon, so i can copy the code, or i am stuck here. what can i do ? The best solution i came app was the following:
This is based on https://falcon.readthedocs.io/en/stable/user/faq.html#how-do-i-split-requests-between-my-original-app-and-the-part-i-migrated-to-falcon but i feel somehow that this is ugly and there should be some more "falconic way to do this stuff" |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @david-gang! As mentioned on Gitter, there are improvements planned for the 4.x series both regarding better instrumentation (although we will likely only support the OpenTelemetry protocol in the first iteration), and mounting other applications. See also: |
Beta Was this translation helpful? Give feedback.
Hi @david-gang!
I don't think this is ugly per se, but it is still going an extra mile. At the time of writing this is the recommended workaround.
As mentioned on Gitter, there are improvements planned for the 4.x series both regarding better instrumentation (although we will likely only support the OpenTelemetry protocol in the first iteration), and mounting other applications.
See also: