Repository navigation
feat(analytics): send session start and stop events - #3496
Merged
Merged
Conversation
emitSessionEvents defaults to true. When false, sessions are still tracked and stamped on every event, but _session.start and _session.stop are not sent.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3496 +/- ##
==========================================
+ Coverage 57.65% 57.77% +0.12%
==========================================
Files 1128 1129 +1
Lines 33198 33268 +70
Branches 4949 4961 +12
==========================================
+ Hits 19140 19221 +81
+ Misses 12130 12120 -10
+ Partials 1928 1927 -1 🚀 New features to boost your workflow:
|
mattcreaser
reviewed
Oct 22, 2026
deliver() caught only Exception, so an Error from the sink ended the consumer and nothing after it was sent.
mattcreaser
approved these changes
Oct 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Session starts and stops are now sent to the sink as
_session.startand_session.stopevents. The stop event carriesstop_timestampandduration, which were computed before but never sent.close().close()no longer drops sends that are still queued.stopSession()no longer starts a new session, a secondstopSession()no longer changes the stop time, a stale timeout no longer stops a resumed session, and session calls do nothing afterclose().emitSessionEvents(defaulttrue) to turn the session events off, andinitialUserId,initialGlobalAttributesandinitialGlobalMetricsso the launch_session.startcan carry them.Related: aws-amplify/amplify-swift#4180