sentry-dotnet icon indicating copy to clipboard operation
sentry-dotnet copied to clipboard

Adjust ASP.NET Core installation steps for .NET 6

Open bruno-garcia opened this issue 3 years ago • 4 comments

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

bruno-garcia avatar Dec 13 '21 01:12 bruno-garcia

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...

dragouf avatar Jan 11 '22 16:01 dragouf

Relates to: https://github.com/getsentry/sentry-dotnet/issues/1453

bruno-garcia avatar Feb 01 '22 14:02 bruno-garcia

builder.WebHost.UseSentry();

var app = builder.Build();

app.UseSentryTracing();

bruno-garcia avatar Feb 01 '22 14:02 bruno-garcia

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

SimonCropp avatar Mar 23 '22 19:03 SimonCropp