Overview
@saflib/vendors-sentry-client provides Sentry Vue/browser adapters for SAF SPAs. Safe to import from Vite client bundles — never depends on @sentry/node.
Implements the browser side of @saflib/errors alongside @saflib/errors-vue.
What this package provides
createSentryCallback()— VuecreateAppcallback: initializes Sentry whenVITE_CLIENT_SENTRY_DSNis set; always POSTs client errors to/errors/recordon localhost hostsidentifyToSentry()/resetSentryUser()— attach or clear user context after auth session is availablesanitizeTelemetryEventintegration — strips sensitive fields before Sentry upload
Integration
Pass createSentryCallback({ source: "app" }) (or your SPA name) into your client bootstrap alongside other app callbacks. Sentry is skipped on *.localhost and when the DSN env var is unset.
Environment:
VITE_CLIENT_SENTRY_DSN— browser project DSN at build time
Server-side Sentry for Node services lives in @saflib/vendors-sentry-node.