Skip to content

RUMM-2516: Remove cross platform duplicates crashes#1215

Merged
louiszawadzki merged 2 commits into
developfrom
louiszawadzki/rumm-2516/prevent-cross-plaform-crashes-duplicates
Jan 18, 2023
Merged

RUMM-2516: Remove cross platform duplicates crashes#1215
louiszawadzki merged 2 commits into
developfrom
louiszawadzki/rumm-2516/prevent-cross-plaform-crashes-duplicates

Conversation

@louiszawadzki

@louiszawadzki louiszawadzki commented Jan 4, 2023

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Makes sure a view update is sent when a cross-platform crash is detected
  • Do not send the native crash if there already was a crash

Motivation

Remove duplicated errors for JS crashes in React Native.
I'm not sure why we had 2 different behaviours in the first place depending on whether the crash was cross-platform or native: #764

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)

val updatedAttributes = addExtraAttributes(event.attributes)
val isFatal = updatedAttributes.remove(RumAttributes.INTERNAL_ERROR_IS_CRASH) as? Boolean
val isFatal = updatedAttributes.remove(RumAttributes.INTERNAL_ERROR_IS_CRASH) as? Boolean == true || event.isFatal
if (crashCount > 0 && isFatal) return // if a cross-platform crash was already reported, do not send its native version

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.

This could work only if we are sure there's not going to be another fatal crash reported after this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If the crash is fatal, none could be reported after.

@louiszawadzki
louiszawadzki force-pushed the louiszawadzki/rumm-2516/prevent-cross-plaform-crashes-duplicates branch 2 times, most recently from aef427e to aed2293 Compare January 16, 2023 09:54
@louiszawadzki
louiszawadzki marked this pull request as ready for review January 16, 2023 09:54
@louiszawadzki
louiszawadzki requested a review from a team as a code owner January 16, 2023 09:54
@louiszawadzki
louiszawadzki force-pushed the louiszawadzki/rumm-2516/prevent-cross-plaform-crashes-duplicates branch from aed2293 to 1e3a82d Compare January 17, 2023 15:09
@louiszawadzki
louiszawadzki merged commit a54ed7a into develop Jan 18, 2023
@louiszawadzki
louiszawadzki deleted the louiszawadzki/rumm-2516/prevent-cross-plaform-crashes-duplicates branch January 18, 2023 09:25
@xgouchet xgouchet added this to the 1.17.0 milestone Dec 13, 2023
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.

3 participants