feat: add sentry error logging to dotnet-api and rust crates

This commit is contained in:
alyssa 2025-02-23 18:49:31 +00:00
parent 8266100155
commit 63777bf810
8 changed files with 86 additions and 38 deletions

View file

@ -14,6 +14,16 @@ public class Program
await BuildInfoService.LoadVersion();
var host = CreateHostBuilder(args).Build();
var config = host.Services.GetRequiredService<CoreConfig>();
// Initialize Sentry SDK, and make sure it gets dropped at the end
using var _ = SentrySdk.Init(opts =>
{
opts.Dsn = config.SentryUrl ?? "";
opts.Release = BuildInfoService.FullVersion;
opts.AutoSessionTracking = true;
// opts.DisableTaskUnobservedTaskExceptionCapture();
});
await host.Services.GetRequiredService<RedisService>().InitAsync(config);
await host.RunAsync();
}