• Sean McGivern's avatar
    Initialise sidekiq_jobs_completion_seconds before running jobs · d84fe983
    Sean McGivern authored
    When a worker runs for the first time, it will have
    sidekiq_jobs_completion_seconds_count set to 1 (because it was just
    completed). But this is wrong in Prometheus terms, because there was no
    previous value of 0, and so the rate of change will also be 0.
    
    To work around this, we initialise this bucket for all workers that can
    be run by the current Sidekiq process before processing the first job.
    This way we can calculate rates correctly for infrequent workers.
    d84fe983
sidekiq_config.rb 4.46 KB