aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/longboat/server.rb13
1 files changed, 13 insertions, 0 deletions
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