hindsight_sentry

Sentry integration for the hindsight session replay SDK. Keep your Sentry — every error report gains a one-click link to the moment in the session replay.

What it does:

  • Tags the Sentry scope (and every outgoing error event) with hindsight.session_id and hindsight.replay_url.
  • Records each Sentry error as an error marker on the replay timeline and force-flushes the replay buffer so the moment survives a crashing app.
  • Mirrors Sentry breadcrumbs onto the replay timeline (opt out with mirrorBreadcrumbs: false).

Usage

await Hindsight.init(HindsightConfig(
  projectId: 'my-app',
  apiKey: 'hs_...',
));

await SentryFlutter.init(
  (options) {
    options.dsn = 'https://...@sentry.io/...';
    options.addIntegration(HindsightSentryIntegration());
  },
  appRunner: () => runApp(HindsightWidget(child: const MyApp())),
);

The integration resolves the Hindsight singleton when Sentry starts it. Multi-client setups can inject a specific client instead: HindsightSentryIntegration(client: myClient).

Pre-existing beforeSend / beforeBreadcrumb callbacks keep working: the integration wraps them and honors their drop decisions.

Libraries

hindsight_sentry
Sentry integration for the hindsight session replay SDK.