Send deployment, configuration, and testing context for monitored services using the Dynatrace API.
Below is what Dynatrace events look like.
Class | Library Function | Description |
---|---|---|
Event | pushDynatraceEvent | Used to push an Event to Dynatrace |
See example Jenkinsfiles in the examples folder
These functions work best with a TagRule as to target specific services using Dynatrace tags.
Here is an example service with a few tags.
Here is an example rule for a service.
def tagMatchRules = [[
"meTypes": [ "SERVICE"],
tags: [
["context": "CONTEXTLESS", "key": "project", "value": "demo"],
["context": "CONTEXTLESS", "key": "stage", "value": "dev"],
["context": "CONTEXTLESS", "key": "service", "value": "simple-web-app-1"]
]
]]
In addition to the to required fields, additonal properties can be added too, for example:
customProperties : [
"Jenkins JOB_NAME": "${env.JOB_NAME}",
"Jenkins BUILD_NUMBER": "${env.BUILD_NUMBER}"
]