Temporal Cloud and SDKs emit metrics that can be used to monitor performance and troubleshoot errors.
Temporal Cloud emits metrics through a Prometheus HTTP API endpoint which can be directly used as a Prometheus data source in Grafana or to query and export Cloud metrics to any observability platform.
The open-source SDKs require you to set up a Prometheus scrape endpoint for Prometheus to collect and aggregate the Worker and Client metrics.
This article describes how to set up your Temporal Cloud and SDK metrics and use them as data sources in Grafana.
The process for setting up observability includes the following steps:
- Create or get your Prometheus endpoint for Temporal Cloud metrics and enable SDK metrics.
- For Temporal Cloud, generate a Prometheus HTTP API endpoint on Temporal Cloud using valid certificates.
- For SDKs, expose a metrics endpoint where Prometheus can scrape SDK metrics and run Prometheus on your host. The examples in this article describe running Prometheus on your local machine where you run your application code.
- Run Grafana and set up data sources for Temporal Cloud and SDK metrics in Grafana. The examples in this article describe running Grafana on your local host where you run your application code.
- Create dashboards in Grafana to view Temporal Cloud metrics and SDK metrics. Temporal provides sample community-driven Grafana dashboards for Cloud and SDK metrics that you can use and customize according to your requirements.
If you're following through with the examples provided here, ensure that you have the following:
- Root CA certificates and end-entity certificates. See Certificate requirements for details.
- Set up your connections to Temporal Cloud using an SDK of your choice and have some Workflows running on Temporal Cloud. See Connect to a Cluster for details.
- Prometheus and Grafana installed.