sentry-dotnet
sentry-dotnet copied to clipboard
Adjust ASP.NET Core installation steps for .NET 6
Migration docs from .NET 5 to 6 state:
When using the minimal hosting model, the endpoint routing middleware wraps the entire middleware pipeline, therefore there's no need to have explicit calls to UseRouting or UseEndpoints to register routes. UseRouting can still be used to specify where route matching happens, but UseRouting doesn't need to be explicitly called if routes should be matched at the beginning of the middleware pipeline.
Our current docs point out users must add our UseSentryTracing middleware after UseRouting. This can be confusing to users when they are no longer there.
Install steps must account for framework version: https://github.com/getsentry/sentry-docs/blob/master/src/wizard/dotnet/aspnetcore.md
Is there a new doc for .net 6 ? I don't see how to configure sentry with this version ... Where to call UseSentry in Program.cs ?
[edit]: ok it may be that :
builder.WebHost.UseSentry();
but for performance log I'm not sure as it is mention in this ticket...
Relates to: https://github.com/getsentry/sentry-dotnet/issues/1453
builder.WebHost.UseSentry();
var app = builder.Build();
app.UseSentryTracing();
current plan is to update https://github.com/getsentry/sentry-docs/blob/master/src/wizard/dotnet/aspnetcore.md to target the current stable. ie net6