Grafana Faro Web SDK
The Grafana Faro Web SDK can instrument frontend JavaScript applications to collect telemetry and forward it to the
Grafana Alloy (with faro receiver integration enabled), to a Grafana Cloud instance or to a
custom receiver. Grafana Alloy can then send this data to Loki or Tempo.
The repository consists of multiple packages that can be combined depending on your requirements. For a full reference
instrumentation of a real-world app, see grafana/quickpizza — the canonical Frontend Observability demo,
deployed live at quickpizza.grafana-dev.com and instrumented with the current
Faro Web SDK, Web Tracing, and Session Replay packages.
Get started
[!NOTE]
For more information, you can find the Faro documentation in the Grafana Cloud docs for Faro.
See quick start for web applications.
Local development
Contributing to the SDK? See local development for the three supported paths:
the in-repo smoke harness, your own Grafana Cloud free-tier stack, or a local Alloy install.
Pull requests explains how pull requests work here, including the automation
that labels a pull request stale after 60 days without activity, closes it 14 days after that, and
how to keep one open.
Packages
Core
@grafana/faro-core is the main package that provides the core functionality of the SDK. The
README.md file provides an overview of the architecture and the API of library.
Web SDK
@grafana/faro-web-sdk provides instrumentations, metas and transports for use in web applications. See
the README.md for more information.
Web Tracing
@grafana/faro-web-tracing provides implementation for tracing web applications. See the
README.md for more information.
Session Replay
@grafana/faro-instrumentation-replay records browser sessions with rrweb. Add it explicitly to
the SDK's instrumentations array. See the README.md for configuration and privacy defaults.
React Support
@grafana/faro-react is a package that enables easier integration in projects built with React. See the
README.md for more information.
Supported environments
The Faro Web SDK instruments web pages that run in a browser. During initialization, the SDK and most of its default
instrumentations read browser APIs such as window, document, PerformanceObserver and sessionStorage. JavaScript
that doesn't run in a typical web page context is outside the supported scope.
| Environment | Supported |
|---|
| Web applications that run in a browser | Yes |
| Client-side of server-rendered applications, such as Next.js and React SSR | Yes |
| Server runtime of server-rendered applications | No |
| Browser extensions | No |
| Web workers and service workers | No |
| Node.js, React Native, and other non-browser JavaScript environments | No |