aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/longboat/collector.rb2
-rw-r--r--lib/longboat/jobs.rb4
2 files changed, 2 insertions, 4 deletions
diff --git a/lib/longboat/collector.rb b/lib/longboat/collector.rb
index adb20c3..c812b05 100644
--- a/lib/longboat/collector.rb
+++ b/lib/longboat/collector.rb
@@ -9,7 +9,7 @@ module Longboat
@metrics[name][labels] = {value: value, timestamp: timestamp}
end
- def metrics
+ def prometheus_metrics
res = ""
@metrics.each do |name, metric|
res << "#HELP #{name} #{metric[:help]}\n" unless metric[:help].nil?
diff --git a/lib/longboat/jobs.rb b/lib/longboat/jobs.rb
index 155b305..c6bbb17 100644
--- a/lib/longboat/jobs.rb
+++ b/lib/longboat/jobs.rb
@@ -17,9 +17,7 @@ module Longboat
end
def collect!
- @jobs.each do |job|
- job.run
- end
+ @jobs.each(&:run)
end
def collect_every(time = 60, async = true)