SDK metrics
The information on this page is relevant to Temporal SDKsWhat is a Temporal SDK?
A Temporal SDK is a language-specific library that offers APIs to construct and use a Temporal Client to communicate with a Temporal Cluster, develop Workflow Definitions, and develop Worker Programs.
Learn more.
See Cloud metrics for metrics emitted by Temporal CloudWhat is Temporal Cloud?
Temporal Cloud is a managed, hosted Temporal environment that provides a platform for Temporal Applications.
Learn more.
See Cluster metrics for metrics emitted by the OSS ClusterWhat is a Temporal Cluster?
A Temporal Cluster is the Temporal Server paired with persistence.
Learn more.
The Temporal SDKs emit a set of metrics from Temporal Client usage and Worker Processes.
- How to get started emitting metrics from your SDKHow to emit metrics
Each Temporal SDK is capable of emitting an optional set of metrics from either the Client or the Worker process.
Learn more - How to tune Worker performance based on metrics
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.
Metrics are defined in the following locations. (Typescript and Python SDK metrics are defined in the Core SDK, and PHP SDK metrics are defined in the Go SDK.)
- Core SDK Worker metrics
- Core SDK Client metrics
- Java SDK Worker metrics
- Java SDK Client metrics
- Go SDK Worker and Client metrics
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
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 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.
Metric name | Emitted by | Metric type | Availability |
---|---|---|---|
activity_execution_cancelled | Worker | Counter | Java |
activity_execution_failed | Worker | Counter | TypeScript, Python, Go, PHP, Java |
activity_execution_latency | Worker | Histogram | TypeScript, Python, Go, PHP, Java |
activity_poll_no_task | Worker | Counter | TypeScript, Python, Go, PHP, Java |
activity_schedule_to_start_latency | Worker | Histogram | TypeScript, Python, Go, PHP, Java |
activity_task_error | Worker | Counter | Go, PHP |
corrupted_signals | Worker | Counter | Go, PHP, Java |
local_activity_execution_cancelled | Worker | Counter | Go, PHP, Java |
local_activity_execution_failed | Worker | Counter | Go, PHP, Java |
local_activity_execution_latency | Worker | Histogram | Go, PHP, Java |
local_activity_succeeded_endtoend_latency | Worker | Histogram | Go, PHP, Java |
local_activity_total | Worker | Counter | Go, PHP, Java |
long_request | Service Client | Counter | TypeScript, Python, Go, PHP, Java |
long_request_failure | Service Client | Counter | TypeScript, Python, Go, PHP, Java |
long_request_latency | Service Client | Histogram | TypeScript, Python, Go, PHP, Java |
num_pollers | Worker | Gauge | TypeScript, Python |
poller_start | Worker | Counter | Go, PHP, Java |
request | Service Client | Counter | TypeScript, Python, Go, PHP, Java |
request_failure | Service Client | Counter | TypeScript, Python, Go, PHP, Java |
request_latency | Service Client | Histogram | TypeScript, Python, Go, PHP, Java |
sticky_cache_hit | Worker | Counter | TypeScript, Python, Go, PHP, Java |
sticky_cache_miss | Worker | Counter | TypeScript, Python, Go, PHP, Java |
sticky_cache_size | Worker | Gauge | TypeScript, Python, Go, PHP, Java |
sticky_cache_total_forced_eviction | Worker | Counter | Go, PHP, Java |
unregistered_activity_invocation | Worker | Counter | Go, PHP |
worker_start | Worker | Counter | TypeScript, Python, Go, PHP, Java |
worker_task_slots_available | Worker | Gauge | Go, PHP, Java |
workflow_active_thread_count | Worker | Gauge | Java |
workflow_cancelled | Worker | Counter | TypeScript, Python, Go, PHP, Java |
workflow_completed | Worker | Counter | TypeScript, Python, Go, PHP, Java |
workflow_continue_as_new | Worker | Counter | TypeScript, Python, Go, PHP, Java |
workflow_endtoend_latency | Worker | Histogram | TypeScript, Python, Go, PHP, Java |
workflow_failed | Worker | Counter | TypeScript, Python, Go, PHP, Java |
workflow_task_execution_failed | Worker | Counter | TypeScript, Python, Go, PHP, Java |
workflow_task_execution_latency | Worker | Histogram | TypeScript, Python, Go, PHP, Java |
workflow_task_queue_poll_empty | Worker | Counter | TypeScript, Python, Go, PHP, Java |
workflow_task_queue_poll_succeed | Worker | Counter | TypeScript, Python, Go, PHP, Java |
workflow_task_replay_latency | Worker | Histogram | TypeScript, Python, Go, PHP, Java |
workflow_task_schedule_to_start_latency | Worker | Histogram | TypeScript, Python, Go, PHP, 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.
- Type: Counter
- Available in: TypeScript, Python, Go, PHP, 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: TypeScript, Python, Go, PHP, 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: TypeScript, Python, Go, PHP, Java
- Tags:
activity_type
,namespace
,task_queue
activity_schedule_to_start_latency
The Schedule-To-Start time of an Activity Task in milliseconds.
A Schedule-To-Start TimeoutWhat is a Schedule-To-Start Timeout?
A Schedule-To-Start Timeout is the maximum amount of time that is allowed from when an Activity Task is placed in a Task Queue to when a Worker picks it up from the Task Queue.
Learn more 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: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,task_queue
activity_task_error
An internal error or panic occurred during Activity Task handling or execution.
- Type: Counter
- Available in: Go, PHP
- Tags:
activity_type
,namespace
,task_queue
,workflow_type
corrupted_signals
Number of Signals whose payload could not be deserialized.
- Type: Counter
- Available in: Go, PHP, Java
- Tags:
namespace
,task_queue
,workflow_type
local_activity_execution_cancelled
A Local Activity Execution was canceled.
- Type: Counter
- Available in: Go, PHP, Java
- Tags:
activity_type
,namespace
,task_queue
local_activity_execution_failed
A Local Activity Execution failed.
- Type: Counter
- Available in: Go, PHP, 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: Go, PHP, 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: Go, PHP, Java
- Tags:
activity_type
,namespace
,task_queue
local_activity_total
Total number of Local Activity ExecutionsWhat is a Local Activity?
A Local Activity is an Activity Execution that executes in the same process as the Workflow Execution that spawns it.
Learn more.
- Type: Counter
- Available in: Go, PHP, Java
- Tags:
activity_type
,namespace
,task_queue
long_request
Temporal Client made an RPC long poll request.
- Type: Counter
- Available in: TypeScript, Python, Go, PHP, 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: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,operation
long_request_latency
Latency of a Temporal Client gRPC long poll request.
- Type: Histogram
- Available in: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,operation
num_pollers
Current number of Worker Entities that are polling.
- Type: Gauge
- Available in: TypeScript, Python
- Tags:
namespace
,poller_type
,task_queue
poller_start
A Worker Entity poller was started.
- Type: Counter
- Available in: Go, PHP, Java
- Tags:
namespace
,task_queue
request
Temporal Client made an RPC request.
- Type: Counter
- Available in: TypeScript, Python, Go, PHP, 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: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,operation
request_latency
Latency of a Temporal Client gRPC request.
- Type: Histogram
- Available in: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,operation
sticky_cache_hit
A Workflow Task found a cached Workflow Execution Event History to run against.
- Type: Counter
- Available in: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,task_queue
sticky_cache_miss
A Workflow Task did not find a cached Workflow Worker.
- Type: Counter
- Available in: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,task_queue
sticky_cache_size
Current cache size, expressed in number of Workflow Executions.
- Type: Gauge
- Available in: TypeScript, Python, Go, PHP, 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, PHP, 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, PHP
- Tags:
activity_type
,namespace
,task_queue
,workflow_type
worker_start
A Worker Entity has been registered, created, or started.
- Type: Counter
- Available in: TypeScript, Python, Go, PHP, 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: Go, PHP, 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: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,task_queue
,workflow_type
workflow_completed
A Workflow Execution completed successfully.
- Type: Counter
- Available in: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,task_queue
,workflow_type
workflow_continue_as_new
A Workflow ended with Continue-As-New.
- Type: Counter
- Available in: TypeScript, Python, Go, PHP, 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: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,task_queue
,workflow_type
workflow_failed
A Workflow Execution failed.
- Type: Counter
- Available in: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,task_queue
,workflow_type
workflow_task_execution_failed
A Workflow Task Execution failed.
- Type: Counter
- Available in: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,task_queue
,workflow_type
workflow_task_execution_latency
Workflow Task Execution time.
- Type: Histogram
- Available in: TypeScript, Python, Go, PHP, 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: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,task_queue
,workflow_type
workflow_task_queue_poll_succeed
A Workflow Worker polled a Task Queue and successfully picked up a Workflow Task.
- Type: Counter
- Available in: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,task_queue
,workflow_type
workflow_task_replay_latency
Time to catch up on replaying a Workflow Task.
- Type: Histogram
- Available in: TypeScript, Python, Go, PHP, 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: TypeScript, Python, Go, PHP, Java
- Tags:
namespace
,task_queue
,workflow_type