Header background

LoadRunner request tagging for effortless load testing integration

We at Dynatrace love DevOps. We are fervent advocates of the unbreakable DevOps pipeline and like to think of performance engineering as a DevOps team sport. To help our LoadRunner users take a step further in this direction, we’re releasing LoadRunner request tagging for Dynatrace.

Load Testing with Dynatrace

While executing a load test from your load testing tool of choice (LoadRunner, JMeter, Neotys, etc) each simulated HTTP request can be tagged with additional HTTP Headers that contain test-transaction context information (for example, script name, test step name, and virtual user ID). Dynatrace analyzes the incoming HTTP headers and extracts the relevant information in the form of request attributes.

While it isn’t mandatory, having specific request attributes while running your load tests gives you more advanced filtering & charting options. Check out Dynatrace Help to learn more about Dynatrace load testing integration.

Dynatrace load testing integration

To help our LoadRunner users with the tagging of their requests, we’ve released the LoadRunner Request Tagging tool. This tool enables you to patch your existing LoadRunner Virtual User Generator (VuGen) scripts by adding the x-dynatrace-test HTTP header and automatically populating it with your request attributes. Let see how this works.

LoadRunner request tagging

The LoadRunner Request Tagging tool works by inserting a short method (addDynatraceHeaderTest) into the globals.h or globals.js file that populates the x-dynatrace-test header. It also parses your .c or .js files and automatically adds a call to this method before the key methods are called. As you can see, both C and JavaScipt scripting languages are supported.

  1. Record a LoadRunner Virtual User Generator (VUGEN) script and adapt it as needed
  2. Download the latest version of the LoadRunner Request Tagging tool from GitHub.
  3. Open your command prompt and patch your LoadRunner script. The LoadRunner Request Tagging tool uses the following syntax (more details can be found in Dynatrace Help):
    java -jar Dt-LoadRunner-request-tagging.jar <mode> <path parameter> <optional parameters>


java -jar Dt-LoadRunner-request-tagging.jar insert -path C:\LoadRunnerScripts\EasyTravelBookingProcess

After running the tool, you can verify that the method addDynatraceHeaderTest has been added to your scripts before some of the key methods:

Dynatrace load testing integration

Configure request attributes

The HTTP header x-dynatrace-test is populated by the LoadRunner Request Tagging tool with the key/value pairs listed below. These values can be captured by Dynatrace by defining request attributes. Not all key/value pairs need to be configured; only configure the pair you’re interested in for the targeted analysis of your load tests.

TSN Test Step Name – Logical test step within your load test script. The name of the transaction defined in the LoadRunner script. In case of nested transactions, the transaction names are concatenated.
LSN Load Script Name – Name of the load test script. Either the name of the *.usr file or the value of the optional parameter -LSN
LTN Load Test Name – Unique test execution identifier. Value of the DynatraceLTN runtime attribute configured in LoadRunner
VU Virtual User – ID of the unique user who sent the request. Example: 1, 2, 3, …
PC Page Context – Provides information about the document that is loaded in the currently processed page. Contains the value of the first parameter passed to the following functions:

web_url,  web_link web_imageweb_submit_formweb_submit_dataweb_custom_request.

SI Source ID – Identifies the product that triggered the request. LoadRunner (fixed value)

Here is an example of how to configure the request attribute for the test step name (TSN):

  • In Dynatrace, configure the extraction rules for the custom HTTP Headers via Settings > Server-side service monitoring > Request attributes.
  • 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 the test step name TSN from the x-dynatrace-test can be configured as seen below.

Dynatrace load testing integration

Execute tests and analyze data

Run your load test from LoadRunner. The requests and PurePaths will be tagged in Dynatrace with the configured request attributes for targeted diagnostics and analysis. Request attributes will appear on the relevant Service overview page, under the Top request section.

Dynatrace load testing integration

There are different ways to analyze the data. Your approach should be based on the type of performance analysis that you want to do (for example, crashes, resource and performance hotspots, or scalability issues). The request attributes set for the load test will help you filter the data. Following is an example of how to analyze the response time of the test step search journey paris:

Dynatrace load testing integration

Be sure to check out my colleague Andi’s Top 5 Diagnostic Approaches and Dynatrace Help for more information about load testing analysis with Dynatrace.


The LoadRunner Request Tagging tool is based on the well-known AppMon LoadRunner Converter. Thanks to Mateusz Kaminski for his work in upgrading it for Dynatrace usage and adding support for the JavaScript coding language. The LoadRunner Request Tagging tool is open source. We welcome any community contributions. Finally, a special thanks to our colleague Brian Chandler for sharing his enthusiasm for the LoadRunner integration.

Your feedback

Tell us what you think about the LoadRunner Request Tagging tool and load testing integration with Dynatrace. We’d love to hear about your pre-production use cases. Please share your feedback with us at Dynatrace Community.

Start a free trial!

Dynatrace is free to use for 15 days! The trial stops automatically, no credit card is required. Just enter your email address, choose your cloud location and install our agent.