metrics 0.10.2 → 0.12.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: 789f4af41ff1413b67cd7bafd6d3fe5ef5b2c08fd5ec0e778be332dcb0f30b53
4
- data.tar.gz: 390b431a3f1997006a90f5c01b7a76a2f0851c436adb05d88b3d401371f45ddd
3
+ metadata.gz: 68f3f47929348e39fb0b1989c529211aeca2e77a11d89cc74eb5156517413920
4
+ data.tar.gz: 23d3a1efe32f6de6a69f63401ad777e5ccd42d9386bb02dfa8039c0bfa84e7b0
5
5
  SHA512:
6
- metadata.gz: 82da041f5c3acf5b70fb8f935ffd0ed4d18bb7a9021be6f2f93db2b669e0871caa69799445bba1fd0b2b81e8e8f09df3e05c9e5700bf11177c3304d328c43695
7
- data.tar.gz: 0cf2805050e106201b8e8e2f97e6f7fc90ed7fe4c7868928941b91d1a25175db9c5c5b35e1b5be84c209e7bde8c5c8817992dd32f83a33bf6d54dfa743a38530
6
+ metadata.gz: 266cbaef3d8f81ba42de551bf2119ec6f93004a68cc373046726aec26129a949e01b3548362d6f155bd9fbc48144d06483fcc83db62c9eab34bfe340c4681df7
7
+ data.tar.gz: 50fe49335a1fadc4362d1dac69c084867eb47b358de9197d7f77276033a9c55176db64464bf422ef55da3e52ffef2263bd0baae741a0f0027e98182e8aa4d588
checksums.yaml.gz.sig CHANGED
Binary file
@@ -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
@@ -21,9 +21,11 @@ module Metrics
21
21
  tags&.each do |tag|
22
22
  raise ArgumentError, "Invalid tag (must be String): #{tag.inspect}!" unless tag.is_a?(String)
23
23
 
24
- unless tag =~ VALID_TAG
25
- raise ArgumentError, "Invalid tag (must match #{VALID_TAG}): #{tag.inspect}!"
26
- end
24
+ # We should let the underlying backend handle any tag limitations, e.g. converting invalid characters to underscores, etc.
25
+ #
26
+ # unless tag =~ VALID_TAG
27
+ # raise ArgumentError, "Invalid tag (must match #{VALID_TAG}): #{tag.inspect}!"
28
+ # end
27
29
  end
28
30
  end
29
31
  end
@@ -1,15 +1,15 @@
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
@@ -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.2"
7
+ VERSION = "0.12.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.2
4
+ version: 0.12.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