puma-plugin-telemetry 1.1.1 → 1.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +4 -4
- data/lib/puma/plugin/telemetry/version.rb +1 -1
- data/lib/puma/plugin/telemetry.rb +16 -5
- data/puma-plugin-telemetry.gemspec +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: b3992737163fb68bb64e961ac4012e8d00b43e4464cd37b945a62495d8acdef8
|
4
|
+
data.tar.gz: bc723cd155b0104b563c9795e3598a14ba4c24c53990b87050ba5aacce7fb831
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 111bbc32976f4fbb619b2240a1229ae376e56a5c9269f138507528b851e2824048730660719da512b85069a93c05fe24d9419a4a70ac0c3c95ba64752f69725a
|
7
|
+
data.tar.gz: 7c57a55fd2701507f9eeb23d4231041ab41321b3a365f11af42ca70cdb768abc6c5421ace812c868277fdd3234c1997b453b3aca62f6bd82380b03679a82100f
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
puma-plugin-telemetry (1.1.
|
5
|
-
puma (
|
4
|
+
puma-plugin-telemetry (1.1.2)
|
5
|
+
puma (< 7)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
@@ -14,7 +14,7 @@ GEM
|
|
14
14
|
parallel (1.22.1)
|
15
15
|
parser (3.1.2.0)
|
16
16
|
ast (~> 2.4.1)
|
17
|
-
puma (
|
17
|
+
puma (6.0.1)
|
18
18
|
nio4r (~> 2.0)
|
19
19
|
rack (2.2.3.1)
|
20
20
|
rainbow (3.1.1)
|
@@ -64,4 +64,4 @@ DEPENDENCIES
|
|
64
64
|
rubocop-performance (~> 1.9)
|
65
65
|
|
66
66
|
BUNDLED WITH
|
67
|
-
2.
|
67
|
+
2.3.12
|
@@ -63,13 +63,14 @@ module Puma
|
|
63
63
|
#
|
64
64
|
module PluginInstanceMethods
|
65
65
|
def start(launcher)
|
66
|
+
@launcher = launcher
|
67
|
+
|
66
68
|
unless Puma::Plugin::Telemetry.config.enabled?
|
67
|
-
|
69
|
+
log_writer.log 'plugin=telemetry msg="disabled, exiting..."'
|
68
70
|
return
|
69
71
|
end
|
70
72
|
|
71
|
-
|
72
|
-
@launcher.events.log 'plugin=telemetry msg="enabled, setting up runner..."'
|
73
|
+
log_writer.log 'plugin=telemetry msg="enabled, setting up runner..."'
|
73
74
|
|
74
75
|
in_background do
|
75
76
|
sleep Puma::Plugin::Telemetry.config.initial_delay
|
@@ -79,13 +80,13 @@ module Puma
|
|
79
80
|
|
80
81
|
def run!
|
81
82
|
loop do
|
82
|
-
|
83
|
+
log_writer.debug 'plugin=telemetry msg="publish"'
|
83
84
|
|
84
85
|
call(Puma::Plugin::Telemetry.build(@launcher))
|
85
86
|
rescue Errno::EPIPE
|
86
87
|
# Occurs when trying to output to STDOUT while puma is shutting down
|
87
88
|
rescue StandardError => e
|
88
|
-
|
89
|
+
log_writer.error "plugin=telemetry err=#{e.class} msg=#{e.message.inspect}"
|
89
90
|
ensure
|
90
91
|
sleep Puma::Plugin::Telemetry.config.frequency
|
91
92
|
end
|
@@ -96,6 +97,16 @@ module Puma
|
|
96
97
|
target.call(telemetry)
|
97
98
|
end
|
98
99
|
end
|
100
|
+
|
101
|
+
private
|
102
|
+
|
103
|
+
def log_writer
|
104
|
+
if Puma::Const::PUMA_VERSION.to_i < 6
|
105
|
+
@launcher.events
|
106
|
+
else
|
107
|
+
@launcher.log_writer
|
108
|
+
end
|
109
|
+
end
|
99
110
|
end
|
100
111
|
end
|
101
112
|
end
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puma-plugin-telemetry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leszek Zalewski
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: puma
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "<"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '7'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "<"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '7'
|
27
27
|
description: |
|
28
28
|
Puma plugin which should be able to handle all your metric needs regarding your webserver:
|
29
29
|
|