Sidekiq: Change in instrumentation behavior after 5.2.6 upgrade

Created on 16 Apr 2019  路  2Comments  路  Source: mperham/sidekiq

Ruby version: 2.5.5
Sidekiq / Pro / Enterprise version(s): Sidekiq Enterprise 5.2.6

After upgrading to 5.2.6 we noticed an unexpected behaviour in our metrics for one of queues. Right after the upgrade, queue delays went up to hours, which didn't reflect the reality on the enqueued items.

To calculate the delay, we use this formula:

queueing_delay_ms = (Time.current.to_f * 1000).to_i - (msg["enqueued_at"].to_f * 1000).to_i

The peculiarity on this queue is that we schedule jobs for many days in the future under it. It also has a higher chance of jobs failing and being retried.

We believe the changes introduced in https://github.com/mperham/sidekiq/commit/cfe53e5fadfe88c53b62608d1dfc75ecf2ac18a0 to be culprit. Before these changes, we would get a new enqueued_at value when it was re-enqueued. Now, the original value is kept.

Is this side-effect intended? If so, then we may look to alternatives. Any hint on how to handle it now, would be greatly appreciated!

Most helpful comment

Not intended. I wanted to test an aspect of the Web UI and didn't realize this would break other cases. Thank you for reporting!

All 2 comments

Not intended. I wanted to test an aspect of the Web UI and didn't realize this would break other cases. Thank you for reporting!

Thanks for the quick response and looking into it!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rajcybage picture rajcybage  路  3Comments

bartimaeus picture bartimaeus  路  3Comments

mperham picture mperham  路  3Comments

davidcelis picture davidcelis  路  3Comments

michaeldiscala picture michaeldiscala  路  4Comments