You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was investigating why Sentry always showed me ? for culprits (= modules) and I dove deep into both Twisted and raven (the Python reporting client) and found the reason: twisted.python.failure._Frame has an empty f_globals and raven determines the name of the module by looking at f_globals["__name__"] which seems reasonable.
Is there a reason we don’t set this value other than it hasn’t been done yet?
Presumably there was no perceived need for this information. This is supported by the _Traceback docstring:
Note that
although frames generally include locals and globals, this information
is not kept by this object, since locals and globals are not used in
standard tracebacks.
(Hooray, useful documentation.)
I don't see what would hurt about putting some of the simple data from the actual frame into the fake frame (documenting the motivation behind each piece, probably).
I've run into this when doing post mortem debugging.
It results in the variables appearing as not defined.
As, when the Failure object is cleaned (Failure.cleanFailure()), _safeReprVars() is called on the locals and globals, we can only save string versions of the variables at that point. That's still better than nothing from a debugging perspective.
I was investigating why Sentry always showed me
?
for culprits (= modules) and I dove deep into both Twisted and raven (the Python reporting client) and found the reason:twisted.python.failure._Frame
has an emptyf_globals
and raven determines the name of the module by looking atf_globals["__name__"]
which seems reasonable.Is there a reason we don’t set this value other than it hasn’t been done yet?
Searchable metadata
The text was updated successfully, but these errors were encountered: