How do I monitor the web Apps with NewRelic?

Hello,

I am developing Web SDK applications which work on Cumulocity.

I would like to monitor the application’s performance with NewRelic.
According to the NewRelic document, I think that I have to add a “script” attribution to index.html.
However, if I use the Web SDK, I don’t find the index.html. So, I think that the index.html is managed inside Web SDK.

In case of monitoring with NewRelic, how do I add the “script” attribute to index.html?

Best regards,
Ryuichiro Nakayama

Hi @ryuuichiroh

You could load your script using and angular Module like this:

import { NgModule } from '@angular/core';

@NgModule({})
export class AnalyticsModule {
  constructor() {
    setTimeout(function () {
      const t = document.createElement('script');
      t.src = 'https://<script_url>.js';
      document.head.appendChild(t);
    });
  }
}

Regards,
Tristan

1 Like

Hello Tristan,

Thank you so much :slight_smile:
I will try with your advice!!