Skip to content

RUM-3150 Set source_type on native crashes to ndk#1856

Merged
fuzzybinary merged 1 commit into
developfrom
jward/RUM-3150-native-source-type-override
Feb 16, 2024
Merged

RUM-3150 Set source_type on native crashes to ndk#1856
fuzzybinary merged 1 commit into
developfrom
jward/RUM-3150-native-source-type-override

Conversation

@fuzzybinary

Copy link
Copy Markdown
Member

What does this PR do?

To properly symbolicate NDK crashes, we need to know that the provided stack trace is an NDK trace, instead of a standard Java stack trace. This changes it so that crashes caught by the NDK crash reporter report an error.source_type as "ndk" to both Logs and RUM.

Additionally, because certain platforms will want to override symbolication behavior, we provide a way to change the default native source type by using the _dd.native_source_type additional configuration option.

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)

@fuzzybinary
fuzzybinary requested review from a team as code owners February 15, 2024 21:47
@codecov-commenter

codecov-commenter commented Feb 15, 2024

Copy link
Copy Markdown

Codecov Report

Merging #1856 (a34d834) into develop (b5652fe) will decrease coverage by 0.07%.
The diff coverage is 88.24%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1856      +/-   ##
===========================================
- Coverage    83.48%   83.41%   -0.07%     
===========================================
  Files          470      470              
  Lines        16601    16601              
  Branches      2495     2495              
===========================================
- Hits         13858    13847      -11     
- Misses        2062     2072      +10     
- Partials       681      682       +1     
Files Coverage Δ
...ore/src/main/kotlin/com/datadog/android/Datadog.kt 76.25% <ø> (ø)
...n/com/datadog/android/core/internal/CoreFeature.kt 88.35% <100.00%> (+0.09%) ⬆️
...in/kotlin/com/datadog/android/log/LogAttributes.kt 0.00% <ø> (ø)
...dog/android/ndk/internal/DatadogNdkCrashHandler.kt 81.36% <100.00%> (+0.54%) ⬆️
...datadog/android/rum/internal/RumErrorSourceType.kt 100.00% <100.00%> (ø)
...g/android/rum/internal/domain/scope/RumEventExt.kt 94.20% <100.00%> (+0.73%) ⬆️
.../android/rum/internal/monitor/DatadogRumMonitor.kt 83.87% <0.00%> (-0.54%) ⬇️
...id/rum/internal/ndk/DatadogNdkCrashEventHandler.kt 84.03% <85.71%> (+0.07%) ⬆️

... and 27 files with indirect coverage changes

@0xnm 0xnm left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, I left some comments

@fuzzybinary
fuzzybinary force-pushed the jward/RUM-3150-native-source-type-override branch from 14bf556 to aa418ec Compare February 16, 2024 14:22
@fuzzybinary
fuzzybinary requested a review from 0xnm February 16, 2024 14:23
@fuzzybinary
fuzzybinary force-pushed the jward/RUM-3150-native-source-type-override branch from aa418ec to 9a7bc10 Compare February 16, 2024 14:53
Also provide a way to override the native crash type by setting `_dd.native_source_type` in the additional configuration.
@fuzzybinary
fuzzybinary force-pushed the jward/RUM-3150-native-source-type-override branch from 9a7bc10 to a34d834 Compare February 16, 2024 15:54
@fuzzybinary
fuzzybinary merged commit 13fb7a3 into develop Feb 16, 2024
@fuzzybinary
fuzzybinary deleted the jward/RUM-3150-native-source-type-override branch February 16, 2024 17:12
@xgouchet xgouchet added this to the 2.6.0 milestone Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants