coffeescriptprometheussummaryprometheus-pushgateway

using Pushgateway to report a Summary metric to Prometheus


I'm using Prometheus to monitor an application which is run on a cronjob basis. So, I'm using Pushgateway to make my desired metrics available for Prometheus. One of the metrics is to report how long does a certain task take to finish. Therefore I'm using a Summary to report that. My issue is that I see the same amount reported for each quantile! My understanding was that the reported time for each quantile should be different.

I'm using the followings to observe() the time and to push my metrics to Pushgateway

Summary.labels(myLable).observe(Date.now() - startedAt)

gateway.pushAdd { jobName: 'test' }, (err, resp, body) ->
  console.log "Error!!" if err

and here is a screenshot which shows that I'm getting the final time for all quantiles!

enter image description here

I'd appreciate any comments on this!


Solution

  • If you only have one observation, then a Summary's quantiles will be the same. I'm not sure what you're expecting here instead, a gauge would be the more usual way to report this.