Skip to main content

Temporal SDK metrics reference

SDK metrics

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 the following reference.) Currently, some metrics are specific to certain SDKs.

TypeScript, Python, and .NET SDKs 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.

Metric units across SDKs

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 polling
  • namespace: Namespace the Worker is bound to
  • poller_type: One of the following:
    • workflow_task
    • activity_task
    • sticky_workflow_task
  • worker_type: One of the following:
    • ActivityWorker
    • WorkflowWorker
    • LocalActivityWorker (Go and Java only)
  • activity_type: The name of the Activity Function the metric is associated with
  • workflow_type: The name of the Workflow Function the metric is associated with
  • operation: 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.

Metric nameEmitted byMetric typeAvailability
activity_execution_cancelledWorkerCounterJava
activity_execution_failedWorkerCounterCore, Go, Java
activity_execution_latencyWorkerHistogramCore, Go, Java
activity_poll_no_taskWorkerCounterCore, Go, Java
activity_schedule_to_start_latencyWorkerHistogramCore, Go, Java
activity_succeed_endtoend_latencyWorkerHistogramCore, Go, Java
activity_task_errorWorkerCounterGo
corrupted_signalsWorkerCounterGo, Java
local_activity_execution_cancelledWorkerCounterCore, Go, Java
local_activity_execution_failedWorkerCounterCore, Go, Java
local_activity_execution_latencyWorkerHistogramCore, Go, Java
local_activity_succeeded_endtoend_latencyWorkerHistogramCore, Go, Java
local_activity_totalWorkerCounterCore, Go, Java
long_requestService ClientCounterCore, Go, Java
long_request_failureService ClientCounterCore, Go, Java
long_request_latencyService ClientHistogramCore, Go, Java
num_pollersWorkerGaugeCore
poller_startWorkerCounterGo, Java
requestService ClientCounterCore, Go, Java
request_failureService ClientCounterCore, Go, Java
request_latencyService ClientHistogramCore, Go, Java
sticky_cache_hitWorkerCounterCore, Go, Java
sticky_cache_missWorkerCounterCore, Go, Java
sticky_cache_sizeWorkerGaugeCore, Go, Java
sticky_cache_total_forced_evictionWorkerCounterGo, Java
unregistered_activity_invocationWorkerCounterGo
worker_startWorkerCounterCore, Go, Java
worker_task_slots_availableWorkerGaugeCore, Go, Java
workflow_active_thread_countWorkerGaugeJava
workflow_cancelledWorkerCounterCore, Go, Java
workflow_completedWorkerCounterCore, Go, Java
workflow_continue_as_newWorkerCounterCore, Go, Java
workflow_endtoend_latencyWorkerHistogramCore, Go, Java
workflow_failedWorkerCounterCore, Go, Java
workflow_task_execution_failedWorkerCounterCore, Go, Java
workflow_task_execution_latencyWorkerHistogramCore, Go, Java
workflow_task_queue_poll_emptyWorkerCounterCore, Go, Java
workflow_task_queue_poll_succeedWorkerCounterCore, Go, Java
workflow_task_replay_latencyWorkerHistogramCore, Go, Java
workflow_task_schedule_to_start_latencyWorkerHistogramCore, Go, Java

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: activity_type, 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

activity_task_error

An internal error or panic occurred during Activity Task handling or execution.

  • Type: Counter
  • Available in: Go,
  • Tags: activity_type, namespace, task_queue, workflow_type

corrupted_signals

Number of Signals whose payload could not be deserialized.

  • Type: Counter
  • Available in: Go, Java
  • Tags: namespace, task_queue, workflow_type

local_activity_execution_cancelled

A Local Activity Execution was canceled.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: activity_type, namespace, task_queue

local_activity_execution_failed

A Local Activity Execution failed.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: activity_type, namespace, task_queue

local_activity_execution_latency

Time to complete a Local Activity Execution, from the time the first Activity Task is generated to the time the SDK responds that the execution is complete.

  • Type: Histogram
  • Available in: Core, Go, Java
  • Tags: activity_type, namespace, task_queue

local_activity_succeeded_endtoend_latency

Total latency of successfully finished Local Activity Executions (from schedule to completion).

  • Type: Histogram
  • Available in: Core, Go, Java
  • Tags: activity_type, namespace, task_queue

local_activity_total

Total number of Local Activity Executions.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: activity_type, namespace, task_queue

long_request

Temporal Client made an RPC long poll request.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, operation

long_request_failure

Temporal Client made an RPC long poll request that failed. This number is included into the total long_request counter for long poll RPC requests.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, operation

long_request_latency

Latency of a Temporal Client gRPC long poll request.

  • Type: Histogram
  • Available in: Core, Go, Java
  • Tags: namespace, operation

num_pollers

Current number of Worker Entities that are polling.

  • Type: Gauge
  • Available in: Core
  • Tags: namespace, poller_type, task_queue

poller_start

A Worker Entity poller was started.

  • Type: Counter
  • Available in: Go, Java
  • Tags: namespace, task_queue

request

Temporal Client made an RPC request.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, operation

request_failure

Temporal Client made an RPC request that failed. This number is included into the total request counter for RPC requests.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, operation

request_latency

Latency of a Temporal Client gRPC request.

  • Type: Histogram
  • Available in: Core, Go, Java
  • Tags: namespace, operation

sticky_cache_hit

A Workflow Task found a cached Workflow Execution Event History to run against.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue

sticky_cache_miss

A Workflow Task did not find a cached Workflow Worker.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue

sticky_cache_size

Current cache size, expressed in number of Workflow Executions.

  • Type: Gauge
  • Available in: Core, Go, Java
  • Tags: namespace (TypeScript, Java), task_queue (TypeScript)

sticky_cache_total_forced_eviction

A Workflow Execution has been forced from the cache intentionally.

  • Type: Counter
  • Available in: Go, Java
  • Tags: namespace, task_queue

unregistered_activity_invocation

A request to spawn an Activity Execution is not registered with the Worker.

  • Type: Counter
  • Available in: Go,
  • Tags: activity_type, namespace, task_queue, workflow_type

worker_start

A Worker Entity has been registered, created, or started.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue, worker_type

worker_task_slots_available

The total number of Workflow Task and Activity Task execution slots that are currently available. Use the worker_type key to differentiate execution slots. (Workflow Workers execute Workflow Tasks; Activity Workers execute Activity Tasks.)

  • Type: Gauge
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue, worker_type

workflow_active_thread_count

Total amount of Workflow threads in the Worker Process.

  • Type: Gauge
  • Available in: Java

workflow_cancelled

Workflow Execution ended because of a cancellation request.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue, workflow_type

workflow_completed

A Workflow Execution completed successfully.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue, workflow_type

workflow_continue_as_new

A Workflow ended with Continue-As-New.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue, workflow_type

workflow_endtoend_latency

Total Workflow Execution time from schedule to completion for a single Workflow Run. (A retried Workflow Execution is a separate Run.)

  • Type: Histogram
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue, workflow_type

workflow_failed

A Workflow Execution failed.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue, workflow_type

workflow_task_execution_failed

A Workflow Task Execution failed.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue, workflow_type

workflow_task_execution_latency

Workflow Task Execution time.

  • Type: Histogram
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue, workflow_type

workflow_task_queue_poll_empty

A Workflow Worker polled a Task Queue and timed out without picking up a Workflow Task.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue

workflow_task_queue_poll_succeed

A Workflow Worker polled a Task Queue and successfully picked up a Workflow Task.

  • Type: Counter
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue

workflow_task_replay_latency

Time to catch up on replaying a Workflow Task.

  • Type: Histogram
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue, workflow_type

workflow_task_schedule_to_start_latency

The Schedule-To-Start time of a Workflow Task.

  • Type: Histogram
  • Available in: Core, Go, Java
  • Tags: namespace, task_queue