Temporal SDK metrics reference
The information on this page is relevant to Temporal SDKs.
See Cloud metrics for metrics emitted by Temporal Cloud.
See Cluster metrics for metrics emitted by the OSS Cluster.
Some SDKs may emit metrics beyond what is listed in this SDK Metrics reference. Only metrics included in this Metrics reference have guaranteed, defined behavior. Other metrics are considered deprecated, inconsistent or experimental.
The Temporal SDKs emit a set of metrics from Temporal Client usage and Worker Processes.
All metrics are prefixed with temporal_
before being exported to their configured destination.
(The prefix has been removed in parts of this reference.)
Currently, some metrics are specific to certain SDKs.
TypeScript, Python, .NET, and Ruby SDK metrics are defined in the Core SDK.
PHP and Go metrics are defined in the Go SDK.
Java metrics are defined in the Java SDK. Metrics are defined in the following locations.
- Core SDK Worker metrics
- Core SDK Client metrics
- Java SDK Worker metrics
- Java SDK Client metrics
- Go SDK Worker and Client metrics
The unit of measurement for metrics can vary based on which SDK they are being reported from:
Core-based SDKs: Metrics of the type Histogram are measured in milliseconds by default. This can be customized to use seconds for SDKs using Core SDK. The Core SDK is a shared common core library used by several Temporal SDKs, including TypeScript, Python, and .NET.
Java and Go SDKs: Metrics of the type Histogram are measured in seconds.
Each metric may have some combination of the following keys attached to them:
task-queue
: Task Queue that the Worker Entity is pollingnamespace
: Namespace the Worker is bound topoller_type
: One of the following:workflow_task
activity_task
nexus_task
(Go and Java only)sticky_workflow_task
worker_type
: One of the following:ActivityWorker
WorkflowWorker
LocalActivityWorker
(Go and Java only)NexusWorker
(Go and Java only)
activity_type
: The name of the Activity Function the metric is associated withworkflow_type
: The name of the Workflow Function the metric is associated withoperation
: RPC method name; available for metrics related to Temporal Client gRPC requests
Some keys may not be available in every SDK, and Histogram metrics may have different buckets in each SDK.
activity_execution_cancelled
An Activity Execution was canceled.
- Type: Counter
- Available in: Java
- Tags:
activity_type
,namespace
,task_queue
activity_execution_failed
An Activity Execution failed. This does not include local Activity Failures in the Go and Java SDKs (see local_activity_execution_failed).
- Type: Counter
- Available in: Core, Go, Java
- Tags:
activity_type
,namespace
,task_queue
activity_execution_latency
Time to complete an Activity Execution, from the time the Activity Task is generated to the time the language SDK responded with a completion (failure or success).
- Type: Histogram
- Available in: Core, Go, Java
- Tags:
activity_type
,namespace
,task_queue
activity_poll_no_task
An Activity Worker poll for an Activity Task timed out, and no Activity Task is available to pick from the Task Queue.
- Type: Counter
- Available in: Core, Go, Java
- Tags:
namespace
,task_queue
activity_schedule_to_start_latency
The Schedule-To-Start time of an Activity Task in seconds.
A Schedule-To-Start Timeout can be set when an Activity Execution is spawned.
This metric is useful for ensuring Activity Tasks are being processed from the queue in a timely manner. Some SDKs may include
the activity_type
label, but the metric should not vary by type, as it does not influence the rate at which tasks are pulled
from the queue.
- Type: Histogram
- Available in: Core, Go, Java
- Tags:
namespace
,task_queue
activity_succeed_endtoend_latency
Total latency of successfully finished Activity Executions from the time they are scheduled to the time they are completed. This metric is not recorded for async Activity completion.
- Type: Histogram
- Available in: Core, Go, Java
- Tags:
activity_type
,namespace
,task_queue