deimos 0.2.5 → 0.2.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4725b70f9faf75095eaaa3ebbc00cdfe4ef9bf78b36019d0430b93208bf86f5a
4
- data.tar.gz: f93c66da3dd5cac5fff9ccffb23ebbff337731f533e376d2e1cdf5adec581b57
3
+ metadata.gz: dcd0b5c1cf36836ba7ccad57b092245d29a25868f6f4e5c53c237bb83a3c8103
4
+ data.tar.gz: 41a9cb97f3c1d8f5ff599dfe3951e6ee1530e5f8c574198fc4a9ce1d8b774f59
5
5
  SHA512:
6
- metadata.gz: 678ae608f15092f751a0c27c9c83e73237efa82a0e44cd296ad64344285ba2a352b9bb5eb656edcd8d206600194f8514b4548c6c506d5cb46e9268bee0641191
7
- data.tar.gz: 2a5d940d0fbee5b17497d7c062d23ca0eb16ad31c39cd21e1c373f0468f18c3ef762e546aa078522d22a27d0409c795c70191bfb62fabc98e83fb32428786293
6
+ metadata.gz: 34a9e4e8333c4bb2c581255134aef1fd681a1a7dbd3fce270d232c160e8e6372479118d3db724abd37be1ba0861161c8eef12932ee87e1524e8c55a091cd12e4
7
+ data.tar.gz: 11161b36fdd9e8872d56ba3119a8c1462e929451c0ab6b5bdba15a7e5ba828a16b7f041a0a201d65dc1962ae98c79144f0e035268db658ecc9f669f030943d84
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- deimos (0.2.4)
4
+ deimos (0.2.5)
5
5
  activesupport
6
6
  concurrent-ruby (~> 1.1.0)
7
7
  huyegger
@@ -1,10 +1,17 @@
1
1
  module Deimos
2
2
  module Endpoints
3
3
  class Metrics < Sinatra::Application
4
+ def initialize(metrics:)
5
+ @metrics = metrics
6
+ super
7
+ end
8
+
4
9
  disable :logging
5
10
  set :logger, Deimos.logger
6
-
7
- use Prometheus::Middleware::Exporter, registry: Deimos.metrics.registry, path: ''
11
+
12
+ get "/*" do
13
+ Prometheus::Client::Formats::Text.marshal(@metrics.registry)
14
+ end
8
15
 
9
16
  end
10
17
  end
@@ -9,7 +9,7 @@ module Deimos
9
9
  disable :logging
10
10
  set :logger, Deimos.logger
11
11
 
12
- get "/" do
12
+ get "/*" do
13
13
  status_runner = @status.run!
14
14
 
15
15
  content_type :json
@@ -1,3 +1,3 @@
1
1
  module Deimos
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.6"
3
3
  end
data/lib/deimos.rb CHANGED
@@ -61,7 +61,7 @@ module Deimos
61
61
  require 'deimos/endpoints/metrics'
62
62
  @applications ||= {
63
63
  "/status" => Deimos::Endpoints::Status.new(status: status),
64
- "/metrics" => Deimos::Endpoints::Metrics.new
64
+ "/metrics" => Deimos::Endpoints::Metrics.new(metrics: metrics)
65
65
  }.merge(config.applications)
66
66
  end
67
67
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deimos
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Carlile