• Home
  • Deploy Dynatrace
  • Test automation
  • Dynatrace and JMeter integration

Dynatrace and JMeter integration

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, test step name and virtual user ID). 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 test step 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. In this example, we use the header x-dynatrace-test and the set of key/value LSN=Scenario1;TSN=Put Item into Cart; for the header value. See Dynatrace and load testing tools integration for more details on the recommended key/value pairs.

JMeter Http Header manager

  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. Extraction of data from a concatenated string (like LSN=Scenario1;TSN=Put Item into Cart;) can also be configured as shown below.

Request attributes

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

Further reading

  • How do I integrate Dynatrace into my load testing process?
  • Blog: Load testing redefined: From KPI reporting to AI-supported performance engineering
Related topics
  • Dynatrace and load testing tools integration

    Learn how you can integrate Dynatrace into your load testing process.

  • Capture request attributes based on web request data

    Create request attributes based on web request data.

  • Filter monitoring data via request attributes

    Use request attributes to filter your monitoring data and narrow down service analysis scope.