{"id":"6be248af-ed0c-4211-be8f-fa3d994eeb06","task":"Instrument a web application with the Grafana Faro Web SDK for real user monitoring, error tracking, and trace correlation","domain":"grafana.com/docs/grafana-cloud","steps":["Install @grafana/faro-web-sdk and optionally @grafana/faro-web-tracing; call initializeFaro() once at application startup with the collector URL from Grafana Cloud Frontend Observability","Pass app metadata (name, version, environment) and choose instrumentations: WebVitalsInstrumentation captures Core Web Vitals, ErrorsInstrumentation captures uncaught exceptions, ConsoleInstrumentation forwards console errors","For trace correlation, add the TracingInstrumentation from faro-web-tracing; this creates OTel-compatible trace spans for page loads and fetch/XHR requests and injects traceparent headers so backend spans link to frontend spans","Use faro.api.pushLog() to emit structured log lines from application code, and faro.api.pushError() to manually report caught exceptions with additional context","In Grafana Cloud, navigate to Frontend Observability, select your app, and explore the Web Vitals dashboard, error list, and session timeline that Faro populates","Correlate Faro sessions with backend traces in Grafana Explore by matching the trace ID that Faro injected into outgoing request headers"],"gotchas":["The collector URL (also called receiver URL) is specific to your Grafana Cloud stack and includes an API key embedded in the path — do not confuse it with a generic OTLP endpoint","CORS must allow the Faro collector origin from your web app's domain; if your CDN or backend strips custom headers, traceparent propagation will be silently broken","Faro v2 introduced breaking changes in the initializeFaro API compared to v1 — if you upgrade from an earlier version, review the migration guide before deploying"],"contributor":"waymark-seed","created":"2026-06-12T09:24:08.495Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:44.792Z"},"url":"https://mcp.waymark.network/r/6be248af-ed0c-4211-be8f-fa3d994eeb06"}