Hi, I’m having trouble using SentrySdk with AspNetCore.
looking examples/dotnet at master · getsentry/examples · GitHub but not find solution.
My configuration:
public static IHostBuilder CreateHostBuilder(string[] args)
{
var host = Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(web =>
{
web.UseStartup<Startup>();
web.UseSentry();
});
return host;
}
Sentry + Serilog works fine.
I want to use SentrySdk.CaptureMessage, but still have SentrySdk.IsEnabled to false.
Can I use SentrySdk in conjunction with HostBuilder.UseSentry?
Does SentrySdk need to be initialized separately, i.e. does it not automatically get configuration from appsettings.json?
Thanks for help.