diff options
author | Nat Lasseter <nat.lasseter@york.ac.uk> | 2020-03-02 15:35:37 +0000 |
---|---|---|
committer | Nat Lasseter <nat.lasseter@york.ac.uk> | 2020-03-02 15:35:37 +0000 |
commit | 220ebc31c057bbf47eec1cccbbae8b3cf2190d24 (patch) | |
tree | 0ad6a42e2061a585859c3d39785b9623946553f9 /lib | |
parent | 8d34ddd0a30acf59d423bac773ac2d63aafc7044 (diff) |
Sinatra might have been overkill for one endpoint, but http serving of prometheus metrics is started.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/longboat/server.rb | 13 |
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 |