When configuring a Synthetic monitor of any type, you can apply primary Grail tags to the monitor. After that, all events and metrics generated by the monitor are enriched with these primary Grail tags. Primary Grail tags provide filtering, grouping, and bucket assignment across your Synthetic telemetry. You can retrieve:
Configure primary Grail tags directly on each monitor through the Dynatrace UI or the Synthetic API. This way, tags are added to both the data produced by the monitor and to the Smartscape node that represents the monitor.
UI: Go to
Synthetic, select your monitor, select Edit, and then go to Primary Grail tags and add key-value pairs.
API: Use the same monitor configuration endpoint you use to create or update monitors. Include primaryGrailTags in the request body:
{"primaryGrailTags": [{"key": "team","value": "team-payments"},{"key": "environment","value": "production"}]}
Primary Grail tags are configured per monitor. At every execution, Dynatrace propagates the monitor's tags to all events and metrics produced by that execution. Tags aren't inherited from the Synthetic location, host group, or any other entity.
All three Synthetic monitor types support primary Grail tags.
When you apply primary Grail tags to the monitor, keep the following constraints in mind:
Retrieve monitor events related to tagged monitors using the primary_tags.__key__ field.
Example:
fetch dt.synthetic.events| filter primary_tags.team == "team-payments"| filter event.type == "browser_monitor_execution" OR event.type == "http_monitor_execution" OR event.type == "network_availability_monitor_execution"| filter result.state == "FAIL"| fields timestamp, monitor.name, event.type, primary_tags.team, result.state, result.failed_step.name
Retrieve Synthetic metrics using the primary_tags.__key__ dimension for grouping and filtering data.
Examples for:
timeseries av =avg(dt.synthetic.browser.availability),by: { primary_tags.team },filter: isNotNull(primary_tags.team)
timeseries av =avg(dt.synthetic.http.availability),by: { primary_tags.team },filter: isNotNull(primary_tags.team)
timeseries av =avg(dt.synthetic.multi_protocol.availability),by: { primary_tags.team },filter: isNotNull(primary_tags.team)