Dynatrace · Arazzo Workflow

Dynatrace Annotate a Deployment with a Custom Event

Version 1.0.0

Resolve a service by name, push a deployment event onto its timeline, and verify it.

1 workflow 2 source APIs 1 provider
View Spec View on GitHub AI OperationsAnalyticsAPMApplication Performance MonitoringApplication SecurityAutomationCloud MonitoringDigital Experience ManagementIntelligenceObservabilityArazzoWorkflows

Provider

dynatrace

Workflows

annotate-deployment-event
Push a deployment event for a named service and verify it landed.
Looks up a service by name, ingests a deployment event targeting it, and lists events to confirm the deployment annotation is present.
3 steps inputs: deployedBy, deploymentTitle, serviceName, version outputs: entityId, eventId, verifiedCount
1
resolveService
lookupEntity
Resolve the service display name to a Dynatrace entity ID so the event can be scoped precisely to that entity.
2
ingestDeploymentEvent
ingestEvent
Ingest a CUSTOM_DEPLOYMENT event onto the resolved service's timeline, carrying the version and deployer as event properties.
3
verifyEvent
listEvents
List recent CUSTOM_DEPLOYMENT events affecting the service to confirm the deployment annotation was accepted and is visible.

Source API Descriptions

Arazzo Workflow Specification

dynatrace-annotate-deployment-event-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Dynatrace Annotate a Deployment with a Custom Event
  summary: Resolve a service by name, push a deployment event onto its timeline, and verify it.
  description: >-
    Records a deployment on the Dynatrace timeline. The workflow first resolves
    the target service from its human-readable name to obtain its entity ID,
    ingests a CUSTOM_DEPLOYMENT event scoped to that service, and then lists
    recent events to confirm the annotation was accepted. Every step spells out
    its request inline so the flow can be read and executed without opening the
    underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: entitiesApi
  url: ../openapi/dynatrace-entities-api-v2-openapi.yml
  type: openapi
- name: eventsApi
  url: ../openapi/dynatrace-events-api-v2-openapi.yml
  type: openapi
workflows:
- workflowId: annotate-deployment-event
  summary: Push a deployment event for a named service and verify it landed.
  description: >-
    Looks up a service by name, ingests a deployment event targeting it, and
    lists events to confirm the deployment annotation is present.
  inputs:
    type: object
    required:
    - serviceName
    - deploymentTitle
    - version
    properties:
      serviceName:
        type: string
        description: The display name of the service being deployed.
      deploymentTitle:
        type: string
        description: A short title describing the deployment (e.g. "Release v2.5.1").
      version:
        type: string
        description: The version identifier being deployed.
      deployedBy:
        type: string
        description: Who or what triggered the deployment (e.g. "CI/CD pipeline").
  steps:
  - stepId: resolveService
    description: >-
      Resolve the service display name to a Dynatrace entity ID so the event
      can be scoped precisely to that entity.
    operationId: lookupEntity
    requestBody:
      contentType: application/json
      payload:
        name: $inputs.serviceName
        type: SERVICE
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      entityId: $response.body#/entityId
      displayName: $response.body#/displayName
  - stepId: ingestDeploymentEvent
    description: >-
      Ingest a CUSTOM_DEPLOYMENT event onto the resolved service's timeline,
      carrying the version and deployer as event properties.
    operationId: ingestEvent
    requestBody:
      contentType: application/json
      payload:
        eventType: CUSTOM_DEPLOYMENT
        title: $inputs.deploymentTitle
        entitySelector: "entityId($steps.resolveService.outputs.entityId)"
        properties:
          version: $inputs.version
          deployedBy: $inputs.deployedBy
    successCriteria:
    - condition: $statusCode == 201
    outputs:
      reportCount: $response.body#/reportCount
      eventId: $response.body#/eventIngestResults/0/eventId
  - stepId: verifyEvent
    description: >-
      List recent CUSTOM_DEPLOYMENT events affecting the service to confirm the
      deployment annotation was accepted and is visible.
    operationId: listEvents
    parameters:
    - name: eventType
      in: query
      value: CUSTOM_DEPLOYMENT
    - name: entitySelector
      in: query
      value: "entityId($steps.resolveService.outputs.entityId)"
    - name: from
      in: query
      value: now-1h
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      totalCount: $response.body#/totalCount
      latestEventId: $response.body#/events/0/eventId
  outputs:
    entityId: $steps.resolveService.outputs.entityId
    eventId: $steps.ingestDeploymentEvent.outputs.eventId
    verifiedCount: $steps.verifyEvent.outputs.totalCount