sentry-python
sentry-python copied to clipboard
Add stack information when `stack_info` is set in logging integration.
Problem Statement
The stack information should be added to events send with the logging integration when stack_info=True is set.
Code like this should have a stack attached in the resulting event in Sentry:
logger.error(
"Option %s set to %s. previous update channel: %s",
key,
value,
channel,
stack_info=True,
)
Solution Brainstorm
Check for the parameter in logging integration and add the stack information if parameter is True.
Some info from @untitaker :
exc_info=True should send the stack
specifically, it sends the current stack if sys.exc_info is None, otherwise it sends the current exc info
stack_info appears to be new in 3.2, we made the api design decisions with py2 in mind at the time