getsentry / sentry-dotnet

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

Use Type-name parsing to reduce reliance on reflection #3691

Open jamescrosswell opened 1 month ago

jamescrosswell commented 1 month ago

net9.0 adds TypeName, which provides parsing functionality similar to System.Type, without any reliance on the runtime or reflection.

I believe we should be able to use this to reduce the need to use reflection and provide better support for trimming and AOT... potentially, some functionality of the SDK that we currently disable in trimming/AOT scenarios could be made AOT compatible.