Amazon SWF Metrics for CloudWatch

Amazon SWF now provides metrics for Amazon CloudWatch that you can use to track your workflows and activities and set alarms on threshold values that you choose.

You can view metrics using the AWS Management Console or using the AWS CLI. For more information, see Viewing, Graphing, and Publishing Metrics in the CloudWatch User Guide.

Working with Metrics#

Metrics that Report a Time Interval#

Amazon SWF metrics for CloudWatch that report time intervals are always measured in milliseconds. These metrics generally correspond to stages of your workflow execution for which you can set workflow and activity timeouts, and have similar names.

For example, the DecisionTaskStartToCloseTime metric measures the time it took for the decision task to complete after it began executing, which is the same time period for which you can set a DecisionTaskStartToCloseTimeout value.

For a diagram of each of these workflow stages and to learn when they occur over the workflow and activity lifecycles, see Amazon SWF Timeout Types.

Metrics that Report a Count#

Some of the Amazon SWF metrics for CloudWatch report results as a count. For example, WorkflowsCanceled, records a result as either one or zero, indicating whether or not the workflow was canceled, respectively.

Note

A value of zero indicates only that the condition described by the metric did not occur, not that the metric isn't reported.

For count metrics, minimum and maximum will always be either zero or one, but average will be a value ranging from zero to one.

Amazon SWF Workflow Metrics#

The following metrics are available for Amazon SWF workflows:

Metric Description
DecisionTaskScheduleToStartTime the time interval in milliseconds between the time that the decision task was scheduled and the time it was picked up by a worker and started
DecisionTaskStartToCloseTime the time interval in milliseconds between the time that the decision task was started and the time it was closed
DecisionTasksCompleted the count of decision tasks that have been completed
StartedDecisionTasksTimedOutOnClose the count of decision tasks that started but timed out on closing
WorkflowStartToCloseTime the time in milliseconds between the time the workflow started and the time it closed
WorkflowsCanceled the count of workflows that were canceled
WorkflowsCompleted the count of workflows that completed
WorkflowsContinuedAsNew the count of workflows that continued as new
WorkflowsFailed the count of workflows that failed
WorkflowsTerminated the count of workflows that were terminated
WorkflowsTimedOut The count of workflows that timed out for any reason

Dimensions for Amazon SWF Workflow Metrics#

Dimension Description
Domain The Amazon SWF domain that the workflow is running in
WorkflowTypeName The name of the workflow type for this workflow execution
WorkflowTypeVersion The version of the workflow type for this workflow execution

Amazon SWF Activity Metrics#

The following metrics are available for Amazon SWF activities:

Metric Description
ActivityTaskScheduleToCloseTime The time interval in milliseconds between the time when the activity was scheduled to when it closed
ActivityTaskScheduleToStartTime The time interval in milliseconds between the time when the activity task was scheduled and when it started
ActivityTaskStartToCloseTime The time interval in milliseconds between the time when the activity task started and when it was closed
ActivityTasksCanceled The count of activity tasks that were canceled
ActivityTasksCompleted The count of activity tasks that completed
ActivityTasksFailed The count of activity tasks that failed
ScheduledActivityTasksTimedOutOnClose The count of activity tasks that were scheduled but timed out on close
ScheduledActivityTasksTimedOutOnStart The count of activity tasks that were scheduled but timed out on start
StartedActivityTasksTimedOutOnClose The count of activity tasks that were started but timed out on close
StartedActivityTasksTimedOutOnHeartbeat The count of activity tasks that were started but timed out due to a heartbeat timeout

Dimensions for Amazon SWF Activity Metrics#

Dimension Description
Domain The Amazon SWF domain that the activity is running in
ActivityTypeName The name of the activity type
ActivityTypeVersion The version of the activity type