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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/deimos/endpoints/metrics.rb +9 -2
- data/lib/deimos/endpoints/status.rb +1 -1
- data/lib/deimos/version.rb +1 -1
- data/lib/deimos.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dcd0b5c1cf36836ba7ccad57b092245d29a25868f6f4e5c53c237bb83a3c8103
|
4
|
+
data.tar.gz: 41a9cb97f3c1d8f5ff599dfe3951e6ee1530e5f8c574198fc4a9ce1d8b774f59
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34a9e4e8333c4bb2c581255134aef1fd681a1a7dbd3fce270d232c160e8e6372479118d3db724abd37be1ba0861161c8eef12932ee87e1524e8c55a091cd12e4
|
7
|
+
data.tar.gz: 11161b36fdd9e8872d56ba3119a8c1462e929451c0ab6b5bdba15a7e5ba828a16b7f041a0a201d65dc1962ae98c79144f0e035268db658ecc9f669f030943d84
|
data/Gemfile.lock
CHANGED
@@ -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
|
-
|
11
|
+
|
12
|
+
get "/*" do
|
13
|
+
Prometheus::Client::Formats::Text.marshal(@metrics.registry)
|
14
|
+
end
|
8
15
|
|
9
16
|
end
|
10
17
|
end
|
data/lib/deimos/version.rb
CHANGED
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
|
|