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

Increase error count by 1 on the view update event following a crash #1145

Merged

Conversation

plousada
Copy link
Member

What and why?

Following a crash, when updating a view with the crash count increase we should also increase the error count.

How?

A brief description of implementation details of this PR.

Review checklist

  • Feature or bugfix MUST have appropriate tests (unit, integration)
  • Make sure each commit and the PR mention the Issue number or JIRA reference
  • Add CHANGELOG entry for user facing changes

Custom CI job configuration (optional)

  • Run unit tests
  • Run integration tests
  • Run smoke tests

@plousada plousada requested a review from a team as a code owner January 30, 2023 17:52
@datadog-datadog-prod-us1
Copy link

datadog-datadog-prod-us1 bot commented Jan 30, 2023

Datadog Report

Branch report: plousada/RUMM-2992/view-error-count-not-being-incremented
Commit report: 0e5d401

dd-sdk-ios: 0 Failed, 0 New Flaky, 116 Passed, 0 Skipped, 5m 35.59s Wall Time

Copy link
Member

@maciejburda maciejburda left a comment

Choose a reason for hiding this comment

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

One nonblocking comment :)

@@ -399,7 +399,7 @@ internal struct CrashReportReceiver: FeatureMessageReceiver {
domComplete: original.view.domComplete,
domContentLoaded: original.view.domContentLoaded,
domInteractive: original.view.domInteractive,
error: original.view.error,
error: .init(count: original.view.error.count + 1),
Copy link
Member

Choose a reason for hiding this comment

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

Error model for now only has count, but I think it would be safer to copy object original.view.error and then add 1 to the count (just so it doesn't break when we alter the model).

Copy link
Member

@maxep maxep left a comment

Choose a reason for hiding this comment

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

LGTM 👍
And CI is actually green:
image

@plousada plousada merged commit 60bde72 into develop Jan 31, 2023
@maxep maxep deleted the plousada/RUMM-2992/view-error-count-not-being-incremented branch January 31, 2023 12:25
@fuzzybinary fuzzybinary mentioned this pull request Feb 23, 2023
6 tasks
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