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

Add a UserFactory for ASP.NET classic

Open mrmonday opened this issue 5 years ago • 6 comments

Via https://github.com/getsentry/sentry-dotnet/issues/243#issuecomment-512765192

This is currently supported in SharpRaven, and should be supported in sentry-dotnet to support migration to the new SDK.

mrmonday avatar Jul 18 '19 13:07 mrmonday

This came up again, a user who's having problems customizing the user set on ASP.NET classic.

bruno-garcia avatar Dec 17 '20 20:12 bruno-garcia

@mrmonday give ASP.NET classic is essentially no longer maintained, do you still this this feature should be added?

SimonCropp avatar Dec 28 '21 11:12 SimonCropp

ASP.NET is supported as part of .NET Framework, which follows the Windows support lifecycle (see: https://docs.microsoft.com/en-us/lifecycle/faq/dotnet-framework).

Since .NET Framework is included in Windows Server 2022, this means it is supported and maintained until at least 2031 - see: https://docs.microsoft.com/en-us/lifecycle/products/windows-server-2022.

There are lots of legacy applications which use ASP.NET and cannot be easily ported to .NET 5+. For example, anything that uses ASP.NET Web Forms would essentially need a complete rewrite.

I think as long as .NET Framework is supported by Sentry, this feature continues to make sense.

mrmonday avatar Dec 28 '21 12:12 mrmonday

@lucas-zimerman can u take a look at this one?

SimonCropp avatar Jun 21 '22 20:06 SimonCropp

I'll look at it soon :)

lucas-zimerman avatar Jul 07 '22 00:07 lucas-zimerman

@bruno-garcia Here's my Idea for this issue:

Add a delegate similarly to what's done on the ASP.NET Core but for configuring the name: https://github.com/getsentry/sentry-dotnet/blob/e0d6b1de14e66406f0f62b86a1c6091cbb1c6349/src/Sentry.AspNetCore/TransactionNameProvider.cs#L11

Users would be able to define the name using the given HttpContext sent to the delegate function. Additionally, the delegate would always be called by StartSentryTransaction to cover the transactions and also by an EventProcessor to cover the generated events.

From what I saw Here This seems to cover the use case of UserFactory for ASP.NET Classic

lucas-zimerman avatar Aug 01 '22 12:08 lucas-zimerman