The automated dynaTrace Loadrunner script tagging tool only works for scripts recorded in HTTP mode. When tagging scripts in URL mode, request that are being send as a part of concurrent group(web_concurrent_start function ) fail because the dynaTrace header fails within that group because web_save_timestamp_param is not allowed within the concurrent group.
My current client found a fix for this by changing the globals.h file in Loadrunner scripts. By removing references to TimeStamp, the Loadrunner script executes without error. We are also still capturing the tagged transactions in dynaTrace.
Location file: globals.h
void addDynaTraceHeader(char* header){
char* headerValue;
int headerValueLength;
int vuserid, scid;
char *groupid, *timestamp;
char* vuserstring=(char*) malloc(sizeof(char) * 10);
web_save_timestamp_param("TimeStamp", LAST);
timestamp=lr_eval_string("{TimeStamp}");
lr_whoami(&vuserid, &groupid, &scid);
itoa(vuserid,vuserstring,10);
headerValueLength = strlen(header) + 4 + strlen(vuserstring) + 4 + strlen(timestamp) + 1;
headerValue = (char*) malloc(sizeof(char) * headerValueLength);
strcpy(headerValue, header);
strcat(headerValue,";VU=");
strcat(headerValue,vuserstring);
strcat(headerValue,";ID=");
strcat(headerValue,timestamp);
web_add_header("X-dynaTrace", headerValue);
free(headerValue);
free(vuserstring);
}
void addDynaTraceHeader(char* header){
char* headerValue;
int headerValueLength;
int vuserid, scid;
char* groupid;
char* vuserstring=(char*) malloc(sizeof(char) * 10);
lr_whoami(&vuserid, &groupid, &scid);
itoa(vuserid,vuserstring,10);
headerValueLength = strlen(header) + 4 + strlen(vuserstring) + 4 + 1;
headerValue = (char*) malloc(sizeof(char) * headerValueLength);
strcpy(headerValue, header);
strcat(headerValue,";VU=");
strcat(headerValue,vuserstring);
strcat(headerValue,";ID=");
web_add_header("X-dynaTrace", headerValue);
free(headerValue);
free(vuserstring);
}
Answer by Andreas G. ·
Thanks. I will forward this to the engineering team to include that in the product as well.
Also - I think I will move this to the public forum as this is very useful for all users out there. OK?
JANUARY 15, 3:00 PM GMT / 10:00 AM ET
Automation Client in an Intrumented app - how to get the app measures as test checkpoints?
DynaTrace 6.3 and Jenkins 1.625.3 connectivity issue
Manage Remote Batch Processes through Eclipse Plugin
Load Test Category in Dynatrace 5.5
Loadrunner integration in Loadtesting - Unique transaction question