Git Product home page Git Product logo

Comments (4)

hoangviet1993 avatar hoangviet1993 commented on June 19, 2024

@seanlip

I am trying to brainstorm different approaches to this problem of error spamming.
This SO answer raises an interesting solution
https://stackoverflow.com/questions/26271024/what-is-a-good-backoff-algorithm-for-throttling-logging-of-errors

Another way would be to enqueue the log somewhere in memory and de-duplicate on a timer. For example, every ten seconds you could count the number of occurrences of each message and log them all

Instead of putting exceptionHandler on a 5 second cool-down, here is a simplified algorithm

  1. Store these stack-traces on localStorage
  2. Count the number of occurrences and de-duplicate them (this might be complicated?!)
  3. Similar to the changes in your PR, if 10 seconds have occurred since the last exception logged, send the compiled list of different errors and the number of its occurrences.

I know all of these stuff sounds like over-engineering for a simple problem of preventing spam from error logging. I would like to try to be exhaustive in solving this problem so pardon my over-thinking!

from foundation-website.

seanlip avatar seanlip commented on June 19, 2024

No problem! Analysis is good :)

However, I think we don't need a complex solution to this problem, and the existing simple-minded one will do. I would go with whatever has the simplest code for now, unless there's a compelling reason to do otherwise.

from foundation-website.

hoangviet1993 avatar hoangviet1993 commented on June 19, 2024

That is fair! I will be mirroring your changes in my PR then. Thanks!

from foundation-website.

hoangviet1993 avatar hoangviet1993 commented on June 19, 2024

Issue fixed by PR #92. Closing this issue!

from foundation-website.

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.