metrics 0.9.0 → 0.10.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/metrics/backend.rb +12 -10
- data/lib/metrics/provider.rb +1 -1
- data/lib/metrics/tags.rb +0 -2
- data/lib/metrics/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 535d6a7c84abd727e6f268a515e53344e6a873ef81ae6cca485ef92717b3aa6e
|
4
|
+
data.tar.gz: 9c9c2431e5f442c8c3e7a4a6f8132902d9e10c70c2fac7839a9bc639747af6f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ce481ed1c6d28c8737d8adf5d5313afb6d169c83ba93cff84a58871b72b79dcc2b16986ae02e1177111588ceaad2f7b8161e27eb48f68498d05c2d7ad2c5fc7d
|
7
|
+
data.tar.gz: a3c796187d38557b4b2da5ef595223fe31226a759fd5694198592bb37ed9c9614a049be889fc7d45018e3df84edd8c1babe552adb55f5705f8d6361ec96e6af0
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/metrics/backend.rb
CHANGED
@@ -6,18 +6,20 @@
|
|
6
6
|
require 'console/event/failure'
|
7
7
|
|
8
8
|
module Metrics
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
module Backend
|
10
|
+
# Require a specific trace backend.
|
11
|
+
def self.require_backend(env = ENV)
|
12
|
+
if backend = env['METRICS_BACKEND']
|
13
|
+
begin
|
14
|
+
require(backend)
|
15
|
+
rescue LoadError => error
|
16
|
+
::Console::Event::Failure.for(error).emit(self, "Unable to load metrics backend!", backend: backend, severity: :warn)
|
17
|
+
end
|
18
|
+
|
19
|
+
Metrics.extend(Backend::Interface)
|
16
20
|
end
|
17
|
-
|
18
|
-
Metrics.extend(Backend::Interface)
|
19
21
|
end
|
20
22
|
end
|
21
23
|
end
|
22
24
|
|
23
|
-
Metrics.require_backend
|
25
|
+
Metrics::Backend.require_backend
|
data/lib/metrics/provider.rb
CHANGED
data/lib/metrics/tags.rb
CHANGED
data/lib/metrics/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|