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

Dynatrace RUM injection methods

agrawal_shashan
Participant

Hi, I've been using Dynatrace RUM to monitor my web application. The application is segregated into multiple micro apps which is handled by different teams. It's a serverless application so we are using manual injection.

After a lot of discussion and consideration around the injection method, we decided to use inline code method to keep the web request minimum and we are using it in async mode in JavaScript tag.

 

But as mentioned in Dynatrace wiki documentation   as well, this method as maintenance overhead as we need to update the monitoring code every time we make any changes in Dynatrace settings.

 

I want to understand if i use JavaScript tag method, does it have any major performance implications. I am using Dynatrace managed, so does it everytime go to the server to fetch the script or is there any caching available?

To be honest, I want to use JavaScript tag because it gives us the flexibility to change the settings at anytime because how do i convince others and my developers because apparently, the JS injection method is creating a bit of performance degradation of the page. That is the reason they decided to go ahead with inline code to keep everything in a single file.

 

Any suggestions or ideas on how I achieve this in a best way? Appreciate in advance.

 

Best Regards,

Shashank 

3 REPLIES 3

Babar_Qayyum
DynaMight Guru
DynaMight Guru

Hello @agrawal_shashan 

After a long time, once again I had gone throught the documentation. 

  • According to the documentation, inline is the best option to avoid the performance impact.
  • To reduce the maintenance efferot, the code snippet can be used.
  • There is also a REST API offered.

Please have a look at the below link for more insight:

https://www.dynatrace.com/support/help/how-to-use-dynatrace/real-user-monitoring/setup-and-configura...

Regards,

Babar

 

Hi @Babar_Qayyum Thank you for the quick response. I was looking at the Code Snippet option and it has 2 methods - sync and deferred. We obviously don't want to use Sync because it's render blocking and may affect performance.

 

Now with the deferred (Async) method, is there a recommended way to to use this? I mean where should we put this in our application html? Since it is deferred, will we loose some kind of monitoring visiblity? Also there is a line which says - "Requires regular snippet updates to guarantee compatibility." What does it mean? Do we need to update the html files everytime we change the settings in Dynatrace?

Let me know if you can advice on this please.

agrawal_shashan
Participant

@Babar_Qayyum The reason I asked this is because I tried to change a setting in Advanced set up (cux=1) and it is now asking me to change the code snippet in application. How do i avoid this everytime i make the changes?

Please see the screenshot attached.

agrawal_shashan_0-1638792564132.png