bc-prometheus-ruby 0.5.1 → 0.5.2

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: 4a5bc3a1ae57f782c0f94d6cf490830fce96e78ab0f782a4761cad8dcc5850ae
4
- data.tar.gz: 694ede704dc83a7c9fd0f1abfd4300bd7e464b464b305833be44c7b06bf62bd5
3
+ metadata.gz: f64feca1c573ea1651030c807d187ae729e4fc744c2d6ac5f31813694ae9102c
4
+ data.tar.gz: 6bdf42e5208734507d42741df44677d07ded19db3e1a4f55fe204b2b763bbc11
5
5
  SHA512:
6
- metadata.gz: 20a0ccb53fc272f5f80425503fe492908c6cca2a01186b0489141091239671e848d4930ba29c54ada04c78149ebbda6f2f240880e0da24d2bc7a5b7b98c2b8bc
7
- data.tar.gz: ebe5d43de15abe3d933050add69fb785280506bbe6f6acab6065eee215534aeb61bd025eaec545ca9bd682083b7751e01a1569c80daa43313dfaeac72b7d5163
6
+ metadata.gz: f3712517b2e2b841b8dbeedabb9f822b7352af1b30f08d1f38fe4d65ad6722df69388222e088b923f6187bc8315896097640cd839a8bf7e4991d29bc11ec6097
7
+ data.tar.gz: 5ef32a6ffba766cb9fb3c7bcbc64ec81e0f718030c612430e4ce3ba8e54e8a72f4dfdc8e0f3ce6916c8e697bdb4c7ddb1c5fa0435088b2800c009473c6ebf932
data/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@ Changelog for the bc-prometheus-ruby gem.
2
2
 
3
3
  ### Pending Release
4
4
 
5
+ ## 0.5.2
6
+
7
+ - Better error handling post-fork for web/resque instrumentors
8
+ - Fix issue with using `Collectors::Base` and keyword arguments in Ruby 2.7
9
+ - Remove null-logger development dependency
10
+
5
11
  ### 0.5.1
6
12
 
7
13
  - Fix keywords argument issue with Collectors::Base and Ruby 3.0+
@@ -34,7 +34,6 @@ Gem::Specification.new do |spec|
34
34
  spec.required_ruby_version = '>= 2.6'
35
35
 
36
36
  spec.add_development_dependency 'bundler-audit', '>= 0.6'
37
- spec.add_development_dependency 'null-logger', '>= 0.1'
38
37
  spec.add_development_dependency 'pry', '>= 0.12'
39
38
  spec.add_development_dependency 'rake', '>= 10.0'
40
39
  spec.add_development_dependency 'rspec', '>= 3.8'
@@ -25,7 +25,10 @@ module Bigcommerce
25
25
  ##
26
26
  # Start the collector
27
27
  #
28
- def self.start(args, &block)
28
+ # @param [Hash] args
29
+ #
30
+ def self.start(args = {}, &block)
31
+ args ||= {}
29
32
  process_collector = new(**args, &block)
30
33
 
31
34
  stop if @thread
@@ -70,6 +70,8 @@ module Bigcommerce
70
70
  ::Resque.before_first_fork do
71
71
  ::Bigcommerce::Prometheus::Integrations::Resque.start(client: Bigcommerce::Prometheus.client)
72
72
  @collectors.each(&:start)
73
+ rescue StandardError => e
74
+ logger.error "[bigcommerce-prometheus][#{@process_name}] Failed to start resque prometheus middleware after fork: #{e.message}"
73
75
  end
74
76
  end
75
77
  end
@@ -79,13 +79,15 @@ module Bigcommerce
79
79
  @app.config.after_fork_callbacks << lambda do
80
80
  ::Bigcommerce::Prometheus::Integrations::Puma.start(client: Bigcommerce::Prometheus.client)
81
81
  @collectors.each(&:start)
82
+ rescue StandardError => e
83
+ logger.error "[bigcommerce-prometheus][#{@process_name}] Failed to start web prometheus middleware after fork: #{e.message}"
82
84
  end
83
85
  end
84
86
 
85
87
  def setup_middleware
86
88
  @app.middleware.unshift(PrometheusExporter::Middleware, client: Bigcommerce::Prometheus.client)
87
89
  rescue StandardError => e
88
- logger.warn "[bc-prometheus-ruby] Failed to attach app middleware in web instrumentor: #{e.message}"
90
+ logger.warn "[bigcommerce-prometheus] Failed to attach app middleware in web instrumentor: #{e.message}"
89
91
  end
90
92
  end
91
93
  end
@@ -17,6 +17,6 @@
17
17
  #
18
18
  module Bigcommerce
19
19
  module Prometheus
20
- VERSION = '0.5.1'
20
+ VERSION = '0.5.2'
21
21
  end
22
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bc-prometheus-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shaun McCormick
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-15 00:00:00.000000000 Z
11
+ date: 2021-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler-audit
@@ -24,20 +24,6 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0.6'
27
- - !ruby/object:Gem::Dependency
28
- name: null-logger
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0.1'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0.1'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: pry
43
29
  requirement: !ruby/object:Gem::Requirement
@@ -203,7 +189,7 @@ homepage: https://github.com/bigcommerce/bc-prometheus-ruby
203
189
  licenses:
204
190
  - MIT
205
191
  metadata: {}
206
- post_install_message:
192
+ post_install_message:
207
193
  rdoc_options: []
208
194
  require_paths:
209
195
  - lib
@@ -218,8 +204,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
218
204
  - !ruby/object:Gem::Version
219
205
  version: '0'
220
206
  requirements: []
221
- rubygems_version: 3.2.3
222
- signing_key:
207
+ rubygems_version: 3.2.31
208
+ signing_key:
223
209
  specification_version: 4
224
210
  summary: Simple integration of ruby and puma servers with prometheus
225
211
  test_files: []