getsentry / sentry-dotnet

Sentry SDK for .NET
https://docs.sentry.io/platforms/dotnet
MIT License
584 stars 206 forks source link

Support Problem Details Responses #2523

Open jamescrosswell opened 1 year ago

jamescrosswell commented 1 year ago

Problem Statement

.NET 8 is (likely) introducing official support for problem details responses... but these are also used in the wild already.

Currently the SentryHttpMessageHandler doesn't pay any particular attention to the response details when an error is encountered. Potentially the Problem Details Response has important information to help users debug issues when Http Requests that they make result in an error however.

Solution Brainstorm

No response

bitsandfoxes commented 2 months ago

With .NET 9 looming on the horizon we might want to revisit this?

jamescrosswell commented 2 months ago

With .NET 9 looming on the horizon we might want to revisit this?

Yeah, I'm not sure exactly what the implementation would look like. One option would be to store the problem details (basically some JSON) in the Event.Extras... although I think there's a plan to get rid of Extras right? Is there anywhere else we could store this?

bitsandfoxes commented 1 month ago

Adding this to the 5.0 milestone either to add support or to have a better understanding how to support this. With the move to support spans-only there might be a new place to store this. I'll know more once that plan is a bit more finalized (early next week)