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

2 improvements for new crash reporter #9

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

TTalpey
Copy link
Contributor

@TTalpey TTalpey commented Sep 1, 2024

A couple of improvements after further testing of the new merge...

It's important to pause sending persistent client events to the aptabase server when an app is crashing, otherwise duplicates appear in the logs. Often this is the first or second line of the stack trace, which becomes confusing. Restore the "pauseProcessing" behavior in the refactored AptabasePersistentClient.

Also, add some basic DeviceInfo platform information to the initial ("00") crash event, to make it more useful and meaningful in the aptabase UI without having to dig into a full "export".

@TTalpey
Copy link
Contributor Author

TTalpey commented Sep 2, 2024 via email

Allow cancellation of the retry delay.
@TTalpey
Copy link
Contributor Author

TTalpey commented Sep 2, 2024

Pushed the update, identical semantics but it makes the pause a formal property, and adds thread safety. It removes the leak of recognizing crash event details. Feel free to squash with the earlier ones if you agree.

I considered adding the new "Paused" property to both channel types, but it's actually the opposite of what we need for non-persistent channel delivery. For those, the sooner the better!

BTW also passed the _cts.Token to the retry delay, so it can be canceled more promptly on any teardown.

@cristipufu
Copy link
Member

cristipufu commented Sep 3, 2024

@TTalpey but how/when do we resume?
I tried something here: https://github.com/aptabase/aptabase-maui/pull/10/files, please let me know your thoughts

@TTalpey
Copy link
Contributor Author

TTalpey commented Sep 3, 2024

In my proposed PR, the Pause test throws at line 91, which lands in the catch{} at line 105, so - 30 seconds. That's plenty of time to crash, or if it actually picks back up it's enough time to be sure.

@TTalpey
Copy link
Contributor Author

TTalpey commented Sep 3, 2024

Re your other proposal, need to find time to review, it's a lot bigger, and has a new API. Hopefully soon.

@cristipufu
Copy link
Member

In my proposed PR, the Pause test throws at line 91, which lands in the catch{} at line 105, so - 30 seconds. That's plenty of time to crash, or if it actually picks back up it's enough time to be sure.

Yes, but it will remain paused if the app doesn't actually crash?

@TTalpey
Copy link
Contributor Author

TTalpey commented Sep 3, 2024

No, it's a temporary pause. Note that fetching "Paused" resets the _paused boolean, so it's self-restarting. This is what the earlier PR did too btw.

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.

2 participants