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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b477758de3efc0c6e9f8413e7ae7f518387bbc9bb55164f4cceaf1d049e0274
4
- data.tar.gz: c326efa64964828683525a305ae5cd8dabe87b471315cf1ff090a4d77f3ac540
3
+ metadata.gz: 535d6a7c84abd727e6f268a515e53344e6a873ef81ae6cca485ef92717b3aa6e
4
+ data.tar.gz: 9c9c2431e5f442c8c3e7a4a6f8132902d9e10c70c2fac7839a9bc639747af6f9
5
5
  SHA512:
6
- metadata.gz: edbc02219eb5edfb389e5cbc7124d3a7f6bd0654d7af82d7ab17d0eb52f3b1b4085bb41bffcca536ecd53e32c683a67fa19d2dd957076785b54595a5aad4b401
7
- data.tar.gz: 864f4b88279171df6fc0e5e34ceda481cd6da3385aa486cfaf19685c65b3a787a737718772b4bd6d32a93cd2a99894601d698920dcc3e72b11498bb57c43568c
6
+ metadata.gz: ce481ed1c6d28c8737d8adf5d5313afb6d169c83ba93cff84a58871b72b79dcc2b16986ae02e1177111588ceaad2f7b8161e27eb48f68498d05c2d7ad2c5fc7d
7
+ data.tar.gz: a3c796187d38557b4b2da5ef595223fe31226a759fd5694198592bb37ed9c9614a049be889fc7d45018e3df84edd8c1babe552adb55f5705f8d6361ec96e6af0
checksums.yaml.gz.sig CHANGED
Binary file
@@ -6,18 +6,20 @@
6
6
  require 'console/event/failure'
7
7
 
8
8
  module Metrics
9
- # Require a specific trace backend.
10
- def self.require_backend(env = ENV)
11
- if backend = env['METRICS_BACKEND']
12
- begin
13
- require(backend)
14
- rescue LoadError => error
15
- ::Console::Event::Failure.for(error).emit(self, "Unable to load metrics backend!", backend: backend, severity: :warn)
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
@@ -8,7 +8,7 @@ require_relative 'backend'
8
8
  module Metrics
9
9
  # @returns [Boolean] Whether there is an active backend.
10
10
  def self.enabled?
11
- self.const_defined?(:Backend)
11
+ Backend.const_defined?(:Interface)
12
12
  end
13
13
 
14
14
  module Provider
data/lib/metrics/tags.rb CHANGED
@@ -3,8 +3,6 @@
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2021-2022, by Samuel Williams.
5
5
 
6
- require_relative 'backend'
7
-
8
6
  module Metrics
9
7
  module Tags
10
8
  def self.normalize(tags)
@@ -4,5 +4,5 @@
4
4
  # Copyright, 2021-2023, by Samuel Williams.
5
5
 
6
6
  module Metrics
7
- VERSION = "0.9.0"
7
+ VERSION = "0.10.1"
8
8
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metrics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file