Yes, this sounds dodgy, but my motivation is this:
When the program crashes, I see stack trace, but any event I send inside the signal handler is not appearing.
Yes, this sounds dodgy, but my motivation is this:
When the program crashes, I see stack trace, but any event I send inside the signal handler is not appearing.
Let me attempt to answer my own question:
Unlikely.
What one can call inside a signal handler are limited to async signal safe functions.
See the list here: signal-safety(7) - Linux manual page
Any library call inside a signal handler should conform to this or there will be undefined behaviour.
libunwind library calls fir the bill.
We see several signal handler examples calling functions like ‘printf’ but they are not async signal safe.
Given all this, it is very unlikely one could make sentry calls safely.