getsentry / raven-csharp

Superseded by: https://github.com/getsentry/sentry-dotnet
BSD 3-Clause "New" or "Revised" License
231 stars 121 forks source link

User-created exceptions #268

Closed alexanderkyte closed 5 years ago

alexanderkyte commented 6 years ago

I'd like to create a SentryException object by hand from a json blob. The current API makes that very difficult to do. It is a stack trace, just serialized.

alexanderkyte commented 6 years ago

Plan:

bruno-garcia commented 6 years ago

@alexanderkyte sounds like a fair request. I'd be glad to merge a PR.

It's worth noting we've been working on a new SDK. It's an initiative from Sentry to unify the API across all SDKs. First ones are .NET, Rust and JavaScript.

SentryException is created here and the actual StackTrace is created here. Note that the stack trace creation code is also used outside of the context of an exception when a flag is set.

We'll be releasing a major version of the new SDK next month.

Just to clarify though:

I wondering where would we add this in the context of the new SDK, if that's interesting to you.

One last note, we plan to support storing a whole event in disk for scenarios like Xamarin where the event is only sent once the app restarts. I wonder what exactly is the use case you have where the stack trace is serialized since this is an interesting topic for us.

bruno-garcia commented 5 years ago

Will be tracked here: https://github.com/getsentry/sentry-dotnet-protocol/issues/24