{"action":"created","issue":{"url":"https://api.github.com/repos/rollbar/rollbar-gem/issues/319","labels_url":"https://api.github.com/repos/rollbar/rollbar-gem/issues/319/labels{/name}","comments_url":"https://api.github.com/repos/rollbar/rollbar-gem/issues/319/comments","events_url":"https://api.github.com/repos/rollbar/rollbar-gem/issues/319/events","html_url":"https://github.com/rollbar/rollbar-gem/pull/319","id":111465060,"number":319,"title":"check threshold before a job is reported to Rollbar","user":{"login":"pacoguzman","id":10926,"avatar_url":"https://avatars.githubusercontent.com/u/10926?v=3","gravatar_id":"","url":"https://api.github.com/users/pacoguzman","html_url":"https://github.com/pacoguzman","followers_url":"https://api.github.com/users/pacoguzman/followers","following_url":"https://api.github.com/users/pacoguzman/following{/other_user}","gists_url":"https://api.github.com/users/pacoguzman/gists{/gist_id}","starred_url":"https://api.github.com/users/pacoguzman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pacoguzman/subscriptions","organizations_url":"https://api.github.com/users/pacoguzman/orgs","repos_url":"https://api.github.com/users/pacoguzman/repos","events_url":"https://api.github.com/users/pacoguzman/events{/privacy}","received_events_url":"https://api.github.com/users/pacoguzman/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-10-14T18:47:06Z","updated_at":"2015-11-02T17:11:37Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rollbar/rollbar-gem/pulls/319","html_url":"https://github.com/rollbar/rollbar-gem/pull/319","diff_url":"https://github.com/rollbar/rollbar-gem/pull/319.diff","patch_url":"https://github.com/rollbar/rollbar-gem/pull/319.patch"},"body":"This PR implements a simple `Sidekiq` threshold similar to the existing for `DelayedJob` (#318).\r\n\r\nIf you want to reduce the noise of your `Rollbar` inbox for `Sidekiq` jobs that fails only on the first attempt but not the next ones you can define in the Rollbar configuration this threshold so only notify from a number of retry of the current failing job.\r\n\r\nBy default is disabled the threshold is 0. And for jobs that are not going to be retried we notify always to Rollbar.\r\n\r\nAny feedback is welcome, thanks in advance"},"comment":{"url":"https://api.github.com/repos/rollbar/rollbar-gem/issues/comments/153087018","html_url":"https://github.com/rollbar/rollbar-gem/pull/319#issuecomment-153087018","issue_url":"https://api.github.com/repos/rollbar/rollbar-gem/issues/319","id":153087018,"user":{"login":"pacoguzman","id":10926,"avatar_url":"https://avatars.githubusercontent.com/u/10926?v=3","gravatar_id":"","url":"https://api.github.com/users/pacoguzman","html_url":"https://github.com/pacoguzman","followers_url":"https://api.github.com/users/pacoguzman/followers","following_url":"https://api.github.com/users/pacoguzman/following{/other_user}","gists_url":"https://api.github.com/users/pacoguzman/gists{/gist_id}","starred_url":"https://api.github.com/users/pacoguzman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pacoguzman/subscriptions","organizations_url":"https://api.github.com/users/pacoguzman/orgs","repos_url":"https://api.github.com/users/pacoguzman/repos","events_url":"https://api.github.com/users/pacoguzman/events{/privacy}","received_events_url":"https://api.github.com/users/pacoguzman/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T17:11:37Z","updated_at":"2015-11-02T17:11:37Z","body":"I think the behaviour you described above is not what is happening. For example\r\n\r\n```ruby\r\nclass RetryableWorker\r\n  include Sidekiq::Worker\r\n\r\n  sidekiq_options retry: true\r\n\r\n  def perform\r\n  end\r\nend\r\n```\r\n\r\n1 fail - skipped (retry true)\r\n2 fail - skipped (retry true retry_count 1)\r\n3 fail - skipped (retry true retry_count 2)\r\n4 fail - reported (retry true retry_count 3)\r\n5 fail - reported (retry true retry_count 4)\r\n\r\n```ruby\r\nclass NoneRetryableWorker\r\n  include Sidekiq::Worker\r\n\r\n  sidekiq_options retry: false\r\n\r\n  def perform\r\n  end\r\nend\r\n```\r\n\r\n1 fail - reported (retry false)\r\n\r\nAnd this is the expected behaviour, what do you think?"}}