cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

[AppMon] Is it possible to integrate HP TruClient with AppMon?

christopher_and
Inactive

Hi all,

 

This is actually a question for TruClient experts out there (more than an AppMon question).

 

I know it is possible to integrate AppMon with most load testing tools through the injection of a HTTP header, but it seems that HP TruClient doesn't allow to inject custom HTTP headers.

 

I can find a work-around through changing the value "user-agent" and a BT but was wondering if I really have no way to do it the proper AppMon way...

 

Thanks in advance for your help.

Chris

7 REPLIES 7

christopher_and
Inactive

FYI, according to my customer, it seems the latest version of the tool allows us to do this now.

MichaelFerguson
Dynatrace Helper
Dynatrace Helper

 

It can be done manually today by using a this LR TruClient function.

Utils.addAutoHeader (header, value, merge)

Adding an HTTP header to every consecutive HTTP requests following   this function call.

  •   header. The name of the header to be added.
  •   value. The value of the header to be added.
  •                                                                         merge.   True value indicates to merge the value with an existing header by the same   name, false indicates to overwrite it.

Before each transaction start, add an “Evaluate Javascript” and in the argument field use the following code (red below) making sure the second field matches your tranaction name:

Ex)

Utils.addAutoHeader("x-dynaTrace","NA=ET-Home ",false);

 

Do we have to define dynaTraceHeader in globals.h file like we do in traditional VUGen script?

I mean, do we have to add this function in globals.h file - "void addDynaTraceHeader(char* header){..." for TruClient as well?

Thanks.


ricardo_h_chees
Participant

Is there a way to also add the SN= header along with the NA= header? 

MichaelFerguson
Dynatrace Helper
Dynatrace Helper

I don't see why not.   You probably just need to put a semi-colon between each.

Utils.addAutoHeader("x-dynaTrace","NA=ET-Home; SN=easyTravel ",false);

Do we have to define dynaTraceHeader in globals.h file like we do in traditional VUGen script?

I mean, do we have to add this function in globals.h file - "void addDynaTraceHeader(char* header){..." for TruClient as well?

Thanks.


MichaelFerguson
Dynatrace Helper
Dynatrace Helper

Praveen - Not that I am aware of. The Utils.addAutoHeader for TrucClient is a way to pass any request header you want anywhere you want, so nothing needs to be added in the global.h. Here is the doc...https://admhelp.microfocus.com/tc/en/12.53/Content/TruClient/reference/functions.htm#Utils.addAutoHeader_(header,_value,_merge).