SIGN IN SIGN UP

fix(sessions): Finalize previous session even when auto session tracking is disabled (#5154)

* fix(core): Finalize previous session even when auto session tracking is disabled

The `isEnableAutoSessionTracking` guard in `PreviousSessionFinalizer`,
`MovePreviousSession`, and `InternalSentrySdk.deleteCurrentSessionFile`
prevented finalization of manually started sessions (via `Sentry.startSession()`).

The flag controls *automatic* session lifecycle, not whether sessions exist at all.
Manual sessions write the same files to disk and need the same finalization.

Fixes #5108

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* formatting

* changelog: Add entry for #5154

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
R
Roman Zavarnitsyn committed
872b0841f71a53269afd906cf7b61a450c004dd2
Parent: 37a4609
Committed by GitHub <noreply@github.com> on 3/5/2026, 1:34:25 PM