From 220ebc31c057bbf47eec1cccbbae8b3cf2190d24 Mon Sep 17 00:00:00 2001 From: Nat Lasseter Date: Mon, 2 Mar 2020 15:35:37 +0000 Subject: Sinatra might have been overkill for one endpoint, but http serving of prometheus metrics is started. --- lib/longboat/server.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 lib/longboat/server.rb (limited to 'lib/longboat') diff --git a/lib/longboat/server.rb b/lib/longboat/server.rb new file mode 100644 index 0000000..474a7ed --- /dev/null +++ b/lib/longboat/server.rb @@ -0,0 +1,13 @@ +require 'sinatra/base' + +module Longboat + module Server + def self.serve!(collector) + Sinatra.new { + get '/metrics' do + collector.prometheus_metrics + end + }.run! + end + end +end -- cgit v1.2.1