-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Labels
awaiting feedbackAwaiting a response from a customer. Will be automatically closed after approximately 2 weeks.Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks.needs discussionRequires internal analysis/discussionRequires internal analysis/discussion
Description
Hi! I've recently created a few libraries that are helpful for extracting information from frames and tracebacks, and I think they could be very useful to bugsnag.
executingcan identify the exact AST node being executed by a frame in many cases. It's always disappointed me that Python only points to a line in each frame in tracebacks, especially when the expression/statement at fault spans many lines. Sometimes it can be really hard to interpret. Currently executing is used in IPython (in master, unreleased) to highlight the node, here's what it looks like:
executingcan also infer a function__qualname__from a code object, meaning your traceback can saylorem/ipsum.py in MyClass.__init__ at line 123instead of just__init__, which is much more informative.pure_evalcan safely evaluate certain AST nodes without side effects, so that if the source for a frame contains expressions likeself.fooandbar[key]their values can often be shown alongside plain variables.stack_datacollects data from tracebacks for the purpose of formatting and displaying them. It usesexecutingandpure_evaland also provides a lot of functionality of its own. I integratedstack_datainto IPython which allowed removing a lot of flaky custom introspection code, fixing several bugs and making the code more maintainable.stack_dataidentifies the locations of variables and evaluated expressions in the source lines. An intelligent UI could use this, for example, to allow the user to hover over a variable in source code to see its value rather than scroll through a list to find it.
I'll be honest, I've never used bugsnag before (in fact I only just learned about it) so I don't know exactly what would make sense. But I made a similar issue on sentry (getsentry/sentry-python#748) and integrated a couple of these features in there and they seemed pretty happy, particularly with pure_eval. Seeing as you guys are an alternative to sentry, I thought it made sense to give you a heads up. I don't actually have time to integrate these myself, but I'd be happy to help with any questions you have.
chhabrakadabra and staab
Metadata
Metadata
Assignees
Labels
awaiting feedbackAwaiting a response from a customer. Will be automatically closed after approximately 2 weeks.Awaiting a response from a customer. Will be automatically closed after approximately 2 weeks.needs discussionRequires internal analysis/discussionRequires internal analysis/discussion
