Dynatrace Integration

Send Load Test Metrics to Dynatrace

The Dynatrace integration sends the metrics of every LoadFocus test that uses it to your Dynatrace environment over OpenTelemetry (OTLP). You can then chart load test traffic next to the services, hosts and logs Dynatrace already monitors, and see how your application behaves while it is under load. It works with cloud tests, JMeter tests and k6 tests.

Dynatrace Integration form in LoadFocus with the name, environment URL and API token fields

What You Need

  • Your environment URL. For Dynatrace SaaS it looks like https://abc12345.live.dynatrace.com. The address of the new Dynatrace web UI (https://abc12345.apps.dynatrace.com) also works; LoadFocus converts it for you. For Dynatrace Managed, use https://your-domain/e/ENVIRONMENT_ID.
  • An API token with the metrics.ingest scope. In Dynatrace, go to Access tokens, click Generate new token and add the Ingest metrics scope (metrics.ingest).

Create the Integration

  1. Open Account settings > Integrations, or go to the Integrations page.
  2. Click New Integration and choose Dynatrace.
  3. Enter a name, your environment URL and the API token.
  4. Click Save integration.

LoadFocus checks the URL and token with Dynatrace before it saves the integration. If Dynatrace does not recognise the environment URL, or rejects the token, the form tells you so under the matching field.

Attach the Integration to a Test

  1. Open a cloud, JMeter or k6 test.
  2. In Integration configuration, select your Dynatrace integration.
  3. Save or run the test.

Every run that uses the integration shows Exports to: Dynatrace in the configuration panel of its results page.

What You Will See in Dynatrace

LoadFocus sends to your environment's OTLP endpoint (/api/v2/otlp) with delta temporality, which Dynatrace requires for counters and histograms.

Cloud and JMeter tests send jmeter.samples (requests, by sampler and status, which is ok or ko), jmeter.response_time_ms (response times, by sampler) and jmeter.errors (failed requests, by sampler and response_code). They are tagged service.name = loadfocus-jmeter, plus loadfocus.testrunname and loadfocus.testrunid for the test and the run.

k6 tests send k6's standard metrics, such as http_reqs, http_req_duration, iterations and vus. They are tagged testrunname and testrunid for the test and the run, plus region and machine.

To find them, search for jmeter or http_req in the Dynatrace metrics browser, or split a metric by loadfocus.testrunname (cloud and JMeter) or testrunname (k6) in a notebook or dashboard.

Troubleshooting

  • The form says the environment URL was not recognised: copy the URL from your browser's address bar while you are signed in to Dynatrace (for Managed, it must include /e/ENVIRONMENT_ID). The address must be public and use https.
  • The form says the token was rejected: generate a token with the metrics.ingest scope. Tokens without it cannot send metrics.
  • Saved, but "we could not reach the service to check the key": Dynatrace did not answer when you saved, so the token was not checked. The integration is saved; check that metrics arrive after your next test.
  • Nothing shows up in Dynatrace: for cloud and JMeter tests, open the run's Logs tab and look at the JMeter log. The last lines include Metrics export to <your environment>: N of M batches accepted. If an export failed, the first failure is logged with its HTTP status. For k6 tests, the Logs tab has a Metrics export section that reports the uploads k6 said failed.
  • An integration created before September 24, 2026: open it, enter the environment URL and token again, and save it. Integrations saved before that date do not send data.
  • The run itself is never affected: if an integration is misconfigured, the test still runs. It just exports no metrics.

Edit or Remove the Integration

  • Edit: click the edit icon on the integration in Integrations. For security, the token is never shown again, so enter it every time you save.
  • Remove: click the delete icon. Tests that used it stop exporting.