TheSpaghettiDetective / OctoPrint-Obico

GNU Affero General Public License v3.0
138 stars 42 forks source link

Feat: Add rate limit to sentry event #224

Closed saggit closed 9 months ago

saggit commented 10 months ago

This PR covers:

Changes:

  1. Change self.sentry.captureException() to _logger.error(e) since the former does not rely on std logging. so it does not work with rate limit
  2. Set a rate limit for a burst of 10, then 1 per 10 minutes.

New:

  1. Add new dependency: ratelimitingfilter. run pip3 install -e . to install first.