Skip to main content

Providers Overview

A provider is an error-tracking service reachable through an adapter. You activate one with useAdapter('<name>', config). The service SDK is loaded dynamically — install only the one(s) you use.

Capability matrix

ProviderAdapter nameSDK to installNotes
Consoleconsole— built-inLogs to the console; ideal for development.
CustomcustomYour own send callback (any backend).
Sentrysentry@sentry/browserErrors, messages, breadcrumbs, user context.
Firebase CrashlyticsfirebasefirebaseFirebase app + analytics events.
Datadogdatadog@datadog/browser-rum + @datadog/browser-logsRUM + Logs.
Bugsnagbugsnag@bugsnag/jsError monitoring.
RollbarrollbarrollbarError tracking.
LogRocketlogrocketlogrocketSession replay + errors.
Raygunraygunraygun4jsCrash reporting.
AppCenterappcenterappcenter-crashes + appcenter-analyticsMobile / React Native oriented.

How activation works

import { useAdapter } from 'unified-error-handling';

await useAdapter('datadog', {
applicationId: 'your-app-id',
clientToken: 'your-client-token',
site: 'datadoghq.com',
});

Each provider page documents its config object. Activation:

  1. Dynamically imports the SDK (clear, actionable error if it is not installed — with the original failure preserved as cause).
  2. Initializes the SDK with your config.
  3. Makes the adapter active, replaying current context + breadcrumbs.

Honest notes

  • One active adapter at a time. The last useAdapter() wins; the store does not fan an error out to multiple services simultaneously. If you need that, capture into a custom adapter that forwards to several backends, or subscribe and re-dispatch.
  • You own the credentials. DSNs, client tokens, and API keys are passed by you and never bundled by the library.
  • Optional methods vary. Some adapters implement setContext, addBreadcrumb, flush, and close; the store calls these only when the adapter provides them.
  • AppCenter is mobile-oriented. Its SDKs target React Native; on the web, prefer another adapter.