Giter Site home page Giter Site logo

Comments (3)

kattrali avatar kattrali commented on May 11, 2024

Thank you for the thorough report, @philbates35.

Do you think it would be sensible to check the size of the post data just before sending the curl request.

Definitely. There are two fixes which would significantly improve usage here, the first is to add the actual payload size limit to the documentation (which I'm fixing now) and the second is to truncate the payloads to that size.

This behavior was recently implemented for other notifier libraries, notably Ruby (bugsnag/bugsnag-ruby#288, bugsnag/bugsnag-ruby#290) and Java (bugsnag/bugsnag-java#35). The general strategy is to check the payload size, trim long strings, and then if needed, truncate long arrays (which tend to be stacktraces).

The PHP implementation should do something similar to the other notifiers, as well as exposing the maximum payload size, if you or other users want to implement payload truncation in the before notify callback in a way which makes more sense for your reports.

I'll work on this after some documentation updates, unless someone beats me to it. In the meantime, a payload under 1Mb should be accepted.

from bugsnag-php.

GrahamCampbell avatar GrahamCampbell commented on May 11, 2024

The limit currently stands at 512k. I have now fixed this. What we do is break up batch requests if they're too large, and as a last resort, strip out the meta data too.

from bugsnag-php.

GrahamCampbell avatar GrahamCampbell commented on May 11, 2024

This fix will ship with v2.9.0.

from bugsnag-php.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.