We are developing custom plugins for Krakend and would like these plugins to define their own Prometheus metrics (such as counters, gauges, histograms, etc.). Our goal is to have these custom metrics automatically collected and made available under the existing /metrics endpoint, along with Krakend's default internal metrics.
We would like to understand:
How to properly register plugin-defined metrics so they are picked up by the Prometheus handler.
Whether Krakend allows sharing its Prometheus registry or if a custom setup is needed.
Best practices for avoiding metric name conflicts between Krakend core metrics and plugin metrics.
Any guidance or examples on how to achieve this cleanly within the Krakend plugin system would be appreciated!