From 4aa9948e8082d9a5bfcd3debb4a4d3974b712b2f Mon Sep 17 00:00:00 2001 From: Yinghai Zhao Date: Tue, 20 Feb 2018 17:13:17 -0500 Subject: [PATCH] Fix time unit bug in request duration. --- lib/prome/rails.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/prome/rails.rb b/lib/prome/rails.rb index fec72b1..778acce 100644 --- a/lib/prome/rails.rb +++ b/lib/prome/rails.rb @@ -16,10 +16,10 @@ def self.install! duration = ending - start Prome.get(:rails_requests_total).increment(labels) - Prome.get(:rails_request_duration_seconds).observe(labels, ms2s(duration)) + Prome.get(:rails_request_duration_seconds).observe(labels, duration) Prome.get(:rails_view_runtime_seconds).observe(labels, ms2s(payload[:view_runtime])) Prome.get(:rails_db_runtime_seconds).observe(labels, ms2s(payload[:db_runtime])) end end end -end \ No newline at end of file +end