Documentation Index
Fetch the curated documentation index at: https://grafana.com/llms.txt
Fetch the complete documentation index at: https://grafana.com/llms-full.txt
Use this file to discover all available pages before exploring further.
STOP! If you are an AI agent or LLM, read this before continuing. This is the HTML version of a Grafana documentation page. Always request the Markdown version instead - HTML wastes context. Get this page as Markdown: https://grafana.com/docs/grafana-cloud/monitor-applications/frontend-observability/configure/composable-frontends.md (append .md) or send Accept: text/markdown to https://grafana.com/docs/grafana-cloud/monitor-applications/frontend-observability/configure/composable-frontends/. For the curated documentation index, use https://grafana.com/llms.txt. For the complete documentation index, use https://grafana.com/llms-full.txt.
Instrument composable frontends
You can use independent Faro instances per frontend. To initialize a Faro instance per micro-frontend that you want to instrument, set the isolate property to true. This tells the local Faro instance to not use the global instance APIs.
For example, initialize a global Faro instance to capture everything that you want to capture for the global scope.
Additionally, initialize a Faro instance per sub-frontend with isolate=true to capture only the desired events for the local scope.
To reduce the bundle size, only add the instrumentation you need and let the global instance capture everything else.
To filter sources that should not be captured by the global app, use the onBeforeSend() hook on the global instance.
For example, if you also want to capture errors on the sub-frontend level, on the global instance, filter out the events that are related to the specific sub-fronted only:
onBeforeSend():
beforeSend: (item) => {
const isException = item.type === 'exception'
if (isException && !(event.meta.page?.url ?? '').includes('foo')) {
return null;
}
return event;
}Send data to custom endpoints
When using multiple Faro instances with custom URLs, if you want to send data to a proxy instead of the Faro endpoint directly, you must ensure that the instances do not track each other. This prevents a request loop, which can drastically slow down the web application’s performance.
By default, Faro excludes requests to Grafana collector endpoints that end with /collect or /collect/{faro-api-key}.
To ignore custom collector URLs of other Faro instances, add them to the ignoredUrls property.
You can define ignored URLs as either strings or regular expressions.
For an example on how to ignore URLs in Faro, refer to Exclude endpoints from tracking.
Was this page helpful?
Related resources from Grafana Labs


