Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-63760

QueueItemMetricsListener.onQueued is never called


    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • metrics-plugin
    • None

      I was working on a plugin that was using the metrics plugin to receive queue-related events, and I noticed that QueueItemMetricsListener.onQueued is never called in my plugin.

      QueueItemMetricsListener.notifyQueued does call onQueued, but as far as I can tell, notifyQueued itself is not called anywhere in the plugin (see this GitHub search).

      From a quick look, maybe JenkinsMetricProviderImpl.ScheduledRate.checkEnterQueue just has a typo and should be calling notifyQueued instead of notifyStarted? notifyStarted is already called here, which looks like it would be called when the task actually starts. I'm not sure what the consequences of changing checkEnterQueue might be, perhaps it could break existing plugins relying on notifyStarted being called more often than might be expected?

            jtaboada Jose Blas Camacho Taboada
            dnusbaum Devin Nusbaum
            0 Vote for this issue
            2 Start watching this issue