How do I integrate Dynatrace into JMeter scripts?

While executing a load test in Apache JMeter, each simulated HTTP request can be tagged in JMeter with additional HTTP Headers that contain test-transaction information (for example, script name, transaction name, virtual user ID, and Geolocation). Dynatrace can analyze incoming HTTP headers and extract such contextual information from the header values and "tag" the captured requests. Having a tag on a request allows you to analyze requests with specific tags. For example, you can analyze all requests that come in from script Scenario1 and transaction Put Item into Cart.

To integrate Dynatrace with JMeter:

  1. Within JMeter, use the HTTP Header Manager to add custom HTTP request headers. You can use any custom HTTP headers to pass context information.

  1. In Dynatrace, configure the extraction rules for the custom HTTP Headers via Settings > Server-side service monitoring > Request attributes.

  2. Select HTTP request header as the Request attribute source and enter the name of your custom HTTP header in the Parameter name field.

  1. Run your load test from JMeter. The requests and PurePaths will be tagged in Dynatrace with the configured request attributes for targeted diagnostics and analysis.

Further reading