Skip to content

Commit 06ab90c

Browse files
committed
fix(Telemetry): Start telemetry properly
1 parent 7dbf5e1 commit 06ab90c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

SoundSwitch/Program.cs

+6-1
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,15 @@ private static void Main()
6464
CacheDirPath = Path.Combine(ApplicationPath.Default, "Session")
6565
};
6666
sentryOptions.AddIntegration(new ContribSentrySdkIntegration(contribOptions));
67-
ContribSentrySdk.StartSession(user);
6867
}
6968

7069
using var _ = SentrySdk.Init(sentryOptions);
70+
//Needs to be started AFTER the init of the main SDK
71+
//else the ContribSentrySdk isn't enabled and no tracking is done
72+
if (AppConfigs.Configuration.Telemetry)
73+
{
74+
ContribSentrySdk.StartSession(user);
75+
}
7176

7277

7378
SentrySdk.ConfigureScope(scope => { scope.User = user; });

0 commit comments

Comments
 (0)