Try it free

Guardian execution context

  • Latest Dynatrace
  • How-to guide
  • 2-min read

Your Continuous Integration (CI) tools, such as Jenkins, can send SDLC events to Dynatrace. These events can then trigger Site Reliability Guardian validations in a workflow.

If you want to filter the Site Reliability Guardian validation events based on the source trigger, the created SDLC events must contain context information from the external tool. The context information can be carried by an externalId, a version number, a build number, or any parameter that lets you identify the tool.

Context propagation

To propagate the execution context, the event triggering a workflow execution must contain the execution_context field, as in the example below.

{
"event.id": "d08a70d8-f6de-4d0d-bd34-5d416a20ba6a",
"event.kind": "SDLC_EVENT",
"event.category": "task",
"event.type": "deployment",
"event.status": "finished",
"event.version": "0.1.0",
"event.provider": "Jenkins",
"timestamp": 1678256963078000000,
"start_time": 1678253348809000000,
"end_time": 1678256948809000000,
"duration": 3600000000000,
"cicd.deployment.id": "4711",
"cicd.deployment.name": "deploy carts",
"cicd.deployment.release_stage": "hardening",
"cicd.deployment.status": "failed",
"task.id": "4711",
"task.name": "deploy carts",
"task.outcome": "Failure",
"execution_context": {
"buildId": "4711"
}
}

The context execution is propagated to the guardian validation events. The started, finished, and objectives validation events all contain the propagated execution_context field.

This is an SDLC event payload emitted by Site Reliability guardian when a validation run finishes.

{
"timestamp": "2026-05-13T12:00:23.490000000+02:00",
"event.version": "0.1.2",
"event.id": "{eventId}",
"event.provider": "dynatrace.site.reliability.guardian",
"event.type": "validation",
"event.status": "finished",
"dt.srg.id": "{guardianId}",
"task.id": "{task}",
"validation.from": "2026-05-11T10:00:16.340Z",
"validation.to": "2026-05-13T10:00:16.340Z",
"dt.srg.tags": "{Array of tags}",
"dt.srg.variables": null,
"dt.srg.triggered_by.user.id": "{userId}",
"dt.srg.execution_context": "{\"buildId\": \"4711\", \"version\": \"0.1.0\"}",
"dt.automation_engine.workflow.id": "{workflowId}",
"dt.automation_engine.workflow_execution.id": "{workflowExecutionId}",
"dt.automation_engine.workflow_execution.trigger.type": "Event",
"dt.automation_engine.workflow.type": "STANDARD",
"dt.srg.name": "Payment Service Guardian v2.1",
"validation.result": "fail",
"dt.srg.validation.errors": null,
"dt.srg.validation.summary": "{objectivesSummary}",
"dt.openpipeline.source": "/platform/ingest/v1/events.sdlc",
"event.kind": "SDLC_EVENT",
"start_time": "2026-05-13T12:00:23.488000000+02:00",
"end_time": "2026-05-13T12:00:23.488000000+02:00",
"event.category": "task",
"dt.openpipeline.pipelines": [
"events.sdlc:pipeline_operational_sdlc_events"
]
}

Query guardian data using execution context

Recommended Query by guardian ID

This DQL query retrieves the completed Site Reliability guardian validation results from the SDLC event stream.

fetch events
| filter event.kind == "SDLC_EVENT"
| filter event.provider == "dynatrace.site.reliability.guardian"
| filter event.type == "validation"
| filter event.status == "finished"

Use SDLC events

This DQL shows the first validation.objective SDLC event with a specific guardian ID and parses the execution context field to extract a specific value from the event JSON.

fetch events
| filter event.kind == "SDLC_EVENT"
AND event.provider == "dynatrace.site.reliability.guardian"
AND event.type == "validation.objective"
AND dt.srg.id == "<your-guardian-id>"
| limit 1
| parse dt.srg.execution_context, "JSON:parsed_execution_context"

This DQL shows you all guardian.validation.finished SDLC events where the execution context is defined by buildid equal to 4711.

fetch events
| filter event.kind == "SDLC_EVENT"
AND event.provider == "dynatrace.site.reliability.guardian"
AND event.type == "validation"
AND event.status == "finished"
| parse dt.srg.execution_context, "JSON:parsed_execution_context"
| filter parsed_execution_context[buildId] == "4711"
Related tags
Application Observability