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
with_locals can be very expensive to run, and we've found our software can get into trouble when exceptions with complex locals are triggered in a tight loop, however, the information contained in the locals is often extremely useful for debugging. This commit allows the application to specify a means of selecting if locals should be captured, with a sample method which captures only the first for a given traceback. The cost of hashing the stack is quite small compared to the cost of stringifying the locals. Clearly the code can leak quite badly if used in a project with code generation, but in general the set of tracebacks should be small.
Note this can be quite awkward as Sentry doesn't really have a means of searching for a capture with locals, though one can normally just hunt backwards for the first instance.
Eventually I'll defeat the linting, but I don't understand the coverage errors (or the remaining test ones) as I've clearly not committed an extra 6% to the codebase.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
with_localscan be very expensive to run, and we've found our software can get into trouble when exceptions with complex locals are triggered in a tight loop, however, the information contained in the locals is often extremely useful for debugging. This commit allows the application to specify a means of selecting if locals should be captured, with a sample method which captures only the first for a given traceback. The cost of hashing the stack is quite small compared to the cost of stringifying the locals. Clearly the code can leak quite badly if used in a project with code generation, but in general the set of tracebacks should be small.Note this can be quite awkward as Sentry doesn't really have a means of searching for a capture with locals, though one can normally just hunt backwards for the first instance.