Browser monitoring is a beta AppSignal Labs feature. The
@appsignal/browser package is published under the beta tag on npm, and its
configuration and API may still change between beta releases. Share feedback
in our Discord community.No data arrives at all
To compare your setup against a known good snippet, generate one in the Browser SDK install flow. Work through these in order. Each one is a complete stop: nothing is sent when it applies.activeresolves tofalse. Log the value you pass, rather than the expression. A bundler that does not replaceprocess.env.NODE_ENVleaves the comparisonfalsein the browser.init()never ran. Setting configuration is not enough. Confirm your entry point imports the module that callsinit(). Check that your build includes it.- The key is wrong. A wrong key returns
401. Use this app’s Front-end API key, not a Push key. Check that it belongs to the right environment. - Requests are blocked. Open your browser’s network panel and look for a request to
/ingest/browser/errorsfor errors, or/ingest/browserfor web vitals. A blocked request shows as a Content Security Policy violation in the console: addhttps://appsignal-endpoint.netto yourconnect-srcdirective. endpointis not set. Withoutendpoint, the SDK posts to the current origin. That requires a proxy on your domain. Set it tohttps://appsignal-endpoint.netotherwise.
Errors arrive, web vitals do not
Web vitals are batched, not sent per measurement. They are sent when the page is hidden, when it is closed, and on a client-side route change. Navigate away or switch tabs, then check the Performance view again. If they still do not appear, check whether the missing metrics are CLS and INP specifically. Those two need browser performance entries that may be unavailable.An error is missing
- It happened before
init()ran. Nothing that throws before then is captured. Import your AppSignal setup as the first import in your entry point. - It was a repeat. Check the rate limits on identical and total errors.
- It was sampled out. Check whether
errors.sampleRateis below1.0. beforeErrordropped it. A callback that returnsnulldrops the error. Log the event at the top of the callback to confirm what it receives.- It was thrown inside an iframe. A same-origin iframe needs its own
init()call. - It was a React render error. React does not let render errors reach
window. Add an error boundary. - It came from a script on another domain. Read the following section.
Cross-origin script errors are missing
If errors from a script hosted on another origin are missing, check its cross-origin settings. The browser may expose onlyScript error. for cross-origin scripts. The SDK drops these opaque errors. Fix it by serving those scripts with CORS headers, as described in assets hosted on a CDN.
Backtraces are minified
Backtraces are resolved with sourcemaps, matched on the revision string. SetappVersion to the same value your build uses for its sourcemaps. Without appVersion, there is nothing to match on and backtraces stay minified.
One route produces hundreds of error groups
The route template is missing, so errors use each page’s raw path. CallsetRouteTemplate("/orders/:id") on every router navigation. New errors then group under that template. The server derives an approximate template for web vitals. An explicit template is more reliable and helps avoid the distinct-route limit.
Client-side navigation is not reported
The SDK and some routers both patchhistory.pushState. The SDK composes with an existing patch. A router that later replaces the SDK’s patch can break navigation tracking. Import your AppSignal setup before your router.
Hash routers are only treated as routers when the hash looks like a route, such as #/orders. A bare #orders hash is indistinguishable from an in-page anchor and is not treated as a navigation.
API requests fail after enabling distributed tracing
A cross-origin request carryingtraceparent may need a CORS preflight. If your browser reports a CORS error naming traceparent, allow that header in your API’s Access-Control-Allow-Headers. Read more in distributed tracing for Browser.
A failed request shows no back-end spans
The error arrived, but its trace has only the browser span. Check that the receiving service reports through a hosted collector. Its HTTP server also needs the right instrumentation package to readtraceparent.
No failed requests are reported
Requests to your API fail, but noHTTPError or TimeoutError issue appears. Check that each request matches a pattern in tracePropagationTargets. A pattern needs a host and a path: /api/** and api.example.com both match nothing. Some failures are never reported:
- A request made in
no-corsmode. - A 4xx response.
- A request matching
privacy.networkBlocklist. - A timeout while the device is offline.
Network breadcrumbs have no timings
The request was cross-origin and the server sent noTiming-Allow-Origin header. Read more in reading network breadcrumbs.
Getting help
Include your app name, the@appsignal/browser version, and the browser and version where you see the problem. Reach us through our support channels, or in our Discord community for beta feedback.