Browser FSO not showing all the events when APM is enabled on part of all hosts running the same app

I am on your old APM plan with allocated CUs. My account executive suggests that I use New Relic One, and here I am.

Previously, I have installed APM on 1 out of 4 hosts, and have also enabled Browser Lite on the same app. As such, I get the 4x the ppm as the APM host. This is normal and the expected behavior.

After enabling Browser Pro + SPA, I now only see 1/4th of the PPM on the Browser FSO, even though technically I would expect to see all events.

What can I do to see all events as I have used to? Should I try and setup a separate Browser app with a different ID, for example? Ideally, I would like to see events that are indeed tightly integrated with the APM. But if that’s not possible, I would like to at least be able to see all events on the Browser.

Hi @seeminglee,

Switching from the lite agent to the SPA agent shouldn’t result in fewer PPMs being recorded. Is it possible that in switching agent types something went wrong with the installation and now not all of the application is being instrumented? Are you using APM injection or the copy and paste method to install?

If you can provide a link to the application, we can take a look and see if we can make any suggestions.

Sure. The app is at https://royaleapi.com

@seeminglee Hi there! Thanks for the link to your application. From what I can see, it looks like you are loading the browser agent from an external source file via a CDN. Best practices for the agent is that it needs to load inline, early in the head and before other scripts load as it wraps the browser’s built-in APIs. Here are links to that documentation:

https://docs.newrelic.com/docs/browser/browser-monitoring/installation/install-browser-monitoring-agent

https://docs.newrelic.com/docs/browser/new-relic-browser/page-load-timing-resources/instrumentation-browser-monitoring#

I see that there are 4-5 scripts loading before the browser agent and the agent is not inline. You may not be seeing all the data you want due to installation conflicts and I hope that clears up your questions.

2 Likes

Yes – I am aware that you recommend loading inline. The issue is that when it’s loaded inline, the same thing gets loaded over and over again. I’m not entirely sure if it affects the page performance by having such heavy scripts that cannot ever be cached as the very first thing that the browser sees. Our site must depend on ads (per some policies that we have no control of) and so I try to offload as much resources as possible to happen in the body.

But I can try putting them inline again in the future.

Let us know how it goes if you do end up putting them all inline again. If you need any further help, let us know.

Hi there — sorry for not responding earlier. I have trouble adding discuss.newrelic.com to my Discourse app because it has trouble with how you perform OAuth.

Anyway, if I add your script inline it blocks all the browser resources (Chrome Lighthouse would complain that your scripts block the thread for 6 seconds which is high)