diff --git a/PluralKit.Bot/Init.cs b/PluralKit.Bot/Init.cs index 70c4a753..3b44c46c 100644 --- a/PluralKit.Bot/Init.cs +++ b/PluralKit.Bot/Init.cs @@ -38,15 +38,13 @@ namespace PluralKit.Bot var logger = services.Resolve().ForContext(); // Initialize Sentry SDK, and make sure it gets dropped at the end - var sentryDsn = services.Resolve().SentryUrl; - if (sentryDsn != null) + + using var _ = Sentry.SentrySdk.Init((opts) => { - using var _ = Sentry.SentrySdk.Init((opts) => - { - opts.Dsn = new Dsn(sentryDsn); - opts.Release = BuildInfoService.FullVersion; - }); - } + opts.Dsn = services.Resolve().SentryUrl; + opts.Release = BuildInfoService.FullVersion; + opts.AutoSessionTracking = true; + }); // "Connect to the database" (ie. set off database migrations and ensure state) logger.Information("Connecting to database"); diff --git a/PluralKit.Bot/PluralKit.Bot.csproj b/PluralKit.Bot/PluralKit.Bot.csproj index 219273f8..200c0958 100644 --- a/PluralKit.Bot/PluralKit.Bot.csproj +++ b/PluralKit.Bot/PluralKit.Bot.csproj @@ -22,7 +22,7 @@ - + diff --git a/PluralKit.Bot/packages.lock.json b/PluralKit.Bot/packages.lock.json index edb3e3e7..00b6fa66 100644 --- a/PluralKit.Bot/packages.lock.json +++ b/PluralKit.Bot/packages.lock.json @@ -10,14 +10,9 @@ }, "Sentry": { "type": "Direct", - "requested": "[2.1.6, )", - "resolved": "2.1.6", - "contentHash": "Haii3y9JZX9Z/HrHyy8r0cLj6WvTTFS4xbGI0UtItZ53yB/hGaWeXD5mvk47HAVOHeix8Gg64tguxIBCicoMAQ==", - "dependencies": { - "Newtonsoft.Json": "11.0.2", - "Sentry.PlatformAbstractions": "1.1.1", - "Sentry.Protocol": "2.1.6" - } + "requested": "[3.11.1, )", + "resolved": "3.11.1", + "contentHash": "T/NLfs6MMkUSYsPEDajB9ad0124T18I0uUod5MNOev3iwjvcnIEQBrStEX2olbIxzqfvGXzQ/QFqTfA2ElLPlA==" }, "SixLabors.ImageSharp": { "type": "Direct", @@ -519,16 +514,6 @@ "resolved": "4.3.0", "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" }, - "Sentry.PlatformAbstractions": { - "type": "Transitive", - "resolved": "1.1.1", - "contentHash": "ug99ZPdcQQY2Q2smO5tWfxUdMQF8f90UdCKMSfhucJVOAQtKWM0rXcqLvVZRlXDzeB/xNQWLSuw56I5MuaOS9g==" - }, - "Sentry.Protocol": { - "type": "Transitive", - "resolved": "2.1.6", - "contentHash": "AXVI9e/mYp5NI/r+Tfk//YyXGGCUxq698xnOuJbiDUJ2FYw88BdB1Ewmv29pA8FTh/MLBWTPIwTVBWMouZrQBA==" - }, "Serilog": { "type": "Transitive", "resolved": "2.10.0",