metrics 0.9.0 → 0.10.0
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/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: 3f7c56a260417ead9df57c9c0a9a8df189c0c9c08979146a93d2b38507030caf
|
4
|
+
data.tar.gz: '069dfa17fb3966439fff730ea1579bf9a182294993a0ad8321451259ee5dfc7d'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59e4da736136537d4fbea77dcd80d357a3314dc0356ccda4651fc717bdd1fbb9c9af2ea7a20dcc3eaa7bd24f30040f54a3d301312f03152367b868e3b27208a9
|
7
|
+
data.tar.gz: 11ae1f1e129a2863fb9d1ee79517d37d4cf0e3fe1cc529e8b0a712b39f5fab56f00fbd8b292b198b8f8a6d962ceca8fd1994d6819ac9facb369e96673c74e192
|
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/version.rb
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|