Skip to content

Crash Reporting Dependent on View Tracking Strategy #849

Description

@emichaux

Describe what happened

My team is running into some issues with DataDog's RUM crash reporting and how it seems to be integrated with the ViewTrackingStrategy configuration. We are interested in the insight that comes from view tracking, but we also want reporting on crashes that can occur outside of the onPause and onResume fragment and activity lifecycles. Is this possible with the DataDog SDK?

Steps to reproduce the issue:

In the following scenarios, the RUM session does not show that the session ends with an error. No crash seems to be reported.

Crash in Fragment

  1. Configure the DataDog SDK with useViewTrackingStrategy(MixedViewTrackingStrategy(false)) or FragmentViewTrackingStrategy(false).
  2. Force a crash in a Fragment within the onViewCreated lifecycle method.
  3. Observe that no crash report is sent to DataDog.

Crash in JobIntentService.

  1. Configure the DataDog SDK to use ActivityViewTrackingStrategy or use no view tracking strategy
  2. Schedule a job in a JobIntentService with a crash in the onHandleWork lifecycle method.
  3. Observe that no crash report is sent to DataDog.

Note: We noticed here that adding GlobalRum.get().addView() before triggering the crash will allow DataDog to report the crash.

Describe what you expected:
Crashes are always reported regardless of any UI lifecycle.

Additional context

  • Android OS version: Android 11
  • Device Model: Pixel 5
  • Datadog SDK version: 1.11.1

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingwaiting-for-infoWaiting for additional info from reporter

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions