Hello everyone
I am new to Sentry and want to give it a go. The initial setup instructions said to do:
But that did not work, I then did some Googling and found this repo on GitHub.
I am trying to replicate the code in my Program.cs
like so:
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder
.UseStartup<Startup>()
.UseSentry(o =>
{
o.MaxBreadcrumbs = 200;
o.DecompressionMethods = DecompressionMethods.None;
o.MaxQueueItems = 100;
o.ShutdownTimeout = TimeSpan.FromSeconds(5);
o.MinimumEventLevel = LogLevel.Error;
});
});
But I’m getting a build error, it apparently doesn’t recognise .UseSentry()
even though I have the nuget package installed.
What am I missing?