metrics 0.10.1 → 0.11.0

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: 535d6a7c84abd727e6f268a515e53344e6a873ef81ae6cca485ef92717b3aa6e
4
- data.tar.gz: 9c9c2431e5f442c8c3e7a4a6f8132902d9e10c70c2fac7839a9bc639747af6f9
3
+ metadata.gz: 37b89bbbe05396589b6625a7f6d71a9c0c7c5460369f6716650c8c2b00fc1bbb
4
+ data.tar.gz: 1845f2da366bb04f415c6ff5c788f68d432f7ef1beea69c30dc285d42ea6616b
5
5
  SHA512:
6
- metadata.gz: ce481ed1c6d28c8737d8adf5d5313afb6d169c83ba93cff84a58871b72b79dcc2b16986ae02e1177111588ceaad2f7b8161e27eb48f68498d05c2d7ad2c5fc7d
7
- data.tar.gz: a3c796187d38557b4b2da5ef595223fe31226a759fd5694198592bb37ed9c9614a049be889fc7d45018e3df84edd8c1babe552adb55f5705f8d6361ec96e6af0
6
+ metadata.gz: 307a4929b1ebb27c14d6cc46dffc039b1e1a359616759a310050124f1597a5beadeae019eea8998b6bd49bceaef9834be99aff98388b8b657e59e09bf7779af0
7
+ data.tar.gz: efc7b8b89e08a018455c4cdc244af4a86bc1895a0eaa679e4a233f3d7633efc1ae75ef7f679ad5e1fb2c0045b4025e3209e1be2b9fc376c8ac80d20dd8b49af6
checksums.yaml.gz.sig CHANGED
@@ -1,2 +1 @@
1
- ��ӓ'�@�c=rA*;�S@ ��Ag��3 W�v�� ׳�)̙ ���n|�,W� ��TR.R9�&�-���w[��݌��]Iۼ _����~1ߝQ��)C�ͽ6�'oP>f�
2
- �|J�]�kr ���U�<��������i��K(j�~�df��i���.ވm� dUcą�e�|�R�kt2b�<���# ߃���v,]��Zف�2@7:!�lؖ�#�0���*`��ۤ(��՘��A4�_�w%<:��y�_*� Z�CCd��"ܠ�Y����1^�{̌�^��,��{�L`����g4�R�c"0���T������-m�CiA�Z�՞.��0�sL��11��4��nT���x�2� ��8�-50���{�
1
+ zx5����d��W�am�O��܈)�
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2023, by Samuel Williams.
4
+ # Copyright, 2023-2024, by Samuel Williams.
5
5
 
6
6
  # Enable capturing metrics.
7
7
  def capture
8
- ENV['METRICS_BACKEND'] = 'metrics/backend/capture'
9
- require 'metrics'
8
+ ENV["METRICS_BACKEND"] = "metrics/backend/capture"
9
+ require "metrics"
10
10
  end
11
11
 
12
12
  # Generate a list of metrics that have been captured.
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2023, by Samuel Williams.
4
+ # Copyright, 2023-2024, by Samuel Williams.
5
5
 
6
- require 'console'
7
- require_relative '../metric'
6
+ require "console"
7
+ require_relative "../metric"
8
8
 
9
9
  module Metrics
10
10
  module Backend
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2023, by Samuel Williams.
4
+ # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
- require 'console'
7
- require_relative '../metric'
6
+ require "console"
7
+ require_relative "../metric"
8
8
 
9
9
  module Metrics
10
10
  module Backend
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2022, by Samuel Williams.
4
+ # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
- require 'console'
7
- require_relative '../metric'
6
+ require "console"
7
+ require_relative "../metric"
8
8
 
9
9
  module Metrics
10
10
  module Backend
@@ -1,22 +1,26 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2023, by Samuel Williams.
4
+ # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
- require 'console/event/failure'
6
+ require "console/event/failure"
7
7
 
8
8
  module Metrics
9
9
  module Backend
10
10
  # Require a specific trace backend.
11
11
  def self.require_backend(env = ENV)
12
- if backend = env['METRICS_BACKEND']
12
+ if backend = env["METRICS_BACKEND"]
13
13
  begin
14
14
  require(backend)
15
15
  rescue LoadError => error
16
16
  ::Console::Event::Failure.for(error).emit(self, "Unable to load metrics backend!", backend: backend, severity: :warn)
17
+
18
+ return false
17
19
  end
18
20
 
19
21
  Metrics.extend(Backend::Interface)
22
+
23
+ return true
20
24
  end
21
25
  end
22
26
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2023, by Samuel Williams.
4
+ # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
- require_relative 'backend'
6
+ require_relative "backend"
7
7
 
8
8
  module Metrics
9
9
  # @returns [Boolean] Whether there is an active backend.
data/lib/metrics/tags.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2022, by Samuel Williams.
4
+ # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
6
  module Metrics
7
7
  module Tags
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2023, by Samuel Williams.
4
+ # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
6
  module Metrics
7
- VERSION = "0.10.1"
7
+ VERSION = "0.11.0"
8
8
  end
data/lib/metrics.rb CHANGED
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2022, by Samuel Williams.
4
+ # Copyright, 2021-2024, by Samuel Williams.
5
5
 
6
- require_relative 'metrics/version'
7
- require_relative 'metrics/provider'
6
+ require_relative "metrics/version"
7
+ require_relative "metrics/provider"
8
+ require_relative "metrics/tags"
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.10.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -37,7 +37,7 @@ cert_chain:
37
37
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
38
38
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
39
39
  -----END CERTIFICATE-----
40
- date: 2024-08-25 00:00:00.000000000 Z
40
+ date: 2024-10-12 00:00:00.000000000 Z
41
41
  dependencies: []
42
42
  description:
43
43
  email:
metadata.gz.sig CHANGED
Binary file