puma-newrelic 0.1.4 → 0.1.5

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: 14ad01c09bbd2abe464e21548e2efcae8ce8998340a183cb6fd9ec3915e49ea7
4
- data.tar.gz: 42fcff2de98cede21705e95963d8fe5a4f6ec0d0c315023d9ca387df16554e56
3
+ metadata.gz: 912025b2b896f3f114ce304d95c3489a8bcd7dc00f22d92144e91fdf579f571f
4
+ data.tar.gz: d5140ffef3a7b698bc8f7002e983c832547b8453f4ecfd06e6846d56b82e3224
5
5
  SHA512:
6
- metadata.gz: 144647fde9d9efe599f99cd9465d530639a8a24110c892602caf90ac0b697e1a84525cd81fe3d27e16562a584645cef6d5dcbb46dcd5ebab93501d38600b5449
7
- data.tar.gz: 940a8b8f30de611d8301111853a819db7b980694db4d0d10cfe3b552c2db9c00b943eec6881abebce72157d7c898b0a009ab647cb1af2862395b1fbe2e1d7259
6
+ metadata.gz: 4be95be7f92d9f14859c231b0e4aa4613dd29f1377bafbaa04bc885037c71559fadb56459d546402488d84586854f7e9e52ed0a7fce32552330e7954f2314552
7
+ data.tar.gz: 56cb5e2ec93f7a448ea43a9a57499b3c1d20baa431a6913a62f82174a7f738d264805dd867ed4f6d92e5860b48911155c331c88aab91acac8c36a21cd6a807d2
@@ -5,7 +5,7 @@ module Puma
5
5
  config = ::NewRelic::Agent.config[:puma] || {}
6
6
  @launcher = launcher
7
7
  @sample_rate = config.fetch("sample_rate", 15)
8
- @keys = config.fetch("keys", %w(backlog running pool_capacity max_threads)).map(&:to_sym)
8
+ @keys = config.fetch("keys", %w(backlog running pool_capacity max_threads)).map(&:to_s)
9
9
  @last_sample_at = Time.now
10
10
  end
11
11
 
@@ -39,7 +39,7 @@ module Puma
39
39
 
40
40
  def parse(stats)
41
41
  metrics = Hash.new { |h, k| h[k] = 0 }
42
- sum = ->(key, value) { metrics[key] += value if @keys.include?(key) }
42
+ sum = ->(key, value) { metrics[key.to_s.gsub("puma_", "")] += value if @keys.include?(key.to_s.gsub("puma_", "")) }
43
43
 
44
44
  if stats[:workers]
45
45
  metrics[:workers] = stats[:workers]
@@ -1,5 +1,5 @@
1
1
  module Puma
2
2
  module NewRelic
3
- VERSION = "0.1.4"
3
+ VERSION = "0.1.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puma-newrelic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Benoist Claassen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-03-30 00:00:00.000000000 Z
11
+ date: 2022-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: puma
@@ -49,7 +49,7 @@ files:
49
49
  homepage: https://github.com/benoist/puma-newrelic
50
50
  licenses: []
51
51
  metadata: {}
52
- post_install_message:
52
+ post_install_message:
53
53
  rdoc_options: []
54
54
  require_paths:
55
55
  - lib
@@ -64,8 +64,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  - !ruby/object:Gem::Version
65
65
  version: '0'
66
66
  requirements: []
67
- rubygems_version: 3.0.3
68
- signing_key:
67
+ rubygems_version: 3.1.6
68
+ signing_key:
69
69
  specification_version: 4
70
70
  summary: New Relic Puma Stats sampler
71
71
  test_files: []