Skip to content

Commit

Permalink
fix(Telemetry): Start telemetry properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Belphemur committed Sep 4, 2021
1 parent 7dbf5e1 commit 06ab90c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion SoundSwitch/Program.cs
Expand Up @@ -64,10 +64,15 @@ private static void Main()
CacheDirPath = Path.Combine(ApplicationPath.Default, "Session")
};
sentryOptions.AddIntegration(new ContribSentrySdkIntegration(contribOptions));
ContribSentrySdk.StartSession(user);
}

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


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

0 comments on commit 06ab90c

Please sign in to comment.