-
Notifications
You must be signed in to change notification settings - Fork 79
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
Fixed recursion on payload too large #492
base: master
Are you sure you want to change the base?
Fixed recursion on payload too large #492
Conversation
Hi @woutersamaey, it seems this would interfere with our retrying logic that would generally trigger to split up large payloads. While I understand having a singular payload event that's too large could be problematic, and will recommend a fix for that to our products team, I don't think this approach will be usable. If you could describe the particular issues that led you to create this PR, that would help us narrow down and approach and create a fix much more easily. |
We had an exception with a huge message that could not be sent to Bugsnag. The idea is that if bugsnag can't take the exception, then at least it should help me out instead of failing with another error, masking the original. The underlying issue was easy to fix for me, but because bugsnag could not handle it, it became a huge thing. So that's why I wrote the message out. |
I agree, that doesn't sounds ideal at all. I think adding a failure condition with full logs would be a practical way to approach this as suggested, and I'll suggest we prioritise this to get a fix as soon as we can. |
@Cawllec What about creating a fallback LoggerInterface where we can attach our own logic to, so that will be used in case Bugsnag can't handle it? I'd be able to implement per-application logic and log the error to the regular application error log, which did not happen before as it could not get to that point. |
For now, I think it's best to do what the library already does, which is to fallback to php's own global logging functions. Changing how the library deals with internal exceptions is a separate discussion to be had I think, if we want to change that. One of the reasons for the current design is to prevent the possibility non-termination due to bugsnag being the psr logger itself. |
Ah, looking at your changes, I see that's what you've done. Perfect! :) |
Huh? |
Goal
Fixed the endless recursion when the payload to submit is too large. The PHP max function nesting will be reached.
Review
For the submitter, initial self-review:
For the pull request reviewer(s), this changeset has been reviewed for: