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

JavaScript tag vs. OneAgent JavaScript tag

Babar_Qayyum
DynaMight Guru
DynaMight Guru

Dear All,

I am curious to know the main difference and benefits of each JavaScript tag on each other after reading the below statements:

  • The most versatile format is a simple JavaScript tag that downloads the monitoring code.
  • Use the same JavaScript tag that is inserted automatically by Dynatrace OneAgent.

Regards,

Babar

2 REPLIES 2

Radu
Dynatrace Champion
Dynatrace Champion

Hi Babar,

In the context of Agentless RUM (Real User Monitoring) these are two of the 4 possible option of performing the JavaScript instrumentation to enable performance monitoring of that application. Let's look at both of these in a bit more detail:

1. JavaScript Tag

  • a <script> tag that you can insert into the "<head>" section of your application's html pages so that instrumentation of the app can happen and you can track performance
  • The tag usually has a link from where the actual JavaScript content is downloaded
  • The downloaded JavaScript is larger, and complete with application configuration (the settings that were set from the Dynatrace environment)
  • When using this option, you also select a time period that the JavaScript configuration gets updated (e.g. every hour). And so when you make changes to the application settings/setup, you don't have to modify anything in your tag, it will automatically pick up the new configuration changes

2. JavaScript OneAgent Tag

  • this option uses the same JS tag that the OneAgent injects.
  • Again, the tag has a link to download the actual JavaScript content from, but the content downloaded is smaller. It will not contain details of the monitoring configuration.
  • This tag has another attribute called "data-dtconfig" and this is what contains the monitoring settings (as defined from the Dynatrace environment).
  • Because the monitoring settings are present in the tag itself, every time you make a change you have to generate a new tag with the new settings and update it everywhere yourself.
  • The OneAgent uses this tag because the OneAgent does the injection automatically and can update the details instantly. However, because here we are talking about Agentless RUM, even though you are using the same tag as the OneAgent, you must do all the work that the OneAgent does during normal RUM (i.e. generate new tag, and replace the old one with it)

In summary:

Option 1:

  • PROs: No need to edit the HTML and Applications every time when you make a change
  • CONs: You need to wait for your 'refresh period' to happen so that new settings are applied

Option 2:

  • PROs: If you're happy to make changes to HTML, you can have changes to monitoring settings be applied instantly!
  • CONs: Every time you make changes you need to update the tag yourself.


Best regards,

Radu

Hello @Radu S.

Thank you for the elaboration. Now it is clear to me that basically, these four options are for the agentless monitoring perspective instead of the auto instrumentation, which is done by the OneAgent.

Regards,

Babar

Featured Posts