Skip to content

Latest commit

 

History

History
47 lines (32 loc) · 1.4 KB

POSTEVENTS.md

File metadata and controls

47 lines (32 loc) · 1.4 KB

Information Events

Send deployment, configuration, and testing context for monitored services using the Dynatrace API.

Below is what Dynatrace events look like.

Library functions

Class Library Function Description
Event pushDynatraceEvent Used to push an Event to Dynatrace

Examples

See example Jenkinsfiles in the examples folder

Additonal Usage Details

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}"
]