Latest Dynatrace
Synthetic for Workflows allows you to execute synthetic monitors on demand at selected locations within your workflows. Dynatrace can respond to any event and execute synthetic monitors within the workflows to assess its impact on user experience. Depending on the outcome, Workflows can notify the team by creating a Jira ticket, sending a Slack message, or initiating a remediation process.
With Synthetic for Workflows, you can choose which monitors you want to execute.
It is also possible to use workflow expressions to extract the list of monitors and locations from incoming events, which enables you to create reusable workflows.
To use Synthetic for Workflow actions, you first need to install Synthetic for Workflows from Dynatrace Hub.
After installation, synthetic_for_workflows
actions appear automatically in the Choose action section of Workflows.
Before you begin, ensure that your monitors are properly defined. To create a new monitor, search for Synthetic in Dynatrace Hub .
The permission you need are listed in Introduction to workflows. Additionally, for executing Synthetic for Workflows you need the following permissions
environment:roles:manage-settings,storage:buckets:read,storage:events:read
Example policy:
ALLOWapp-engine:apps:run,automation:workflows:read,app-engine:functions:run,automation:workflows:run,automation:workflows:write,environment:roles:manage-settings,storage:buckets:read,storage:events:read;
synthetic_for_workflows
actionTo select monitors from the list for Synthetic for Workflows, you need to specify the synthetic monitors that you want to execute when the workflow is triggered. You can choose the monitor from Visual or From event. You can find the most relevant monitors by filtering the list by various criteria such as type, name, applications, and tags.
You can also
In Select a synthetic location
If you don't select any location, the monitor will be executed at the location defined in the monitor configuration.
With the Add metadata section you can enrich your synthetic result with execution context, such as the application name, version, development stage, and build version.
To add metadata
You can customize execution settings that will be applied to all executions within Workflows.
To do this switch on or off any of the following:
Note that Synthetic does not generate Grail events for non-DPS tenants. All processing will rely solely on API data. To learn more about DPS licensing, see Dynatrace Platform Subscription (DPS).
Results from synthetic monitors executed on-demand are stored as events in Grail.
There are three types of events:
batch_status
- contains the summary result of all the monitor executions within the batchbrowser_monitor_execution
- contains detailed information for one browser monitor executionhttp_monitor_execution
- contains detailed information for one HTTP monitor executionIf you want to evaluate objectives based on the results from synthetic monitors, you can integrate Site Reliability Guardian (SRG) as the next action in your workflow.
To do this
synthetic_for_workflows
task and then select Site Reliability Guardian from Choose action. This will trigger a site_reliability_guardian_1
task.site_reliability_guardian_1
task. In Variables provide the batchId
parameter from the synthetic result and the {{ result("synthetic_for_workflows_1")["event.id"] }}
value. You can replace "synthetic_for_workflows_1_"
with any other task name.batchId
in the Name field. In the Value field, provide the default value. Select the Add button to save your changes.Note that queries for synthetic events from outside the Synthetic application, such as those from Notebooks, Dashboards, and SRG, are not charged.
Use the following query to get the total duration of the whole batch.
fetch dt.synthetic.events| filter event.id == $batchId| fields dt.synthetic.result.duration
Use the following query to check if the batch finished successfully.
fetch dt.synthetic.events| filter event.id == $batchId| filter dt.synthetic.batch.status == "Success"| summarize count = count()