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.@appsignal/browser replaces @appsignal/javascript, its framework integrations, and its plugin packages. This guide maps the old API onto the new one.
The new SDK collects breadcrumbs and web vitals after init() and reports errors in the Browser views. Migrate when you are ready to adopt its API and review the changes below.
What changes
One package instead of several. Error tracking, breadcrumbs, and web vitals are all in@appsignal/browser. The new SDK has no matching plugin or framework packages. Some features are built in; others need application code.
Functions instead of an instance. There is no client object to create, pass around, or hand to a component. You call init() once and import the functions you need wherever you need them.
Uncaught errors are reported without asking. @appsignal/plugin-window-events existed because you had to opt in to them. They are on by default now. The SDK drops opaque cross-origin script errors. Use beforeError to filter other browser or extension noise.
Errors report to the browser namespace. @appsignal/javascript reported to frontend, and there is no namespace option any more. New errors appear in the Browser section. Existing frontend errors remain in their current list. Existing incidents in the frontend namespace stay where they are.
Your existing frontend incidents keep their assignees, states, and severities. The new package reports to the browser namespace. Its new issues start unassigned, as other new issues do.
No spans, decorators, or overrides. The new SDK has no equivalent for the old span API. Use setTags() for tags on subsequent errors, and beforeError or beforeBreadcrumb to redact data. The optional context passed to captureError() is not included in ordinary error reports in this beta.
Configuration
Before:
Methods
appsignal.wrap() ran your code and reported thrown errors. Its returned promise rejected with the same error, so your code could catch it. The direct replacement makes both halves explicit:
Framework integrations
The React error boundary changes shape:
action prop. Call setRouteTemplate() for the route used to group errors. If you use setTags(), call it after init() and clear it when those tags should stop applying.
Steps to migrate
- Install
@appsignal/browser@betaand remove@appsignal/javascriptalong with every@appsignal/plugin-*and framework integration package. - Replace your
new Appsignal({ ... })call withinit({ ... }), using the configuration table in this guide. Addendpointandactive. - Replace
sendErrorwithcaptureError, andwrapwithtry/catch. - Move
ignoreErrorspatterns, decorators, and overrides intobeforeErrorandbeforeBreadcrumb. - Call
setRouteTemplate()on each router navigation. - Swap the React error boundary import, if you use one.
- Set up notification settings for the
browsernamespace. - Deploy, then confirm errors and web vitals arrive in the Browser section of your application.
appVersion now supplies.