hindsight_datadog 0.9.0
hindsight_datadog: ^0.9.0 copied to clipboard
Session replay for Flutter Datadog integration: tags RUM events with the live replay link and mirrors Datadog-observed errors onto the replay timeline.
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_idandhindsight.replay_url. - Refreshes those tags when the Hindsight replay session rotates.
- Records Datadog-observed RUM errors as
errormarkers on the replay timeline, using the Datadog handled/unhandled flag. - Wraps a pre-existing
errorEventMapperand 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.