The TruClient is compatible with DT JS. We've tried server-side tagging and it works
However, for client side tag, _dt_setTimerName("Login") won't work. Tried single quotes, double quotes.
Not sure whether it is a configuration issue or incompatibility with TruClient?
Tthe function Utils.addAutoHeader() may not be the dynatrace function. This looks more like a generic function to add fields in header.
_dt_setTimerName() is more specific method for dynatrace.
Having said that I think the compatibility is not an issue because we get the javascipt function details when using browser agent with TrueClient. And DT instruments the .js files using two functions _dt_methodEnter() and _dt_methodExit() these methods are working.
I've exploded the DynaTrace XPI (dtffagent.xpi) and found it includes a few JS files and redundant DLL's for different versions of FireFox. At closer look I noticed _dt_setTimerName is referenced within the DLL's; not defined in any JS files. Going with the asumption that the DLL is a .NET or C++ binary I assume can be accesed using the js-ctypes library to open the DLL and call the _dt_setTimerName method. I've started to put that together but I'm not familure with js-ctypes.
JS Code so far:
var dtlib = ctypes.open("dtffagent_31000.dll"); /* Compatible with the headless vesion of mozilla used in TruClient */
setTimerName = dtlib.declare("_dt_setTimerName", /* function name */
var err = setTimerName('Login');
But get an error "couldn't find function symbol in library".
Let me know if I'm chasing my tail with ctypes.
Ok...so kick me for trying this the hard way I'm leaving the above in the event someone wants to load other DLL's in TruClient. I realize now that the DLL may have been a compiled bunch of JS files. But I digress.
I got it working and tested it with Amardeep (above).
For TruClient to access the method it needs to access it through the Window object:
Meng, I shared what I did with Conner. He mentioned writing it up to share with the greater community.
Note: I tried the window object before but I'm assuming the dT agent may have been off and the method wasn't exposed