# Telemetry Argo Workflows emits the standard signals: traces, metrics and logs. ## Configuration Both metrics and tracing use the OpenTelemetry protocol and can be configured through environment variables and the workflow-controller ConfigMap. Logging is emitted via stderr. Metrics can also be scraped using Prometheus. ### OpenTelemetry This is common configuration for metrics and tracing. To enable the OpenTelemetry protocol you must set the environment variable `OTEL_EXPORTER_OTLP_ENDPOINT`, or the signal-specific endpoints `OTEL_EXPORTER_OTLP_METRICS_ENDPOINT` and `OTEL_EXPORTER_OTLP_TRACES_ENDPOINT`. This must be set on the workflow-controller, and ideally on all the containers (`main`, `init`, and `wait`) in the workload. You can use the [OpenTelemetry operator](https://opentelemetry.io/docs/kubernetes/operator/) to setup the collector and instrument the workflow-controller. The OpenTelemetry operator can also instrument your workload pods so that they emit spans as part of workflow tracing and this is the recommended setup. It will not be enabled unless `OTEL_EXPORTER_OTLP_ENDPOINT` or the applicable signal-specific endpoint is configured and non-empty. You can configure the protocol using the environment variables documented in the [OpenTelemetry standard environment variables](https://opentelemetry.io/docs/languages/sdk-configuration/otlp-exporter/). By default, GRPC is used; to switch to HTTP, set either the `OTEL_EXPORTER_OTLP_PROTOCOL` or signal-specific `OTEL_EXPORTER_OTLP_METRICS_PROTOCOL` / `OTEL_EXPORTER_OTLP_TRACES_PROTOCOL` environment variable to `http/protobuf`. To use the [OpenTelemetry collector](https://opentelemetry.io/docs/collector/) you can configure it: ```yaml receivers: otlp: protocols: grpc: endpoint: 0.0.0.0:4317 ``` ## Metrics ### OpenTelemetry Metrics OpenTelemetry is the recommended way of collecting metrics. The OpenTelemetry collector can also export metrics to Prometheus via [the Prometheus remote write exporter](https://github.com/open-telemetry/opentelemetry-collector-contrib/blob/main/exporter/prometheusremotewriteexporter/README.md). To configure OpenTelemetry see [the common configuration information](#opentelemetry). You can configure the [temporality](https://opentelemetry.io/docs/specs/otel/metrics/data-model/#temporality) of OpenTelemetry metrics in the [Workflow Controller ConfigMap](workflow-controller-configmap.md): ```yaml metricsConfig: | # Which temporality to use for OpenTelemetry. Default is "Cumulative" temporality: Delta ``` The [configuration options](#common-metrics-settings) `metricsTTL`, `modifiers` and `temporality` affect the OpenTelemetry behavior, but the other Prometheus-specific parameters do not. ### Prometheus Scraping A metrics service is not installed as part of the installation of Argo so you will need to add one if you wish to use a Prometheus Service Monitor. If you have more than one controller pod, using one as a [hot-standby](high-availability.md), you should use [a headless service](https://kubernetes.io/docs/concepts/services-networking/service/#headless-services) to ensure that each pod is being scraped so that no metrics are missed. ```yaml cat <