Closed Khaos93 closed 8 months ago
Thank you for reporting this issue @Khaos93 . Can you provide the versions of the agent that is being loaded on the page and the npm package?
npm package is using: 1.238.0 JS snippet browser agent: nr-loader-spa-1221.min.js
Thanks for the additional info @Khaos93 . We have made a few changes in the agent since 1221 that could help with this issue. Is there any way you could try upgrading the agent that is injected on the page to the latest version?
we already updated the agent to 1.247 version that new-relic recommend us in the browser-application but the issue is still happening
Thanks @Khaos93 . Just to confirm, you tried using 1.247 for both the page agent and the micro agent? If so, I will try to look into this as soon as possible.
yes, the test was using the 1.247 version for both the page agent and the micro agent, thanks
Hi @Khaos93 . I was able to setup a test case locally using https://github.com/mits-gossau/event-driven-web-components-realworld-example-app as a test base project. The page loads a full agent and the article page component loads a micro agent. In our testing, we do not see the page level agent changed to start reporting to the micro agent app ID. Is it possible for you to provide a small reproduction of this issue?
Hi @Khaos93 I am going to close this issue due to inactivity. Feel free to reopen it with the requested additional information.
Hi @Khaos93 . I was able to setup a test case locally using https://github.com/mits-gossau/event-driven-web-components-realworld-example-app as a test base project. The page loads a full agent and the article page component loads a micro agent. In our testing, we do not see the page level agent changed to start reporting to the micro agent app ID. Is it possible for you to provide a small reproduction of this issue?
@patrickhousley wondering if you might have the test code you used against this https://github.com/mits-gossau/event-driven-web-components-realworld-example-app repo that you can share?
Hey @shaun0024 let me reopen this and recreate the code for you.
Work has been completed on this issue.
Hey @shaun0024 let me reopen this and recreate the code for you.
Thank you @patrickhousley , much appreciated
@shaun0024 Please find attached the example app. Just use python3 -m http.server
in the root directory to start the server. The src/index.html
file contains a a full agent using copy/paste and loading assets from our CDN while the component src/es/components/molecules/TagList.js
has a micro agent.
When you load the page, you will get data for the full agent in the page and a PageView and JSError from the micro agent. If you switch tabs and come back, you should see some INS calls (insights). You will need to update both agents with valid license keys and settings from New Relic.
@shaun0024 Please find attached the example app. Just use
python3 -m http.server
in the root directory to start the server. Thesrc/index.html
file contains a a full agent using copy/paste and loading assets from our CDN while the componentsrc/es/components/molecules/TagList.js
has a micro agent.When you load the page, you will get data for the full agent in the page and a PageView and JSError from the micro agent. If you switch tabs and come back, you should see some INS calls (insights). You will need to update both agents with valid license keys and settings from New Relic.
Thank you very much @patrickhousley!
@shaun0024 I am going to close this ticket due to the lack of engagement. If there is a bug or issue you would like us to look at, please feel free to open a new ticket.
two instances of new-relic browser app targeting diferents accounts are colliding
Description
I am part of a team developing a widget that gets integrated into various websites. To monitor the widget's performance, we employ New Relic MicroAgents usint this library available at https://www.npmjs.com/package/@newrelic/browser-agent. However, a challenge arises as this widget is loaded onto pages that already have the New Relic Browser tracking code embedded (using the JS snippet provided by New Relic in the application settings). Consequently, when clients load the widget, it appears to collide with the existing MicroAgent instance, causing the New Relic tracking of their websites stop sending data to this new relic and start sending data to our account it. it seems that the microAgent is overriding the information of the other agent
Is there a solution to circumvent this issue and enable multiple New Relic agents to target different New Relic accounts simultaneously on the same website?
Steps to Reproduce
Expected Behavior
Relevant Logs / Console output