hindsight_datadog

Datadog RUM integration for the hindsight session replay SDK. Keep your Datadog — every sampled-in RUM event gains a one-click link to the moment in the session replay.

What it does:

  • Tags subsequent Datadog RUM events with hindsight.session_id and hindsight.replay_url.
  • Refreshes those tags when the Hindsight replay session rotates.
  • Records Datadog-observed RUM errors as error markers on the replay timeline, using the Datadog handled/unhandled flag.
  • Wraps a pre-existing errorEventMapper and honors its drop decision.

Datadog exposes no breadcrumb/event beforeSend hook in the Flutter RUM SDK, so this package does not mirror arbitrary Datadog breadcrumbs onto the replay timeline.

Usage

final hd = HindsightDatadogIntegration();
final rum = hd.attachTo(DatadogRumConfiguration(applicationId: 'rum-app-id'));
await Hindsight.init(HindsightConfig(projectId: 'my-app', apiKey: 'hs_...'));
await DatadogSdk.instance.initialize(DatadogConfiguration(clientToken: '...', env: 'prod', rumConfiguration: rum), TrackingConsent.granted);
hd.start(DatadogSdk.instance.rum);

Wrap your app with HindsightWidget as usual after initialization. Call hd.detach() or hd.stop() during teardown to remove Datadog RUM attributes and restore the original errorEventMapper.

Libraries

hindsight_datadog
Datadog integration for the Hindsight session replay SDK.