Skip to content
This repository was archived by the owner on Oct 23, 2023. It is now read-only.

Only fetch context when sending exception and message #635

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lepture
Copy link
Contributor

@lepture lepture commented Aug 5, 2015

The before_request will be called every request. It costs 10+ ms to collect context
information even if there is no errors.

This makes the application slow. The patch will change this behavior. It works like the tornado
plugin. It will collect context information when there is an error.

@dcramer
Copy link
Member

dcramer commented Aug 5, 2015

I think what I'd prefer is we support passing a function to the context methods for lazy execution rather than one-offing this with each integration

@pvanliefland
Copy link

@dcramer is there a solution for lazy execution now? Our app metrics show that raven can be the most time-consuming process for some requests in our Flask app (especially POST requests).

If there is no solution yet, I'd be happy to help if you can give me some pointers on how to implement it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants