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

Add stopSession() and resumeSession() to Client #429

Merged
merged 19 commits into from
Feb 27, 2019
Merged

Conversation

fractalwrench
Copy link
Contributor

@fractalwrench fractalwrench commented Feb 13, 2019

Goal

Adds the ability to stop and resume sessions. This prevents the handled/unhandled error count from incrementing when a session is in the stopped state, which may be desirable if a user manually tracks sessions and does not care about crashes that occur in the background.

Changeset

Added the public interface for stopping/resuming a session, along with the initial implementation, unit test coverage, and docs.

NOTE: NDK support was added in #432 and mazerunner scenarios have been added in #430.

Adds the ability to stop and resume sessions. This prevents the handled/unhandled error count from
incrementing when a session is in the stopped state, which may be desirable if a user manually
tracks sessions and does not care about crashes that occur in the background.
@@ -65,7 +66,9 @@
* @param date the session start date
* @param user the session user (if any)
*/
@Nullable Session startNewSession(@NonNull Date date, @Nullable User user,
@Nullable
@VisibleForTesting
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This documents that the method has been left package-visible for existing unit tests, and would otherwise be private.

when a session is stopped, no session information should be present in error payloads.
Allow sessions to be stopped on the NDK. when a session is stopped from the java layer, the session
information will no longer be serialised in the error payload of fatal NDK errors.
the START_SESSION message is emitted when a session is started or resumed, and allows the NDK layer
to update its cached value for session information which is included in the error payload. It was
previously assumed that the handled count would always be 0 when starting a session - this is no
longer the case as sessions can be resumed, therefore the handled count is passed as part of the
message.
Support stopSession() and resumeSession() in NDK
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