How to integrate dynatrace with HP LoadRunner and Apache JMeter?

Compuware dynatrace is an application performance management software company which focuses on performance management software which are running on premise and cloud. Compuware acquired dynatrace software on 2011. In this article, you are going to learn how to integrate HP LoadRunner and Apache JMeter with dynatrace, so that you get a clear picture in dynatrace server about the HTTP requests.

How it works?

In built option is available with dynatrace to integrate it with HP LoadRunner. But to integrate it with Apache JMeter, dedicated and independent tool is available with dynatrace. When the integration happens, LoadRunner Script Converter will inject the dynatrace headers to the HTTP requests.

How to integrate dynatrace with HP LoadRunner?

As I said earlier, in-built tool is available with dynatrace called LoadRunner Script Converter.

  1. Launch dynatrace
  2. Go to Tools > LoadRunner Script Converter
dynatrace Tools Options
dynatrace Tools Options
  1. Click on Browse to load the LoadRunner script folder
LoadRunner Script Converter
LoadRunner Script Converter
  1. LoadRunner Script Converter will display the LoadRunner script files such as *.c and *.h
  2. Select the radio button All Files to modify all the LoadRunner files.
  3. Click on Patch button

You can see the converting progress on the progress bar. Once the conversion is done, open the LoadRunner script in VuGen where you can see the globals.h and the Actions.c file got modified with the dynatrace script.

globals.h will have the dynatrace method and the Actions.c will have the call to the dynatrace method. It parses the Actions.c and inserts the dynatrace call before one of the following functions:

  • web_url
  • web_link
  • web_image
  • web_submit_form
  • web_submit_data
  • web_custom_request

Below is the dynatrace method gets inserted in the globals.h file.

dynatrace header
dynatrace header

Inside the Actions.c, you can see the dynatrace header calls.

addDynaTraceHeader(“NA=;PC=<your_step_name>“);

As you see in the addDynaTraceHeader method, it determines the ID of each Vuser and the current timestamp and it appends it to the header. It also add the headers to below LoadRunner methods, but it will not contain a PageContext.

  • web_browser
  • web_button
  • web_check_box
  • web_edit_field
  • web_elementweb_file
  • web_image_link
  • web_image_submit
  • web_list
  • web_map_area
  • web_radio_group
  • web_reg_dialog
  • web_static_image
  • web_table
  • web_text_area
  • web_text_link

If you execute the LoadRunner scripts which has dynatrace headers, you can see the web requests under Tagged Web Requests dashlet.

Tagged Web Requests
Tagged Web Requests

How to unpatch LoadRunner Scripts in dynatrace?

If you like to revert the LoadRunner script without dynatrace headers, load the script to the LoadRunner Script Converter, and click on Unpatch button.

How to integrate dynatrace with Apache JMeter?

Now, you are going to learn about how to integrate dynatrace with Apache JMeter.

Prerequisites

Go to below link and download JMeter Script Converter

IMPORTANT: This converter tool has been deprecated.

Steps to follow

Extract the JMeter Script Converter tool and open command prompt.

Execute below command, make sure that there is no space in the folder path or file name.

JMeterConvert -source <sourceFilePath> -target <targetFilePath>

e.g.

JMeterConvert -source C:\Sample.jmx -target C:\Sample_dynatraceHeaders.jmx

Once the command executed successfully, (if there is any error, you can see it in the command prompt), go to the target file path where you can find the JMeter script with dynatrace headers.

You could see the Browser-derived headers and the dynatrace headers with the timer as shown below.

JMeter Header Manager
JMeter Header Manager
JMeter Header Manager_1
JMeter Header Manager_1

To integrate dynatrace for the web service calls, simply add the below header for each of the requests.

x-dynaTrace: VU=1;PC=.1;ID=4;NA=ListResults

Conclusion

It is very simple to integrate dynatrace with HP LoadRunner and Apache JMeter which extends the functionality to monitor the requests (under Tagged Web Requests dashlet) for the effective monitoring and identify the bottlenecks using dynatrace.

If you like my article, please do share in your favorite social media. Please do not forget to subscribe to my weekly newsletter, it is FREE.

About the Author

6 thoughts on “How to integrate dynatrace with HP LoadRunner and Apache JMeter?”

  1. Hi Naveen,
    I am new to dynatrace. I created a simple WebTour LoadRunner script and converted from dynatrace which added dynatrace header in LoadRunner script. I ran multiple iterations from Loadrunner Vugen component I but I don’t see web requests under Tagged Web Requests dashlet.
    do I need to do something else? and how to monitor LoadRunner WebTour sample app?
    Thanks
    Nadeem

    Reply
  2. Hi above mentioned process is for one script right ? Is there a way we can setup / configure dynatrace at the application level ? Where we don’t have to do manual conversion

    Reply
  3. Hello,
    Interesting blog.

    If you’re looking for an up to date and simple Apache JMeter integration with Dynatrace, then have a look at the Monitoring Plugin for JMeter provided by UbikLoadPack:

    https://ubikloadpack.com/tryout.php (select Monitoring)

    This plugin allows you to integrate with:
    – Dynatrace AppMon to record Dynatrace sessions and tag Web Requests
    – Dynatrace One Agent to be able to correlate response times, other monitoring graphs and Artificial Intelligence for analysis

    No coding required, only 1 element to add and you’re done.

    Regards
    Philippe M.
    @philmdot

    Reply

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Hamster - Launch JMeter Recent Test Plans SwiftlyDownload for free
+
Share via
Copy link