Move sidekiq_job_duration_seconds from Counter to Summary (#129)

Move sidekiq_job_duration_seconds from Counter to Summary (#129)

diff --git a/lib/prometheus_exporter/server/sidekiq_collector.rb b/lib/prometheus_exporter/server/sidekiq_collector.rb
index 93dd713..4d25a45 100644
--- a/lib/prometheus_exporter/server/sidekiq_collector.rb
+++ b/lib/prometheus_exporter/server/sidekiq_collector.rb
@@ -52,7 +52,7 @@ module PrometheusExporter::Server
       if !@sidekiq_jobs_total
 
         @sidekiq_job_duration_seconds =
-        PrometheusExporter::Metric::Counter.new(
+        PrometheusExporter::Metric::Summary.new(
           "sidekiq_job_duration_seconds", "Total time spent in sidekiq jobs.")
 
         @sidekiq_jobs_total =
diff --git a/test/server/collector_test.rb b/test/server/collector_test.rb
index 6b56d48..f1b4e46 100644
--- a/test/server/collector_test.rb
+++ b/test/server/collector_test.rb
@@ -297,7 +297,11 @@ class PrometheusCollectorTest < Minitest::Test
 
     assert(result.include?('sidekiq_failed_jobs_total{job_name="FalseClass",service="service1"} 1'), "has failed job")
     assert(result.include?('sidekiq_jobs_total{job_name="String",service="service1"} 1'), "has working job")
-    assert(result.include?('sidekiq_job_duration_seconds{job_name="FalseClass",service="service1"}'), "has duration")
+    assert(result.include?('sidekiq_job_duration_seconds{job_name="FalseClass",service="service1",quantile="0.99"}'), "has duration quantile 0.99")
+    assert(result.include?('sidekiq_job_duration_seconds{job_name="FalseClass",service="service1",quantile="0.9"}'), "has duration quantile 0.9")
+    assert(result.include?('sidekiq_job_duration_seconds{job_name="FalseClass",service="service1",quantile="0.5"}'), "has duration quantile 0.5")
+    assert(result.include?('sidekiq_job_duration_seconds{job_name="FalseClass",service="service1",quantile="0.1"}'), "has duration quantile 0.1")
+    assert(result.include?('sidekiq_job_duration_seconds{job_name="FalseClass",service="service1",quantile="0.01"}'), "has duration quantile 0.01")
     assert(result.include?('sidekiq_jobs_total{job_name="WrappedClass",service="service1"} 1'), "has sidekiq working job from ActiveJob")
     assert(result.include?('sidekiq_jobs_total{job_name="String#foo",service="service1"} 1'), "has sidekiq delayed class")
   end

GitHub sha: 428ed4d8

This commit appears in #129 which was merged by SamSaffron.