appsignal 3.1.4 → 3.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -0
- data/ext/agent.yml +27 -27
- data/gemfiles/padrino.gemfile +2 -1
- data/gemfiles/que.gemfile +1 -1
- data/lib/appsignal/version.rb +1 -1
- data/lib/puma/plugin/appsignal.rb +17 -5
- data/spec/lib/appsignal/transaction_spec.rb +28 -35
- data/spec/lib/appsignal_spec.rb +1 -1
- data/spec/lib/puma/appsignal_spec.rb +45 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b9c72c3c1f23e52406ea915fe3dd35cf45648c7dd712cebc8cdf908e304be60e
|
4
|
+
data.tar.gz: 90ddbe20ee5243338aefdfbefbb1989bbe1df5cc57a56a4f277bcfa789086b41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f7aaf99cae0ca17beab0064e259c8a2cbe1f95b1bcaabc9a074b3033ead5fc847d714d2e84b0140874ef1efc57c098ad3c46596be87f09ead2a5f2d148d77ea
|
7
|
+
data.tar.gz: bfe585b6c6ce5f8cc5e470c9a164e6690fc1834e40bb4bd27491f719cbdaf6ebd4b92d1f1ba2bc3001e157f5c35786f12143b29d9908e9ce73d9ca9712c7c5ef
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# AppSignal for Ruby gem Changelog
|
2
2
|
|
3
|
+
## 3.1.5
|
4
|
+
|
5
|
+
### Changed
|
6
|
+
|
7
|
+
- [4035c3c2](https://github.com/appsignal/appsignal-ruby/commit/4035c3c2d5c0b002119054014daddd193bd820f0) patch - Bump agent to version 813a59b
|
8
|
+
|
9
|
+
- Fix http proxy config option parsing for port 80.
|
10
|
+
- Fix the return value for appsignal_import_opentelemetry_span extension
|
11
|
+
function in `appsignal.h`.
|
12
|
+
|
13
|
+
### Fixed
|
14
|
+
|
15
|
+
- [feb60fb8](https://github.com/appsignal/appsignal-ruby/commit/feb60fb877a2b264e587fe3d5d546e40d86c9c38) patch - Fix NoMethodError for AppSignal Puma plugin for Puma 6. Puma 5 is also still supported.
|
16
|
+
|
3
17
|
## 3.1.4
|
4
18
|
|
5
19
|
### Added
|
data/ext/agent.yml
CHANGED
@@ -3,99 +3,99 @@
|
|
3
3
|
# appsignal-agent repository.
|
4
4
|
# Modifications to this file will be overwritten with the next agent release.
|
5
5
|
---
|
6
|
-
version:
|
6
|
+
version: 813a59b
|
7
7
|
mirrors:
|
8
8
|
- https://appsignal-agent-releases.global.ssl.fastly.net
|
9
9
|
- https://d135dj0rjqvssy.cloudfront.net
|
10
10
|
triples:
|
11
11
|
x86_64-darwin:
|
12
12
|
static:
|
13
|
-
checksum:
|
13
|
+
checksum: c8919a19a28950f726221829ea4d2b3312f1595a5e28ea134f8c41ed0814d7cd
|
14
14
|
filename: appsignal-x86_64-darwin-all-static.tar.gz
|
15
15
|
dynamic:
|
16
|
-
checksum:
|
16
|
+
checksum: 1c10139bc4df56048a71766b64eba76462ee38d3cc814dc230e0fdb3c7e4fba3
|
17
17
|
filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
|
18
18
|
universal-darwin:
|
19
19
|
static:
|
20
|
-
checksum:
|
20
|
+
checksum: c8919a19a28950f726221829ea4d2b3312f1595a5e28ea134f8c41ed0814d7cd
|
21
21
|
filename: appsignal-x86_64-darwin-all-static.tar.gz
|
22
22
|
dynamic:
|
23
|
-
checksum:
|
23
|
+
checksum: 1c10139bc4df56048a71766b64eba76462ee38d3cc814dc230e0fdb3c7e4fba3
|
24
24
|
filename: appsignal-x86_64-darwin-all-dynamic.tar.gz
|
25
25
|
aarch64-darwin:
|
26
26
|
static:
|
27
|
-
checksum:
|
27
|
+
checksum: 40a38896132f418362af9fb2e9796eb4479e13cc0691b61f0f0b81b77e66ded6
|
28
28
|
filename: appsignal-aarch64-darwin-all-static.tar.gz
|
29
29
|
dynamic:
|
30
|
-
checksum:
|
30
|
+
checksum: 40ec0c7db246cfc9b8eeebc882b07ba625948f376a53d8e24add7148d0f8c067
|
31
31
|
filename: appsignal-aarch64-darwin-all-dynamic.tar.gz
|
32
32
|
arm64-darwin:
|
33
33
|
static:
|
34
|
-
checksum:
|
34
|
+
checksum: 40a38896132f418362af9fb2e9796eb4479e13cc0691b61f0f0b81b77e66ded6
|
35
35
|
filename: appsignal-aarch64-darwin-all-static.tar.gz
|
36
36
|
dynamic:
|
37
|
-
checksum:
|
37
|
+
checksum: 40ec0c7db246cfc9b8eeebc882b07ba625948f376a53d8e24add7148d0f8c067
|
38
38
|
filename: appsignal-aarch64-darwin-all-dynamic.tar.gz
|
39
39
|
arm-darwin:
|
40
40
|
static:
|
41
|
-
checksum:
|
41
|
+
checksum: 40a38896132f418362af9fb2e9796eb4479e13cc0691b61f0f0b81b77e66ded6
|
42
42
|
filename: appsignal-aarch64-darwin-all-static.tar.gz
|
43
43
|
dynamic:
|
44
|
-
checksum:
|
44
|
+
checksum: 40ec0c7db246cfc9b8eeebc882b07ba625948f376a53d8e24add7148d0f8c067
|
45
45
|
filename: appsignal-aarch64-darwin-all-dynamic.tar.gz
|
46
46
|
aarch64-linux:
|
47
47
|
static:
|
48
|
-
checksum:
|
48
|
+
checksum: c73b6e9de849a40290a0d90eaad43ea41a9a0293ba4b8bf99f69965c45c85514
|
49
49
|
filename: appsignal-aarch64-linux-all-static.tar.gz
|
50
50
|
dynamic:
|
51
|
-
checksum:
|
51
|
+
checksum: 90226eefe2e2f66833ca3e31c69ce70763ed57916bd0b5c1809bd99d61ff3429
|
52
52
|
filename: appsignal-aarch64-linux-all-dynamic.tar.gz
|
53
53
|
i686-linux:
|
54
54
|
static:
|
55
|
-
checksum:
|
55
|
+
checksum: 6741b9a068dc405b3d6d07953fab7fc876c21b4add1cbb2b4c4c4dfdeca5d387
|
56
56
|
filename: appsignal-i686-linux-all-static.tar.gz
|
57
57
|
dynamic:
|
58
|
-
checksum:
|
58
|
+
checksum: 1af902b37af378a06251365fb637f86298380d3627c54f2945a85c1b7f075fda
|
59
59
|
filename: appsignal-i686-linux-all-dynamic.tar.gz
|
60
60
|
x86-linux:
|
61
61
|
static:
|
62
|
-
checksum:
|
62
|
+
checksum: 6741b9a068dc405b3d6d07953fab7fc876c21b4add1cbb2b4c4c4dfdeca5d387
|
63
63
|
filename: appsignal-i686-linux-all-static.tar.gz
|
64
64
|
dynamic:
|
65
|
-
checksum:
|
65
|
+
checksum: 1af902b37af378a06251365fb637f86298380d3627c54f2945a85c1b7f075fda
|
66
66
|
filename: appsignal-i686-linux-all-dynamic.tar.gz
|
67
67
|
x86_64-linux:
|
68
68
|
static:
|
69
|
-
checksum:
|
69
|
+
checksum: 8355b017093db606014023cc617d84d6375d503d7ffa54f62c7b3dc56fb64ead
|
70
70
|
filename: appsignal-x86_64-linux-all-static.tar.gz
|
71
71
|
dynamic:
|
72
|
-
checksum:
|
72
|
+
checksum: 7c239a7ffe18cb173120bd67fb96563f4a81f0744bbbb47082f077a38ccbe5f1
|
73
73
|
filename: appsignal-x86_64-linux-all-dynamic.tar.gz
|
74
74
|
x86_64-linux-musl:
|
75
75
|
static:
|
76
|
-
checksum:
|
76
|
+
checksum: e9d98ed23b872dbf1e67a081473918cf88c4af775b1caadbfd93deda2635d9f8
|
77
77
|
filename: appsignal-x86_64-linux-musl-all-static.tar.gz
|
78
78
|
dynamic:
|
79
|
-
checksum:
|
79
|
+
checksum: 5538172a95dfca1a4cf8e111ba61eab5e9c16314fa902259711cb9e8e0d2f85e
|
80
80
|
filename: appsignal-x86_64-linux-musl-all-dynamic.tar.gz
|
81
81
|
aarch64-linux-musl:
|
82
82
|
static:
|
83
|
-
checksum:
|
83
|
+
checksum: 0fb3eacfb8c8bc01c4acc8916327626720de376bcdd95104be71bb11a4ff9215
|
84
84
|
filename: appsignal-aarch64-linux-musl-all-static.tar.gz
|
85
85
|
dynamic:
|
86
|
-
checksum:
|
86
|
+
checksum: b87bcedaa2aa886acf3a93ce6e32762a843f3bee1ca7a8f9e0d17ca32f7a7d39
|
87
87
|
filename: appsignal-aarch64-linux-musl-all-dynamic.tar.gz
|
88
88
|
x86_64-freebsd:
|
89
89
|
static:
|
90
|
-
checksum:
|
90
|
+
checksum: b7d3c244b7068213840f5970df2e318d98f7909eb3b2b4ab42441d064ffb19ee
|
91
91
|
filename: appsignal-x86_64-freebsd-all-static.tar.gz
|
92
92
|
dynamic:
|
93
|
-
checksum:
|
93
|
+
checksum: 0a739134f11d50318d14f247df1f8cc0f8aec1fbcb70a8bc48d5e1f22dc4aaba
|
94
94
|
filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
95
95
|
amd64-freebsd:
|
96
96
|
static:
|
97
|
-
checksum:
|
97
|
+
checksum: b7d3c244b7068213840f5970df2e318d98f7909eb3b2b4ab42441d064ffb19ee
|
98
98
|
filename: appsignal-x86_64-freebsd-all-static.tar.gz
|
99
99
|
dynamic:
|
100
|
-
checksum:
|
100
|
+
checksum: 0a739134f11d50318d14f247df1f8cc0f8aec1fbcb70a8bc48d5e1f22dc4aaba
|
101
101
|
filename: appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
data/gemfiles/padrino.gemfile
CHANGED
data/gemfiles/que.gemfile
CHANGED
data/lib/appsignal/version.rb
CHANGED
@@ -11,9 +11,9 @@ require "json"
|
|
11
11
|
Puma::Plugin.create do # rubocop:disable Metrics/BlockLength
|
12
12
|
def start(launcher)
|
13
13
|
@launcher = launcher
|
14
|
-
|
14
|
+
log_debug "AppSignal: Puma plugin start."
|
15
15
|
in_background do
|
16
|
-
|
16
|
+
log_debug "AppSignal: Start Puma stats collection loop."
|
17
17
|
plugin = AppsignalPumaPlugin.new
|
18
18
|
|
19
19
|
loop do
|
@@ -24,12 +24,12 @@ Puma::Plugin.create do # rubocop:disable Metrics/BlockLength
|
|
24
24
|
# metrics.
|
25
25
|
sleep sleep_time
|
26
26
|
|
27
|
-
|
27
|
+
log_debug "AppSignal: Collecting Puma stats."
|
28
28
|
stats = fetch_puma_stats
|
29
29
|
if stats
|
30
30
|
plugin.call(stats)
|
31
31
|
else
|
32
|
-
|
32
|
+
log_debug "AppSignal: No Puma stats to report."
|
33
33
|
end
|
34
34
|
rescue StandardError => error
|
35
35
|
log_error "Error while processing metrics.", error
|
@@ -44,8 +44,20 @@ Puma::Plugin.create do # rubocop:disable Metrics/BlockLength
|
|
44
44
|
60 # seconds
|
45
45
|
end
|
46
46
|
|
47
|
+
def logger
|
48
|
+
if @launcher.respond_to? :log_writer
|
49
|
+
@launcher.log_writer
|
50
|
+
else
|
51
|
+
@launcher.events
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def log_debug(message)
|
56
|
+
logger.debug message
|
57
|
+
end
|
58
|
+
|
47
59
|
def log_error(message, error)
|
48
|
-
|
60
|
+
logger.error "AppSignal: #{message}\n" \
|
49
61
|
"#{error.class}: #{error.message}\n#{error.backtrace.join("\n")}"
|
50
62
|
end
|
51
63
|
|
@@ -683,43 +683,36 @@ describe Appsignal::Transaction do
|
|
683
683
|
end
|
684
684
|
|
685
685
|
describe "#sample_data" do
|
686
|
-
|
687
|
-
expect(transaction.ext).to receive(:set_sample_data).with(
|
688
|
-
"environment",
|
689
|
-
Appsignal::Utils::Data.generate(
|
690
|
-
"CONTENT_LENGTH" => "0",
|
691
|
-
"REQUEST_METHOD" => "GET",
|
692
|
-
"SERVER_NAME" => "example.org",
|
693
|
-
"SERVER_PORT" => "80",
|
694
|
-
"PATH_INFO" => "/blog"
|
695
|
-
)
|
696
|
-
).once
|
697
|
-
expect(transaction.ext).to receive(:set_sample_data).with(
|
698
|
-
"session_data",
|
699
|
-
Appsignal::Utils::Data.generate({})
|
700
|
-
).once
|
701
|
-
expect(transaction.ext).to receive(:set_sample_data).with(
|
702
|
-
"params",
|
703
|
-
Appsignal::Utils::Data.generate(
|
704
|
-
"controller" => "blog_posts",
|
705
|
-
"action" => "show",
|
706
|
-
"id" => "1"
|
707
|
-
)
|
708
|
-
).once
|
709
|
-
expect(transaction.ext).to receive(:set_sample_data).with(
|
710
|
-
"metadata",
|
711
|
-
Appsignal::Utils::Data.generate("key" => "value")
|
712
|
-
).once
|
713
|
-
expect(transaction.ext).to receive(:set_sample_data).with(
|
714
|
-
"tags",
|
715
|
-
Appsignal::Utils::Data.generate({})
|
716
|
-
).once
|
717
|
-
expect(transaction.ext).to receive(:set_sample_data).with(
|
718
|
-
"breadcrumbs",
|
719
|
-
Appsignal::Utils::Data.generate([])
|
720
|
-
).once
|
686
|
+
let(:env) { { "rack.session" => { "session" => "value" } } }
|
721
687
|
|
688
|
+
it "sets sample data" do
|
689
|
+
transaction.set_tags "tag" => "value"
|
690
|
+
transaction.add_breadcrumb "category", "action", "message", "key" => "value"
|
722
691
|
transaction.sample_data
|
692
|
+
|
693
|
+
sample_data = transaction.to_h["sample_data"]
|
694
|
+
expect(sample_data["environment"]).to include(
|
695
|
+
"CONTENT_LENGTH" => "0",
|
696
|
+
"REQUEST_METHOD" => "GET",
|
697
|
+
"SERVER_NAME" => "example.org",
|
698
|
+
"SERVER_PORT" => "80",
|
699
|
+
"PATH_INFO" => "/blog"
|
700
|
+
)
|
701
|
+
expect(sample_data["session_data"]).to eq("session" => "value")
|
702
|
+
expect(sample_data["params"]).to eq(
|
703
|
+
"controller" => "blog_posts",
|
704
|
+
"action" => "show",
|
705
|
+
"id" => "1"
|
706
|
+
)
|
707
|
+
expect(sample_data["metadata"]).to eq("key" => "value")
|
708
|
+
expect(sample_data["tags"]).to eq("tag" => "value")
|
709
|
+
expect(sample_data["breadcrumbs"]).to contain_exactly(
|
710
|
+
"action" => "action",
|
711
|
+
"category" => "category",
|
712
|
+
"message" => "message",
|
713
|
+
"metadata" => { "key" => "value" },
|
714
|
+
"time" => kind_of(Integer)
|
715
|
+
)
|
723
716
|
end
|
724
717
|
end
|
725
718
|
|
data/spec/lib/appsignal_spec.rb
CHANGED
@@ -77,7 +77,7 @@ describe Appsignal do
|
|
77
77
|
end
|
78
78
|
|
79
79
|
it "should not install the allocation event hook" do
|
80
|
-
expect(Appsignal::
|
80
|
+
expect(Appsignal::Extension).not_to receive(:install_allocation_event_hook)
|
81
81
|
Appsignal.start
|
82
82
|
expect_not_environment_metadata("ruby_allocation_tracking_enabled")
|
83
83
|
end
|
@@ -2,14 +2,14 @@ RSpec.describe "Puma plugin" do
|
|
2
2
|
include WaitForHelper
|
3
3
|
|
4
4
|
class MockPumaLauncher
|
5
|
-
def
|
6
|
-
return @
|
5
|
+
def log_writer
|
6
|
+
return @log_writer if defined?(@log_writer)
|
7
7
|
|
8
|
-
@
|
8
|
+
@log_writer = MockPumaLogWriter.new
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
class
|
12
|
+
class MockPumaLogWriter
|
13
13
|
attr_reader :logs
|
14
14
|
|
15
15
|
def initialize
|
@@ -153,7 +153,7 @@ RSpec.describe "Puma plugin" do
|
|
153
153
|
end
|
154
154
|
|
155
155
|
def logs
|
156
|
-
launcher.
|
156
|
+
launcher.log_writer.logs
|
157
157
|
end
|
158
158
|
|
159
159
|
def messages
|
@@ -281,7 +281,7 @@ RSpec.describe "Puma plugin" do
|
|
281
281
|
it "does not fetch metrics" do
|
282
282
|
run_plugin(appsignal_plugin) do
|
283
283
|
expect(logs).to_not include([:error, kind_of(String)])
|
284
|
-
expect(logs).to include([:
|
284
|
+
expect(logs).to include([:debug, "AppSignal: No Puma stats to report."])
|
285
285
|
expect(messages).to be_empty
|
286
286
|
end
|
287
287
|
end
|
@@ -296,4 +296,43 @@ RSpec.describe "Puma plugin" do
|
|
296
296
|
end
|
297
297
|
end
|
298
298
|
end
|
299
|
+
|
300
|
+
context "with Puma < 6 Events class" do
|
301
|
+
class MockPumaEvents
|
302
|
+
attr_reader :logs
|
303
|
+
|
304
|
+
def initialize
|
305
|
+
@logs = []
|
306
|
+
end
|
307
|
+
|
308
|
+
def log(message)
|
309
|
+
@logs << [:log, message]
|
310
|
+
end
|
311
|
+
|
312
|
+
def debug(message)
|
313
|
+
@logs << [:debug, message]
|
314
|
+
end
|
315
|
+
|
316
|
+
def error(message)
|
317
|
+
@logs << [:error, message]
|
318
|
+
end
|
319
|
+
end
|
320
|
+
|
321
|
+
let(:launcher) do
|
322
|
+
Class.new do
|
323
|
+
def events
|
324
|
+
return @events if defined?(@events)
|
325
|
+
|
326
|
+
@events = MockPumaEvents.new
|
327
|
+
end
|
328
|
+
end.new
|
329
|
+
end
|
330
|
+
let(:stats_data) { { :max_threads => 5 } }
|
331
|
+
|
332
|
+
it "logs messages to the events class" do
|
333
|
+
run_plugin(appsignal_plugin) do
|
334
|
+
expect(launcher.events.logs).to_not be_empty
|
335
|
+
end
|
336
|
+
end
|
337
|
+
end
|
299
338
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: appsignal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Beekman
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-
|
13
|
+
date: 2022-10-18 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|
@@ -427,7 +427,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
427
427
|
- !ruby/object:Gem::Version
|
428
428
|
version: '0'
|
429
429
|
requirements: []
|
430
|
-
rubygems_version: 3.3.
|
430
|
+
rubygems_version: 3.3.7
|
431
431
|
signing_key:
|
432
432
|
specification_version: 4
|
433
433
|
summary: Logs performance and exception data from your app to appsignal.com
|