Skip to main content

Export to Dynatrace via OpenTelemetry

Our OpenTelemetry Webhook allows you to send your API traffic to Dynatrace. There is no Dynatrace alert type; use one of the two OpenTelemetry types:

To see what arrives in Dynatrace before you set anything up, go to What you see in Dynatrace.

Configure Dynatrace to Receive Webhooks from APIContext​

Generate an Access Token for APIContext in your Dynatrace environment, with the following scopes: "Ingest logs," "Ingest metrics," and "Ingest OpenTelemetry traces." Securely copy the generated access token.


Send all monitoring results to Dynatrace​

  1. In the sidebar, under Configure Monitoring, select Alerts & Webhooks.

  2. Click Add new alert.

  3. Enter a Name, such as "Dynatrace results."

  4. In Type, under Performance Events, choose OpenTelemetry. Do not choose OpenTelemetry (Conformance Events), which sends conformance events only.

  5. In URL, enter the Dynatrace OTLP traces endpoint (replacing <Dynatrace-Environment-ID> with your environment ID):

    https://<Dynatrace-Environment-ID>.live.dynatrace.com/api/v2/otlp/v1/traces

  6. In HTTP Header 1, enter the following header (replacing <Access-Token> with the access token value copied from Dynatrace):

    Authorization: Api-Token <Access-Token>

  7. Under Trigger alerts, turn on Pass, Slow, Warning, and Fail. With all four on, every result is sent.

  8. Optional: use Include tags and Exclude tags to limit which monitors are sent.

  9. Click Save.

Each result arrives in Dynatrace as an OpenTelemetry trace, starting from the next monitor run. For every span and attribute, see the OpenTelemetry payload reference.

Send conformance events to Dynatrace​

In the sidebar, under Configure Monitoring, select Alerts & Webhooks.

APImetrics Alerts and Webhooks screen showing the configured alerts and actions for a project

From here, select the Add new alert button.

APImetrics Alerts and Webhooks screen with the Add new alert button highlighted

Assign a descriptive name to the webhook, such as "Dynatrace Conformance Events."
Then, select the alert type from the drop down list of "OpenTelemetry (Conformance Events)."

APImetrics alert named Dynatrace Conformance Events with the Type dropdown open and OpenTelemetry (Conformance Events) highlighted

In the URL field, enter the following URL (replacing <Dynatrace-Environment-ID> with your environment ID):

https://<Dynatrace-Environment-ID>.live.dynatrace.com/api/v2/otlp/v1/logs

In the HTTP Header 1 field, add the following HTTP header (replacing <Access-Token> with the access token value copied from Dynatrace):

Authorization: Api-Token <Access-Token>

Then click Save to save the new alert.

APImetrics Dynatrace alert editor with the OTLP logs URL and Authorization HTTP header entered and the Save button highlighted

What you see in Dynatrace​

APIContext sends results to Dynatrace over OTLP/HTTP, one path for each alert type. The dashed arrows in the diagram are not sent by APIContext: you connect Dynatrace to your own incident tooling in Dynatrace.

Flow diagram. A monitor run goes through an OpenTelemetry alert and arrives in Dynatrace as traces. Conformance checks go through an OpenTelemetry (Conformance Events) alert and arrive in Dynatrace as logs. Dynatrace can then feed tools you connect there, such as an AIOps or triage tool or ServiceNow.

OpenTelemetry alertOpenTelemetry (Conformance Events) alert
Arrives in Dynatrace asTracesLogs
One item for eachMonitor resultConformance check result
Sent whenThe result matches a trigger you turned on: Pass, Slow, Warning, or FailThe check matches a switch you turned on: Pass or Fail
Dynatrace endpoint/api/v2/otlp/v1/traces/api/v2/otlp/v1/logs
Field referenceMonitor span attributesLog record attributes

A trace for one result​

Each result is one trace. The Monitor span carries the Monitor's name, and six timing spans sit under it, in the order the request spends its time:

Example API status Monitor span, the whole result
├── dns
├── connect
├── tls_handshake
├── upload
├── processing time to first byte
└── download time to last byte

Every span carries the same attributes, including the Project (apimetrics_project_name), the Monitor (apimetrics_call_name), the test location (apimetrics_agent_id, apimetrics_country), the response code (http.response.status_code), and, for HTTPS, the TLS details. If the request your Monitor sends includes a W3C traceparent header, the Monitor span reuses its trace ID, so the result carries the same trace ID as the API's own telemetry. A Workflow adds one Workflow span to the export. For every span and attribute, see the OpenTelemetry payload reference.

A conformance log record​

Each conformance check result is one log record. This example is a failed data check, with attributes flattened into key = value pairs. The values are illustrative.

scope.name = conformance
severityText = WARN
severityNumber = 13
body = data conformance check failed
category = data
result = fail
project_id = EXAMPLE_PROJECT_ID
timestamp = 2026-11-08T09:30:00Z
check_name = Status is ok
call_id = EXAMPLE_MONITOR_ID
result_id = EXAMPLE_RESULT_ID
rule_id = EXAMPLE_RULE_ID
error = Expected value not found

A passed check has the same shape with severityText = INFO, severityNumber = 9, and no failure attributes. The attributes depend on the check category: see Conformance Events.

Validation​

Your data will start flowing to Dynatrace on the next scheduled conformance check. To trigger a manual conformance check, navigate to the Conformance tab, and click "Evaluate Most Recent Calls" on the bottom right corner of the page. Then in the Dynatrace portal, open the "Logs" application, and click “Run Query” to view the ingested logs.