mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
chore: clean up .net sentry exceptions
This commit is contained in:
parent
ce0983ba16
commit
09ed215e6c
6 changed files with 38 additions and 17 deletions
|
|
@ -45,9 +45,16 @@ public class Init
|
|||
opts.Dsn = services.Resolve<CoreConfig>().SentryUrl ?? "";
|
||||
opts.Release = BuildInfoService.FullVersion;
|
||||
opts.AutoSessionTracking = true;
|
||||
// opts.DisableTaskUnobservedTaskExceptionCapture();
|
||||
opts.DisableUnobservedTaskExceptionCapture();
|
||||
});
|
||||
|
||||
TaskScheduler.UnobservedTaskException += (_, e) =>
|
||||
{
|
||||
foreach (var inner in e.Exception.Flatten().InnerExceptions)
|
||||
SentrySdk.CaptureException(inner);
|
||||
e.SetObserved();
|
||||
};
|
||||
|
||||
var config = services.Resolve<BotConfig>();
|
||||
var coreConfig = services.Resolve<CoreConfig>();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue