Skip to content

Fix missing feature flags in crash and ANR error events#3172

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
developfrom
valpertui/fix/missing-feature-flags-in-crash-anr-errors
Feb 11, 2026
Merged

Fix missing feature flags in crash and ANR error events#3172
gh-worker-dd-mergequeue-cf854d[bot] merged 1 commit into
developfrom
valpertui/fix/missing-feature-flags-in-crash-anr-errors

Conversation

@Valpertui

@Valpertui Valpertui commented Feb 10, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Feature flags from the last RUM view event were not propagated to the ErrorEvent constructed by DatadogLateCrashReporter when handling NDK crashes and ANR fatal errors. This caused feature flag context to be lost in crash error events sent to Datadog.

The fix adds featureFlags field mapping (with ViewEvent.Context to ErrorEvent.Context conversion) in resolveErrorEventFromViewEvent().

This is the Android counterpart of DataDog/dd-sdk-ios#2688 which fixed the same issue in the iOS SDK.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

Feature flags from the last RUM view event were not propagated to
the ErrorEvent constructed by DatadogLateCrashReporter when handling
NDK crashes and ANR fatal errors. This caused feature flag context
to be lost in crash error events sent to Datadog.

Add featureFlags field mapping (with ViewEvent.Context to
ErrorEvent.Context conversion) in resolveErrorEventFromViewEvent().

Co-Authored-By: Claude Opus 4.6 <[email protected]>
@Valpertui
Valpertui requested a review from a team as a code owner February 10, 2026 22:19
@datadog-datadog-prod-us1

This comment has been minimized.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.22%. Comparing base (e2d7d5b) to head (fb51ff0).
⚠️ Report is 2 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3172      +/-   ##
===========================================
+ Coverage    71.19%   71.22%   +0.03%     
===========================================
  Files          922      922              
  Lines        34111    34113       +2     
  Branches      5775     5776       +1     
===========================================
+ Hits         24284    24294      +10     
+ Misses        8195     8190       -5     
+ Partials      1632     1629       -3     
Files with missing lines Coverage Δ
...g/android/rum/internal/DatadogLateCrashReporter.kt 90.10% <100.00%> (+0.60%) ⬆️

... and 34 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Valpertui

Copy link
Copy Markdown
Member Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Feb 11, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-02-11 09:13:03 UTC ℹ️ Start processing command /merge


2026-02-11 09:13:09 UTC ℹ️ MergeQueue: pull request added to the queue

The expected merge time in develop is approximately 1h (p90).


2026-02-11 10:18:07 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 117049f into develop Feb 11, 2026
28 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the valpertui/fix/missing-feature-flags-in-crash-anr-errors branch February 11, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants