This document describes the various observability data that can be used to monitor the execution of workflow runs or schedules.
Audits
All NerdGraph mutation calls are audited and the data can be queried in NrAuditEvent in the customer account.
WorkflowRun
SELECT actionIdentifier, actorId, actorType, descriptionFROM NrAuditEvent WHERE targetType = 'workflow_run'SINCE 1 hour agoWorkflowSchedule
SELECT actionIdentifier, actorId, actorType, descriptionFROM NrAuditEvent WHERE targetType = 'workflow_schedule'SINCE 1 hour agoEvents
All workflow runs emit WorkflowAutomationEvent data in NRDB in the customer account which was used to start, or schedule, a workflow.
A new namespace WorkflowAutomation is created for the event data of workflow runs.
WorkflowAutomationEvent schema
Attribute | Type | Description |
|---|---|---|
| EpochMillisecond | Event timestamp |
| WORKFLOW | STEP | Type of event |
| STARTED | COMPLETED | FAILED | TIMED_OUT | STOPPED | Status associated with the event |
| String | The workflow definition name associated with this workflow run |
| String | The workflow definition version associated with this workflow run |
| GLOBAL | ORGANIZATION | ACCOUNT | The workflow definition scope type associated with this workflow run |
| String | The workflow definition scope ID associated with this workflow run |
| String | The workflow definition entityGuid associated with this workflow run |
| Int | New Relic's user ID that started the workflow |
| UUID | Unique ID of the workflow run |
| EpochMillisecond | Duration for a COMPLETED | FAILED | TIMED_OUT status. This is typically what is metered for monetization for ACTION stepType and STEP type. |
| String | Customer-given step name in the workflow |
| ACTION | LOOP | SWITCH | STATE | |
| String | Fully qualified name of the action |
| Int | Version of the action |
Example query
For example:
SELECT *FROM WorkflowAutomationEventwhere definitionName = 'json-parsing' and runId = '31c973d2-c669-4bd7-9b15-7e3a70a4a074'SINCE 1 month ago
Logs
Optionally, a workflow can be started, or scheduled, specifying a logLevel verbosity option. Those logs are added to the workflow account that was used to start, or schedule, the workflow.
Logs are attributed with the following:
workflowAutomation.nameis the WorkflowDefinition nameworkflowAutomation.versionis the WorkflowDefinition versionworkflowAutomation.runIdis the Workflow runIdentityGuidis the WorkflowDefinition id
If started from a schedule occurrence:
workflowAutomation.scheduleId
For Action step type, when using DEBUG each action input adds an additional attribute to the log entry with the format workflowAutomation.inputs.<inputName>: <inputValue>.
When TRACE log level will be implemented, the action output will also be added to the log entry with the format workflowAutomation.outputs.<outputName>: <outputValue>.
Example NRQL query
You can query your log with the following NRQL query:
SELECT message FROM Log WHERE workflowAutomation.runId = '{run_id}' SINCE 3 hours ago
Besides workflowAutomation.runId, some other log attributes that can help with Log data querying are:
workflowAutomation.nameworkflowAutomation.version
For scheduled runs, the log entries will have workflowAutomation.scheduleId attribute as well.