How to restart web vitals on the fly? #164
-
Hi @codecapitano! I did not know if this could be a bug, or feature. So I guess that here is the best place to post this enquiry. I am currently trying an approach of using one instance of faro to collect metrics from different We have a I am instantiating When I load
Everything works smoothly. But the thing is that I have tried using Is there a way that I can tweak / override the |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @alioshr In that case you need to define a Faro instance per sub-app you want to track. In your case Faro is globally initialized so it captures data for the complete app not in the scope of each sub-app. Even if you reset settings. To initialize multiple independent Faro instances you need to set the Example:
Further you may want to use the Example: beforeSend: (item) => {
const isException = item.type === 'exception'
if (isException && !(event.meta.page?.url ?? '').includes('foo')) {
return null;
}
return event;
} Hope it helps. Cheers, |
Beta Was this translation helpful? Give feedback.
-
@codecapitano thanks for the insight here! It worked well. |
Beta Was this translation helpful? Give feedback.
Hi @alioshr
In that case you need to define a Faro instance per sub-app you want to track.
This applies either for the case where sub-apps need distinct settings (for example sending data to a different URL) or if they should independently track data like it is in your case.
In your case Faro is globally initialized so it captures data for the complete app not in the scope of each sub-app. Even if you reset settings.
To initialize multiple independent Faro instances you need to set the
isolate
property totrue
.Example:
i…