You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello. I am unsure if this is the right place to ask this question but I was wondering about how we can utilize the GunicornInternalPrometheusMetrics class while also being able to register custom metrics defined as a class. Similar to the examples that prometheus_client provide in their docs here: custom-collectors in prometheus-client
the reason I am asking about this is because I need to define a couple of custom collectors for specific use cases and if this is simple enough I wont try to hack around it (my specific use case has no bearing on the question itself). I am already using the register_defults() method but it is not the same as me allowing customers/users to build their Collector() classes and import them into our application without modifying our existing code hence why I am asking to allow a custom collector to be registered to the GunicornInternalPrometheusMetrics app & registry.
thank you for any help. ps. I am loving how simple you have made this library to work with so far.
The text was updated successfully, but these errors were encountered:
Yep, that should work as expected, though let me know if you find otherwise. As mentioned in the https://github.com/rycus86/prometheus_flask_exporter#configuration we use the default REGISTRY when you don't specify it manually, and if you add the custom collectors to a custom registry, then just make sure to pass that to the PrometheusMetrics constructor.
I am loving how simple you have made this library to work with so far.
Hello. I am unsure if this is the right place to ask this question but I was wondering about how we can utilize the GunicornInternalPrometheusMetrics class while also being able to register custom metrics defined as a class. Similar to the examples that prometheus_client provide in their docs here: custom-collectors in prometheus-client
the reason I am asking about this is because I need to define a couple of custom collectors for specific use cases and if this is simple enough I wont try to hack around it (my specific use case has no bearing on the question itself). I am already using the register_defults() method but it is not the same as me allowing customers/users to build their Collector() classes and import them into our application without modifying our existing code hence why I am asking to allow a custom collector to be registered to the GunicornInternalPrometheusMetrics app & registry.
thank you for any help. ps. I am loving how simple you have made this library to work with so far.
The text was updated successfully, but these errors were encountered: