I'm having an issue trying to inject the JS agent manually. Following the manual (DT 6.2), there's a point in the System Profile / User Experience that allows to configure and download the JS agent. The isse is that the only thing that is here is a copy to clipboard button with the reference to the JS, but not a place to download the agent. How could I download the agent and the tag?
yes the documentation is indeed wrong.
The easiest way is to open a web browser and go to the link as seen in your screenshot. It should let you download and save the file. The link should look something like this:
Yes, it should work. The issue is that although the JS could be sent, I've to specify what kind of JS frameworks (for instance in my case I've to use Angular)... I mean... the JS, should have more or less this aspect:
The question is, where I get this tag?
All the best
My earlier example was for the new bootstrap agent URL. If you want to use the old way, then the name is at the top of your screenshot. It is greyed out but I agree it is missing all the other parameters.
Have a look here if you want more information about the switches and the new bootstrap agent:
I hope this helps.
My question is more to understand how it works. The bootstrap JS tag that is in Dynatrace, have only this aspect:
In this tag, the dynaTraceMonitor is not included, and also I don't know how it knows what frameworks have we selected... is this tag doing it automatically? In my case, the web server for UEM is not the same than the Web Server for the application.
Thanks in advance and best regards
Edit: Apparently there are quite some variants to do manual injection.
My luck is that I got the UEM guys next door, so I kept bugging them.
I´m not an expert on that now (or in Angular in any case) but here are the three pivotal things in a nutshell for a BASIC manual instrumentation (here, before I amend the documentation) which should give you the hang.
Edit: The injection *I* was after: Instrument a TV app where I couldn´t auto-inject the Agent.
Edit <System Profile> > User Experience vertical tab > Default Application horizontal tab > Manual Injection link right top
Edit: 1 and 3 Agent source an data sink corrected
1 - Monitor Request Path: http://webServerToSendMonitoringDataTo
2 - Check Send the Dynatrace monitor request to a foreign domain!!!!
3 - Insert <script src='http://<yourInstrumentedWebServerToSendAgent>/dtagent_bootstrap.js'></script> into header
Edit: @JMI: Do you have an instrumented web server that can serve the bootstrap Agent dynamically, or do you really need to inject the core Agent?
there is the one or other thing I would like to mention here, because it may be not obvious (at all) and before I go about and try to improve the documentation, which will take some time to get it really right.
Edit after another round of input from Gernot, who answered below:
Edit: You dynamically get the bootstrapper (WITH THE RIGHT FEATURE HASHES!) from the instrumented server. (step 3 above)
The next UI bummer is that in *debug mode* you get two buttons at Manual Injection to download the bootstrap Agent code and / or the actual core Agent (code).
Mail me (email@example.com) if you don´t know how to switch to debug.
Engineering says there is a use case for manual manual (manual squared
<g>) injection: Shave off some milliseconds. <g>
I´m sure I will soon follow up, because I think of something else pivotal, but I want to get this out now.
Sorry for any inconveniences, JMI!
to explain the bootstrap mechanism:
the previous approach where you manually have to inject the whole script tag including the features, version information, configuration and so on is kind of hard to maintain, that's why we introduced the jsagent bootstrapper.
how it works:
the bootstrapper is delivered via the dt-webserver agent (not the webserver that delivers your actual website). this agent knows about your configuration, the enabled features and the request paths, so the actual content of the bootstrapper file is changed accordingly. it looks like this:
should your configuration ever change and the bootstrapper is still in your browser's cache, the updated configuration will be sent via the next dynaTraceMonitor response and stored in your browser's localstorage. the (cached) bootstrapper (currently using the old config) will check the localStorage, acknowledge the new settings and inject an updated js agent.