metrics 0.12.2 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: da58c61e306a2816806803db0b41e967f593517c8f825a454d1480dafce50342
4
- data.tar.gz: c535510ec158b5c0181b57a772c0d43c9800356f9180a4ae97c35037732e99af
3
+ metadata.gz: d09fc9e1904cb72737025a01e68a6ad963fb05bfb6dc02dce39987a6b7a4877b
4
+ data.tar.gz: aff1567553de8db5cce01a4c0d51dc2dbf5dadc28fa34c66df7c1d390d539a93
5
5
  SHA512:
6
- metadata.gz: 0ae866b7e9dfce05883974ed8ea2489536838d3a8cc9e5947ee188879e7e72c8793f23e9274b26a20749e114d653b6006ed8a10827f13f3dbb680052e5fd2231
7
- data.tar.gz: cb70aa1a2a2672df5d80a8368265495b2652a612fc0128972a64c1eec917076881ff27daafb9c514b5f86fd46bcf400cb838597971ff00be6fe59b42562d199a
6
+ metadata.gz: b937797ed321ef56736eff66f632a721c29fdceec34c11d863799f24abcf237c2282f49294b3b7bec95a9538350d7ef6f591eb8b87e19bc5eefd10e000a24e10
7
+ data.tar.gz: 94bff04a35790e6e6f077745a47702c80803a6e01bf6e4a8d3d4d284d14b23051ee3836b714e3d8774c94f653dbe4f725b208199c9a8f577d0732c6e6cb527e3
checksums.yaml.gz.sig CHANGED
Binary file
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2025, by Samuel Williams.
5
+
6
+ # List available providers for metrics from all loaded gems.
7
+ def list
8
+ available = {}
9
+
10
+ Gem.loaded_specs.each do |name, spec|
11
+ spec.require_paths.each do |require_path|
12
+ root = File.expand_path(require_path, spec.full_gem_path)
13
+ Dir.glob("metrics/provider/**/*.rb", base: root).each do |path|
14
+ (available[name] ||= []) << path
15
+ end
16
+ end
17
+ end
18
+
19
+ return available
20
+ end
@@ -35,8 +35,6 @@ module Metrics
35
35
 
36
36
  return provider
37
37
  end
38
-
39
- Config::DEFAULT.prepare
40
38
  else
41
39
  def self.Provider(klass, &block)
42
40
  # Metrics disabled.
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2021-2024, by Samuel Williams.
4
+ # Copyright, 2021-2025, by Samuel Williams.
5
5
 
6
6
  module Metrics
7
- VERSION = "0.12.2"
7
+ VERSION = "0.14.0"
8
8
  end
data/lib/metrics.rb CHANGED
@@ -9,4 +9,7 @@ require_relative "metrics/tags"
9
9
 
10
10
  # @namespace
11
11
  module Metrics
12
+ if self.enabled?
13
+ Config::DEFAULT.prepare
14
+ end
12
15
  end
data/readme.md CHANGED
@@ -23,6 +23,14 @@ Please see the [project documentation](https://socketry.github.io/metrics/) for
23
23
 
24
24
  Please see the [project releases](https://socketry.github.io/metrics/releases/index) for all releases.
25
25
 
26
+ ### v0.14.0
27
+
28
+ - Don't call `prepare` in `metrics/provider.rb`. It can cause circular loading warnings.
29
+
30
+ ### v0.13.0
31
+
32
+ - Introduce `metrics:provider:list` command to list all available metrics providers.
33
+
26
34
  ### v0.12.1
27
35
 
28
36
  - [Introduce `Metrics::Config` to Expose `prepare` Hook](https://socketry.github.io/metrics/releases/index#introduce-metrics::config-to-expose-prepare-hook)
data/releases.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Releases
2
2
 
3
+ ## v0.14.0
4
+
5
+ - Don't call `prepare` in `metrics/provider.rb`. It can cause circular loading warnings.
6
+
7
+ ## v0.13.0
8
+
9
+ - Introduce `metrics:provider:list` command to list all available metrics providers.
10
+
3
11
  ## v0.12.1
4
12
 
5
13
  ### Introduce `Metrics::Config` to Expose `prepare` Hook
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.12.2
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -36,13 +36,14 @@ cert_chain:
36
36
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
37
37
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
38
38
  -----END CERTIFICATE-----
39
- date: 2025-03-07 00:00:00.000000000 Z
39
+ date: 1980-01-02 00:00:00.000000000 Z
40
40
  dependencies: []
41
41
  executables: []
42
42
  extensions: []
43
43
  extra_rdoc_files: []
44
44
  files:
45
45
  - bake/metrics/capture.rb
46
+ - bake/metrics/provider.rb
46
47
  - lib/metrics.rb
47
48
  - lib/metrics/backend.rb
48
49
  - lib/metrics/backend/capture.rb
@@ -69,14 +70,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
69
70
  requirements:
70
71
  - - ">="
71
72
  - !ruby/object:Gem::Version
72
- version: '3.1'
73
+ version: '3.2'
73
74
  required_rubygems_version: !ruby/object:Gem::Requirement
74
75
  requirements:
75
76
  - - ">="
76
77
  - !ruby/object:Gem::Version
77
78
  version: '0'
78
79
  requirements: []
79
- rubygems_version: 3.6.2
80
+ rubygems_version: 3.6.9
80
81
  specification_version: 4
81
82
  summary: Application metrics and instrumentation.
82
83
  test_files: []
metadata.gz.sig CHANGED
Binary file