We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82a868f commit 60f2ce9Copy full SHA for 60f2ce9
packages/browser/src/sdk.ts
@@ -204,7 +204,11 @@ function startSessionTracking(): void {
204
205
// We want to create a session for every navigation as well
206
addInstrumentationHandler({
207
- callback: () => {
+ callback: ({ from, to }) => {
208
+ // Don't create an additional session for the initial route or if the location did not change
209
+ if (from === undefined || from === to) {
210
+ return;
211
+ }
212
hub.startSession();
213
hub.captureSession();
214
},
0 commit comments