Skip to content

Sidekiq queue latency not correct (huge negative value) #2610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
geoffharcourt opened this issue Apr 25, 2025 · 3 comments · Fixed by #2570
Closed

Sidekiq queue latency not correct (huge negative value) #2610

geoffharcourt opened this issue Apr 25, 2025 · 3 comments · Fixed by #2570

Comments

@geoffharcourt
Copy link

Issue Description

We just turned on the Queues feature in our Sentry dashboard. Despite our queue latencies being mostly zero and or at most a few seconds, the latencies in the dashboard are showing as values of negative thousands of years.

Reproduction Steps

Compare the values in Sidekiq dashboard to Sentry's Backend -> Queues tab.

Expected Behavior

I'd expect our queue latencies to look like our admin dashboard in Sidekiq.

Actual Behavior

Sentry data:

Image

Sidekiq admin dashboard:
Image

Ruby Version

3.4.3

SDK Version

sentry-ruby 5.23.0 and sentry-sidekiq 5.23.0

Integration and Its Version

Sidekiq

Sentry Config

Sentry.init do |config|
  config.release = ENV.fetch("IMAGE_TAG", "development")

  config.propagate_traces = false

  if ENV["SENTRY_TRACE_RATE"].present?
    config.traces_sample_rate = ENV["SENTRY_TRACE_RATE"].to_f
  end

  # get query params
  config.send_default_pii = true

  if ENV["SENTRY_INCLUDE_ALL_EXCEPTIONS"]
    config.excluded_exceptions = []
  end

  config.environment = ENV["SENTRY_ENVIRONMENT"] ||
    ENV["COMMONLIT_NAMESPACE"] ||
    ENV["RAILS_ENV"]

  # NOTE: Only print Sentry logger info if we have a transport issue. This
  # avoids printing (and sending to APM) millions of lines of:
  # I, [2022-10-24T01:26:33.227290 #45]  INFO -- sentry: [Transport] Sending envelope with items [sessions]  to Sentry
  #
  # Note that the logger level has to be set after init, hence the tap
  config.logger = Sentry::Logger.new($stdout).tap do |sentry_logger|
    sentry_logger.level = ::Logger::WARN
  end
end
@solnic
Copy link
Collaborator

solnic commented Apr 25, 2025

Thanks for reporting the issue! Which version of Sidekiq do you use?

@geoffharcourt
Copy link
Author

@solnic 8.0.1. We use Sidekiq Enterprise if that might be relevant

@solnic
Copy link
Collaborator

solnic commented Apr 28, 2025

@geoffharcourt ah thanks, I believe this will address it then #2570

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants