-
-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ignored exceptions are still built #1017
Comments
It seems to me that the issue is bound to #928, which introduced the Lines 96 to 98 in f28c0e1
...but later, after the whole stacktrace is extracted, which is obviously costly with a 4-levels-deep exception chain... @ste93cry WDYT? |
I remember debugging through that code and being a bit confused by line 97 not being executed… I also saw there is an |
If you don't have the
As can be seen from the screenshot at the beginning, the problems seems to be that for each frame we read the source code from the disk and this is pretty I/O intensive. @greg0ire you should try to see if with #1003 (not released yet) the issue goes away |
It does, right? I just booted my work PC because I remember it being enabled in some sort of BC layer, and that's indeed the case, just not in this package. Here is the culprit I think: So I suppose it's as if I have both the option and the integration enabled?
I don't fully understand what this done, but sure, I can try tomorrow, unless you tell me the issue above should be fixed instead. |
Yes,
While in the documentation it was mentioned that the |
Woops, my bad, yes, that's a bug! I've opened getsentry/sentry-symfony#345 to track this. |
Ah it looks like a change is needed on the Symfony bundle for |
Probably too laxist, but redefining the configuration node as a scalar node (as opposed to an integer node) allows |
I managed to do it, looks like you did a great job with that PR, -27% improvement! : The thing is I don't think I want that, and I think I have uncovered a big architectural issue: things are built that are not needed to take a decision. This integration is plugged to a scope at some point:
The unified API, that I just discovered, describes a scope as
Why should it know about data not being sent (excluded exceptions)? This looks wrong. I think there should be another thing this integration could plug to, that would be called earlier (the best place being probably Lines 96 to 98 in f28c0e1
|
It is something requested to all SDK, but we have some leeway. In this case, maybe we can fix this by putting the |
If you mean "first in the array of integrations", I doubt it will change anything. What this integrations does is register itself as a global event processor in the Scope. Then the scope calls it in a loop of event processing, but way, way too late (after the event is built, obviously). |
Well the improvement is not thanks to me: it's just that you are not reading anymore the source files to extract the context lines to send along with each frame, so there is less I/O which is heavy by nature.
It was just a test to see if it was the culprit of the problem, I didn't mean that it was the solution 😉
@Jean85 this is another bug to be fixed related to #1003
I think that #1011 can definitely help because it will move this task to an integration itself, and if configured to run later than the aforementioned integration it will solve all problems. If you are willing to test the branch and see if it helps you it would be cool |
Sure! Can you please run this gist from your local repo, with your branch checked out, then post the results on the PR? It will help me do the test. https://gist.github.com/greg0ire/a404831add1247d2bc20fa11107c5d5e |
Here you go: composer config repositories.ste93cry vcs https://github.com/ste93cry/sentry-php
composer require sentry/sentry "dev-feature/add-frame-contextifier-integration as 2.3.2" |
Are these changes sufficient for your use-case? If so, feel free to close the issue |
They are, thanks |
I have a microservice that calls an external API. Sometimes, this external API will timeout, and my application will create a
GatewayTimeoutException
, with aNoResponseException
as previous exception, with aHttp\Client\Exception\NetworkException
as previous exception, with aGuzzleHttp\Exception\ConnectException
. It's 4 level deep.I found that a lot of time was spent handling those in Sentry, so I added them to the list of ignored exceptions. This did not result in an improvement, because it seems the exceptions are still handled by Sentry, even if they are ultimately not sent to the server. I mitigated the issue by not setting the
NoResponseException
as a previous exception when not in debug mode, it resulted in a 100ms improvement. I won't share the blackfire trace because I can't redact things in it, but here is a screenshot of the interesting part, which does not involve code in my application:Using
The text was updated successfully, but these errors were encountered: