While Expose procedure works, it shouldn't be part of the metrics. Prometheus guidelines about writing client libraries recommends this way:
Data is exposed by passing a CollectorRegistry to a class/method/function "bridge", which returns the metrics in a format Prometheus supports. Every time the CollectorRegistry is scraped it must callback to each of the Collectors’ collect method.
https://prometheus.io/docs/instrumenting/writing_clientlibs/
While
Exposeprocedure works, it shouldn't be part of the metrics. Prometheus guidelines about writing client libraries recommends this way:https://prometheus.io/docs/instrumenting/writing_clientlibs/