circleci / rollcage

A Clojure client for Rollbar
Eclipse Public License 1.0
50 stars 28 forks source link

Feature request: limit items per minute #42

Open firthh opened 5 years ago

firthh commented 5 years ago

The official NodeJS Rollbar client supports itemsPerMinute as configuration (https://docs.rollbar.com/docs/rollbarjs-configuration-reference#section-global). It would be nice if this supported something similar.

I realise this might make the library a bit more stateful but it could be beneficial for when things go catastrophically wrong like infinite loops.

marcomorain commented 5 years ago

Hi Hugo,

Thanks for logging the issue.

We usually do this at CircleCI by putting a rate limit on the token itself in the Rollbar UI. This allows us to set a max number of items that can be reported at a time, but it’s handled server side.

Would that solve your use-case?

Another neat way to do this simply would be to wrap the reporting function with a throttled version of the function. Do you know any neat libraries that add throttling to a var? I’ve done this with underscore.js I’m the past I’m JavaScript. I don’t know of any Clojure libraries that do the same.