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.
@appsignal/javascript continues to work and keeps reporting to your existing error lists. New features only land in @appsignal/browser, so migrate when you want breadcrumbs without plugins, web vitals, or the Browser views.
What changes
One package instead of several. Error tracking, breadcrumbs, and web vitals are all in@appsignal/browser. The plugin packages and framework integration packages have no equivalent, because their functionality is either built in or no longer needed.
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. Noise from browser extensions is dealt with by throwing away errors from scripts on other domains, and by beforeError, rather than by turning the whole category off.
Errors report to the browser namespace. @appsignal/javascript reported to frontend, and there is no namespace option any more. Errors from the new package appear in the Browser section of your application rather than in your existing front-end error list. Existing incidents in the frontend namespace stay where they are.
Your existing frontend incidents keep their assignees, states, and severities. Errors from the new package arrive as new issues in the browser namespace, so they start unassigned, the same as any error AppSignal has not seen before.
No spans, decorators, or overrides. The span API and its hooks are gone. Set tags for every error with setTags(), pass context for a single error as the second argument to captureError(), and remove sensitive text in beforeError and beforeBreadcrumb.
Configuration
Before:
Methods
appsignal.wrap() ran your code, reported anything it threw, and gave you back a promise that rejects with the same error, so you handled it in a try/catch or a .catch(). The direct replacement makes both halves explicit:
Framework integrations
The React error boundary changes shape:
action prop to set.
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.