Skip to content

Allow to serialize events #941

@pchinery

Description

@pchinery

We are trying to adapt Sentry for our product, but we have a slightly different workflow than the usual "Sentry way", as we do not publish events immediately, but we allow our users to review them and send them afterwards. As this can be from within a service, we have to serialize the events in some way and then deserialize them to present them to the user as well as to send them to Sentry.

Right now, the WriteTo method from IJsonSerializable is marked as "do not use / only for internal reasons" and this warning probably is well justified.

We are using it anyway right now, as this is the only easy way to serialize this completely. To make it even worse, we have to parse the Exception to SentryExceptions. Due to MainExceptionProcessor being internal (again probably for good reasons), we have copied the class to our project.

I'd like to explore if opening these paths a little bit is something you think is worth exploring, as we would like to stick to this workflow and think this could be of benefit for others as well.

If you think this is something you would bring into the library, we would be happy to create a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionFurther information is requested

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions