> ## Documentation Index
> Fetch the complete documentation index at: https://docs.chronosphere.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Temporal

> Temporal request, workflow, task, and persistence metrics.

The Temporal integration requires CXDOT Collector 1.4.0 or greater.

[Temporal](https://temporal.io/) is a platform for running workflows and activities.
Use the Temporal integration with the Chronosphere XDOT Collector to collect request,
workflow, task, and persistence metrics from Temporal servers running in your
environment.

The Temporal integration supports Temporal 1.29 or greater.

## Supported telemetry types

The Temporal integration supports these telemetry types:

| Type    | Supported |
| ------- | --------- |
| Logs    | No        |
| Metrics | Yes       |
| Traces  | No        |
| Events  | No        |

## Prerequisites

The Temporal integration has the following prerequisites:

* Configure the Temporal frontend, history, matching, and worker server roles that
  you want to monitor to expose a Prometheus metrics endpoint.
* Make each Prometheus metrics endpoint reachable from the collector.

## Configure

To configure the Temporal integration, follow these steps:

1. For Temporal instances, add autodiscovery annotations that provide the full
   Prometheus metrics endpoint URL.

   For more information, see
   [autodiscovery](https://docs.chronosphere.io/ingest/cxdot-collector/autodiscovery).

2. Optional: Configure static targets for Temporal servers that autodiscovery doesn't
   reach. For example, add the following to the `values.yaml` for your Helm chart:

   ```yaml theme={null}
   config:
     integrations:
       temporal:
         endpoints:
           - endpoint: temporal.example.com:9091
   ```

### Validate

To validate the Temporal integration, follow these steps:

1. In Live Telemetry Analyzer, filter for `cxdot.integration.name=temporal`. Confirm
   that the Temporal metric names appear.

2. In Metrics Explorer, run the following query while Temporal processes workflow
   operations:

   ```text theme={null}
   sum by ("url.full", "service_name") (rate({"temporal.server.service.requests"}[$__rate_interval]))
   ```

   Confirm that the query returns the expected time series for each server role that
   processes requests.

For more information about diagnosing a failing integration, see
[Troubleshooting](https://docs.chronosphere.io/ingest/cxdot-collector/troubleshooting).

## Configuration reference

Configure one Temporal integration instance with the following settings. In Helm values, place
these settings under `config.integrations.temporal`. In a Collector configuration file, place
them under `cxdot.integrations.temporal`.

### Optional settings

* **`enabled`**
  Type: `boolean`. Optional. Default: `true`.
  Whether to enable this Temporal integration instance. If true, the Collector collects Temporal
  metrics. If false, the Collector doesn't run this integration instance.

* **`endpoints`**
  Type: `array of object`. Optional.
  Temporal server Prometheus endpoints to monitor. Specify a full HTTP or HTTPS URL, or use
  `host:port` format to request the `/metrics` path over HTTP. When this list contains an
  endpoint, the integration monitors only the listed endpoints and disables discovery through
  annotations for this integration instance. When the list is empty, the integration monitors
  endpoints supplied through Temporal annotations.

* **`endpoints[].endpoint`**
  Type: `string`. Required.
  Temporal server Prometheus endpoint as a full HTTP or HTTPS URL or in `host:port` format. For
  `host:port`, the Collector requests the `/metrics` path over HTTP.

* **`collection_interval`**
  Type: `duration`. Optional. Default: `15s`.
  How often the integration collects metrics from each Temporal endpoint.

* **`timeout`**
  Type: `duration`. Optional. Default: `10s`.
  Maximum time allowed to collect metrics from a Temporal endpoint during one interval. The
  value must be greater than zero.

* **`metrics`**
  Type: `object`. Optional.
  Settings that control which Temporal metrics the integration collects and how it names them.

* **`metrics.include`**
  Type: `array of string`. Optional.
  Regular expressions for exposed metric names to collect in addition to the integration's
  default metric set.

* **`metrics.exclude`**
  Type: `array of string`. Optional.
  Regular expressions for exposed metric names to drop. Exclusions are applied before metric
  renaming and take precedence over `include`.

* **`metrics.rename`**
  Type: `object`. Optional.
  Mapping of exposed metric names to new metric names. These mappings take precedence over the
  integration's default metric names.

* **`labels`**
  Type: `object`. Optional.
  Settings that drop metric samples based on their label values.

* **`labels.sample_drop_rules`**
  Type: `object`. Optional.
  Drops a whole sample when one of its labels matches. Each key is a label name. The value is a
  list of regular expressions matched against the label's value. To drop every sample the label
  appears on with a non-empty value, use `".+"`.


## Related topics

- [Querying delta temporality metrics](/investigate/querying/metrics/delta-queries.md)
- [Long-term downsampling](/control/shaping/shape-metrics/downsampling.md)
