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 +4 -4
- data/lib/puma/new_relic/sampler.rb +2 -2
- data/lib/puma/new_relic/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 912025b2b896f3f114ce304d95c3489a8bcd7dc00f22d92144e91fdf579f571f
|
4
|
+
data.tar.gz: d5140ffef3a7b698bc8f7002e983c832547b8453f4ecfd06e6846d56b82e3224
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(&:
|
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]
|
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
|
+
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:
|
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.
|
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: []
|