Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Listen to PosixSignalRegistration for events #1122

Open
bruno-garcia opened this issue Jul 14, 2021 · 3 comments
Open

Listen to PosixSignalRegistration for events #1122

bruno-garcia opened this issue Jul 14, 2021 · 3 comments
Labels
Feature New feature or request Posix

Comments

@bruno-garcia
Copy link
Member

bruno-garcia commented Jul 14, 2021

Different signals can be now received in .NET 6 through PosixSignalRegistration.
We can rely on this to close a session, flush events, add breadcrumbs etc.

This task involves exploring which events are available, what are the limitations (allocations, timing, opening connections?) with regards to code we can run in there and come out with what we can build on top of it.

See: dotnet/runtime#50527

@bitsandfoxes
Copy link
Contributor

Oh wow, this is actually pretty neat! I wonder if we can rely on this as well to avoid event duplication when relying on native SDKs, i.e. #3545 (comment)

@jamescrosswell
Copy link
Collaborator

Looks like these are the signals you can register handlers for:

        /// <summary>Hangup</summary>
        SIGHUP = -1,

        /// <summary>Interrupt</summary>
        SIGINT = -2,

        /// <summary>Quit</summary>
        SIGQUIT = -3,

        /// <summary>Termination</summary>
        SIGTERM = -4,

I take it we're looking at ways to ensure a more graceful shutdown of Sentry when the app is about to exit here (so maybe trying to send some events rather than dump these to a file and sending them on the next program execution)? Or is there something else we could do with these?

@bitsandfoxes
Copy link
Contributor

Thanks for digging those up! I think we're going to have to look at what we can do first.

what are the limitations (allocations, timing, opening connections?) with regards to code we can run in there and come out with what we can build on top of it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request Posix
Projects
Status: No status
Archived in project
Development

No branches or pull requests

4 participants