title: using Pushgateway to report a Summary metric to Prometheus
body: <p>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.</p>
  
  <p>I'm using the followings to <code>observe()</code> the time and to <code>push</code> my metrics to Pushgateway</p>
  
  <pre><code>Summary.labels(myLable).observe(Date.now() - startedAt)
  
  gateway.pushAdd { jobName: 'test' }, (err, resp, body) -&gt;
    console.log "Error!!" if err
  </code></pre>
  
  <p>and here is a screenshot which shows that I'm getting the final time for all quantiles!</p>
  
  <p><a href="https://i.stack.imgur.com/Yi7ZW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Yi7ZW.png" alt="enter image description here"></a></p>
  
  <p>I'd appreciate any comments on this!</p>