Hi everyone,
I’m currently working on a Python application that uses Temporal with a worker and has its own metrics for some external services and internal functions. Additionally, the application also includes metrics from the Temporal SDK.
I’m looking for a solution to merge these metrics into a single Prometheus registry.
What I am doing now is: each time my Prometheus server scrapes the /metrics endpoint, I consume the endpoint where Prometheus exposes its metrics and merge that data with the data my local Prometheus server has. While this approach works, I don’t like the fact that I’m doing this merge operation every time Prometheus scrapes the metrics.
I have been trying to extract the Prometheus Registry from the Temporal SDK to merge it with my local registry, but I can’t find a way to access it. The TelemetryConfig in the Python SDK doesn’t seem to provide any method for accessing the Prometheus configuration.
Does anyone know if there’s a way to access the Prometheus configuration or registry from the Temporal SDK? Any help or pointers would be greatly appreciated!
Thanks in advance!