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

Javacript injection oneagent

henk_stobbe
Mentor

From the community:

For AppMon 6.5 and later, the JavaScript Agent injects asynchronously by default via the deferscript tag attribute (see MDN Documentation
for details). Asynchronously loaded scripts do not block page loads,

Does this mean that oneagent js injection can block page loads if for example the webserver is very busy?

KR Henk

9 REPLIES 9

david_n
Inactive

Hello Henk,

Asynchronous communication is performed when the schedule permits rather than at a specific time. This means that you should not see any impact from the injection of the JS agent into your web server.

Thanks,

David Nicholls

henk_stobbe
Mentor

Hi David,

I mean does the injectiing of the OneAgent javascript without the defer tag (=synchronous) cause the page to hang while loading?

The request for the .js has to be handled by the same webserver doing all the other work, and all the time the page loading is stalled by the browser,

KR Henk

david_n
Inactive

Hello Henk,

Yes, if you change the flag then the JavaScript Agent will no longer run asynchronously and this means that when you load a page, if the JavaScript agent needs to be loaded then the page load will wait until the JavaScript agent is completed before continuing. The nice thing is that JS Agent is very small so it should not delay the page load by a signigicant amount.

Thanks,

David Nicholls

henk_stobbe
Mentor

Hi David,

Last one (-;

Looking at the result this is what is injected at the page (I hve x'ed the customer name):

<script type="text/javascript" src="/ruxitagentjs_2fqr_10119170522100716.js" data-dtconfig="rid=RID_-857209633|rpid=-1068113989|domain=xxxxxxxxx=/rb_754444dc-5e6f-487c-931d-e4b14fd6df98|lastModification=1497879520744|tp=500,50,0,1"></script>

So I do not think the flag is correct? Can you tell me where I can find the option in Dynatrace?

KR Henk

henk_stobbe
Mentor

Hi David,

Last one (-;

Looking at the result this is what is injected at the page (I hve x'ed the customer name):

<script type="text/javascript" src="/ruxitagentjs_2fqr_10119170522100716.js" data-dtconfig="rid=RID_-857209633|rpid=-1068113989|domain=xxxxxxxxx=/rb_754444dc-5e6f-487c-931d-e4b14fd6df98|lastModification=1497879520744|tp=500,50,0,1"></script>

So I do not think the flag is correct? Can you tell me where I can find the option in Dynatrace?

KR Henk

david_n
Inactive

Hello Henk,

No worries, the forums are meant for asking questions. 🙂 The defer flag would be an advanced level flag in the Dynatrace configuration. I am not sure how you can turn that off for your JS agent injection. I would suggest opening a support ticket to ask them how that would be done. You can also post ticket number here so that others can find it easily if they have the same questions.

Edit:

Could you check here first before creating the ticket, you might be able to make the change there.

To access custom injection settings:


  1. Click the Applications tile on your home dashboard.
  2. Select the application you want to configure.
  3. Click Edit on the menu bar.
  4. Click Advanced setup.
  5. Click JavaScript injection.

Thanks,

David Nicholls

AlexanderSommer
Dynatrace Pro
Dynatrace Pro

Hi Henk,

Using the Dynatrace real user monitoring tag in asynchronous mode is currently not available. This feature is currently in the last development step (testing) and will be in production in one month. In two weeks, we can help you and activate this upcoming feature as early access for your environment.
But if you want to add the "defer" NOW, we still can do this and change some settings, but you might loose some visibility depending on the application.
If you can't wait till this feature is released, please open a support ticket and request the "defer" attribute.

henk_stobbe
Mentor

Alexander,

Nice info, I think I can wait,

KR Henk

anthony_pope-cr
Organizer

Are there any updates on asynchronous injection of the ruxitagentjs ?

Custom configuration properties of the JS injection seem to require key value pairs (a=n|, etc) which does not allow for the 'defer' or 'async' tag.