Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUM-3757: Make sure error.threads always have content from error.stack #1964

Conversation

0xnm
Copy link
Contributor

@0xnm 0xnm commented Apr 3, 2024

What does this PR do?

It seems sometimes it is possible to have result of Thread.getAllStackTraces() without the thread impacted by ANR/crashing thread info (or without attached stacktrace, not sure here). It is not clear why it happens, but we clearly can see such issues in the dashboard, when error.stack is not found among error.threads reported (meaning error.threads doesn't have thread for which we reporting error.stack).

This change fixes that by making sure ANR thread/crashing thread is always in the error.threads - we will always add it to the list, not relying on the match among Thread.getAllStackTraces() results.

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)

@0xnm 0xnm requested review from a team as code owners April 3, 2024 13:45
@0xnm 0xnm force-pushed the nogorodnikov/rum-3757/make-sure-error-threads-contains-info-from-error-stack branch from 3f4b119 to dac8d88 Compare April 3, 2024 13:48
@codecov-commenter
Copy link

codecov-commenter commented Apr 3, 2024

Codecov Report

Merging #1964 (dac8d88) into develop (fb5a1de) will increase coverage by 0.07%.
The diff coverage is 96.30%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1964      +/-   ##
===========================================
+ Coverage    83.31%   83.38%   +0.07%     
===========================================
  Files          489      489              
  Lines        17883    17880       -3     
  Branches      2666     2663       -3     
===========================================
+ Hits         14899    14909      +10     
+ Misses        2240     2234       -6     
+ Partials       744      737       -7     
Files Coverage Δ
...og/android/rum/internal/anr/ANRDetectorRunnable.kt 80.70% <100.00%> (+1.07%) ⬆️
.../android/error/internal/DatadogExceptionHandler.kt 87.84% <94.44%> (+0.69%) ⬆️

... and 30 files with indirect coverage changes

@0xnm 0xnm merged commit 39e21c7 into develop Apr 4, 2024
23 checks passed
@0xnm 0xnm deleted the nogorodnikov/rum-3757/make-sure-error-threads-contains-info-from-error-stack branch April 4, 2024 13:22
@xgouchet xgouchet added this to the 2.8.x milestone Apr 5, 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.

None yet

4 participants