appsignal 3.4.11-java → 3.4.12-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/ext/agent.rb +27 -27
- data/lib/appsignal/config.rb +27 -2
- data/lib/appsignal/transaction.rb +8 -1
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/config_spec.rb +42 -13
- data/spec/lib/appsignal/transaction_spec.rb +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9309de9f9994d58b83015a58dafbe9b70abd5ebd862659fbe0fad451fcbe67dd
|
4
|
+
data.tar.gz: a42321ba0bc9809e2b4b26a3c7e3707e5c06941a30ed6187cba491cbc76b9cfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef7cd46cdfaf1dd7a05eee9e64fd2b55195c3348b3cf82f5a38897df9c79dc6e7b0570985ff99647fba5ca81a8c010898d1c824ee640ed7967a8e24a8ef692ef
|
7
|
+
data.tar.gz: 811176ae1f6735a901e1b0b822b4956aa5a0ca86efd2fbc8cc969afde01510022d3d2adf4fe11de50609f324df4dab0c699dbf84ca120ab27556d18735e7748b
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,20 @@
|
|
1
1
|
# AppSignal for Ruby gem Changelog
|
2
2
|
|
3
|
+
## 3.4.12
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- [441de353](https://github.com/appsignal/appsignal-ruby/commit/441de3537e7a8f36dd2460149c171aaa80929e53) patch - Add an option to not start AppSignal on config file errors. When the `config/appsignal.yml` file raises an error (due to ERB syntax issues or ERB errors), it will currently ignore the config file and try to make a configuration work from the other config sources (default, auto detection and system environment variables). This can cause unexpected behavior, because the config from the config file is not part of the loaded config.
|
8
|
+
|
9
|
+
In future versions of the Ruby gem, AppSignal will not start when the config file contains an error. To opt-in to this new behavior, set the `APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR` system environment variable to either `1` or `true`.
|
10
|
+
|
11
|
+
### Changed
|
12
|
+
|
13
|
+
- [a42da92b](https://github.com/appsignal/appsignal-ruby/commit/a42da92b1ff16c48eb40dc081d3b4fbd6480c7c0) patch - Log an error when sample data is of an invalid type. Accepted types are Array and Hash. If any other types are given, it will log an error to the `appsignal.log` file.
|
14
|
+
- [8e636323](https://github.com/appsignal/appsignal-ruby/commit/8e6363232dc7fabe5f1aeae5758802e4c8d6cbfa) patch - Bump agent to 6133900.
|
15
|
+
|
16
|
+
- Fix `disk_inodes_usage` metric name format to not be interpreted as a JSON object.
|
17
|
+
|
3
18
|
## 3.4.11
|
4
19
|
|
5
20
|
### Added
|
data/ext/agent.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
# Modifications to this file will be overwritten with the next agent release.
|
7
7
|
|
8
8
|
APPSIGNAL_AGENT_CONFIG = {
|
9
|
-
"version" => "
|
9
|
+
"version" => "6133900",
|
10
10
|
"mirrors" => [
|
11
11
|
"https://appsignal-agent-releases.global.ssl.fastly.net",
|
12
12
|
"https://d135dj0rjqvssy.cloudfront.net"
|
@@ -14,131 +14,131 @@ APPSIGNAL_AGENT_CONFIG = {
|
|
14
14
|
"triples" => {
|
15
15
|
"x86_64-darwin" => {
|
16
16
|
"static" => {
|
17
|
-
"checksum" => "
|
17
|
+
"checksum" => "19cfea536fc6c4a8fe335a26d14ce955b422c23217902642f95d7df670152238",
|
18
18
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
19
19
|
},
|
20
20
|
"dynamic" => {
|
21
|
-
"checksum" => "
|
21
|
+
"checksum" => "f5c4b66b45faac47473befdbe286a037d8fca9386339b00f59be9e9505d15b13",
|
22
22
|
"filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
|
23
23
|
}
|
24
24
|
},
|
25
25
|
"universal-darwin" => {
|
26
26
|
"static" => {
|
27
|
-
"checksum" => "
|
27
|
+
"checksum" => "19cfea536fc6c4a8fe335a26d14ce955b422c23217902642f95d7df670152238",
|
28
28
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
29
29
|
},
|
30
30
|
"dynamic" => {
|
31
|
-
"checksum" => "
|
31
|
+
"checksum" => "f5c4b66b45faac47473befdbe286a037d8fca9386339b00f59be9e9505d15b13",
|
32
32
|
"filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
|
33
33
|
}
|
34
34
|
},
|
35
35
|
"aarch64-darwin" => {
|
36
36
|
"static" => {
|
37
|
-
"checksum" => "
|
37
|
+
"checksum" => "4fa0dbccba79f70edc6844a86bfd047ccdd612d752b65aff46fe0e21d8a610ea",
|
38
38
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
39
39
|
},
|
40
40
|
"dynamic" => {
|
41
|
-
"checksum" => "
|
41
|
+
"checksum" => "f86e88647be6c64f0f1f56b1ac15e0e4453c7e4a6c997fd5e510cf459c572a57",
|
42
42
|
"filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
|
43
43
|
}
|
44
44
|
},
|
45
45
|
"arm64-darwin" => {
|
46
46
|
"static" => {
|
47
|
-
"checksum" => "
|
47
|
+
"checksum" => "4fa0dbccba79f70edc6844a86bfd047ccdd612d752b65aff46fe0e21d8a610ea",
|
48
48
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
49
49
|
},
|
50
50
|
"dynamic" => {
|
51
|
-
"checksum" => "
|
51
|
+
"checksum" => "f86e88647be6c64f0f1f56b1ac15e0e4453c7e4a6c997fd5e510cf459c572a57",
|
52
52
|
"filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
|
53
53
|
}
|
54
54
|
},
|
55
55
|
"arm-darwin" => {
|
56
56
|
"static" => {
|
57
|
-
"checksum" => "
|
57
|
+
"checksum" => "4fa0dbccba79f70edc6844a86bfd047ccdd612d752b65aff46fe0e21d8a610ea",
|
58
58
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
59
59
|
},
|
60
60
|
"dynamic" => {
|
61
|
-
"checksum" => "
|
61
|
+
"checksum" => "f86e88647be6c64f0f1f56b1ac15e0e4453c7e4a6c997fd5e510cf459c572a57",
|
62
62
|
"filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
|
63
63
|
}
|
64
64
|
},
|
65
65
|
"aarch64-linux" => {
|
66
66
|
"static" => {
|
67
|
-
"checksum" => "
|
67
|
+
"checksum" => "cdd75637940fcfd369b569e873048c7d37a3844d9d31d783e4459b375b78ee0e",
|
68
68
|
"filename" => "appsignal-aarch64-linux-all-static.tar.gz"
|
69
69
|
},
|
70
70
|
"dynamic" => {
|
71
|
-
"checksum" => "
|
71
|
+
"checksum" => "99b52c29d497d63f02a4ff7162152641b51e7ecd292d07f0330e7d4f3abc8075",
|
72
72
|
"filename" => "appsignal-aarch64-linux-all-dynamic.tar.gz"
|
73
73
|
}
|
74
74
|
},
|
75
75
|
"i686-linux" => {
|
76
76
|
"static" => {
|
77
|
-
"checksum" => "
|
77
|
+
"checksum" => "a9374d1fd4baae84f1c4a74957cbb8c919b29ae2ab05a571ff75b9ca483717ab",
|
78
78
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
79
79
|
},
|
80
80
|
"dynamic" => {
|
81
|
-
"checksum" => "
|
81
|
+
"checksum" => "d643c72add6fe1054faff034101cf5a2676a169c7bff479f3d79e71875598b8a",
|
82
82
|
"filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
|
83
83
|
}
|
84
84
|
},
|
85
85
|
"x86-linux" => {
|
86
86
|
"static" => {
|
87
|
-
"checksum" => "
|
87
|
+
"checksum" => "a9374d1fd4baae84f1c4a74957cbb8c919b29ae2ab05a571ff75b9ca483717ab",
|
88
88
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
89
89
|
},
|
90
90
|
"dynamic" => {
|
91
|
-
"checksum" => "
|
91
|
+
"checksum" => "d643c72add6fe1054faff034101cf5a2676a169c7bff479f3d79e71875598b8a",
|
92
92
|
"filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
|
93
93
|
}
|
94
94
|
},
|
95
95
|
"x86_64-linux" => {
|
96
96
|
"static" => {
|
97
|
-
"checksum" => "
|
97
|
+
"checksum" => "bd625ed84100d0632b298ac602b152463628c41afe56a8621745cdae626f8413",
|
98
98
|
"filename" => "appsignal-x86_64-linux-all-static.tar.gz"
|
99
99
|
},
|
100
100
|
"dynamic" => {
|
101
|
-
"checksum" => "
|
101
|
+
"checksum" => "0daa644acfee46848282ad733b175e4994e7faf64c8bc046d2efff2b8fc1afdd",
|
102
102
|
"filename" => "appsignal-x86_64-linux-all-dynamic.tar.gz"
|
103
103
|
}
|
104
104
|
},
|
105
105
|
"x86_64-linux-musl" => {
|
106
106
|
"static" => {
|
107
|
-
"checksum" => "
|
107
|
+
"checksum" => "7988c4a2a6ba5d59be2186ce9bf51ab50b6537a60888b08c8e9066172516e59d",
|
108
108
|
"filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
|
109
109
|
},
|
110
110
|
"dynamic" => {
|
111
|
-
"checksum" => "
|
111
|
+
"checksum" => "93e47c9400ddae42a8cd2b80c09c9134ee96a76bf622c3ad5d53b776fec1a3f0",
|
112
112
|
"filename" => "appsignal-x86_64-linux-musl-all-dynamic.tar.gz"
|
113
113
|
}
|
114
114
|
},
|
115
115
|
"aarch64-linux-musl" => {
|
116
116
|
"static" => {
|
117
|
-
"checksum" => "
|
117
|
+
"checksum" => "8e5fe2a8bc4cb7de4ba7d61fec48f15aa0cd580050f67752f07625853636eb16",
|
118
118
|
"filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
|
119
119
|
},
|
120
120
|
"dynamic" => {
|
121
|
-
"checksum" => "
|
121
|
+
"checksum" => "01f993b3320f0377ef9f652bb215ce268da208f46a6f59ad0c0e71f57257b4ef",
|
122
122
|
"filename" => "appsignal-aarch64-linux-musl-all-dynamic.tar.gz"
|
123
123
|
}
|
124
124
|
},
|
125
125
|
"x86_64-freebsd" => {
|
126
126
|
"static" => {
|
127
|
-
"checksum" => "
|
127
|
+
"checksum" => "09e21821eb98ad6afdb5d3708b67ea25799aedbee2ccb0d566b99d9c5703cb1e",
|
128
128
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
129
129
|
},
|
130
130
|
"dynamic" => {
|
131
|
-
"checksum" => "
|
131
|
+
"checksum" => "e77592de9dd7ff41efb6c1d2d88e06fa7b663e9ff009392bb971b1333e0f28d7",
|
132
132
|
"filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
|
133
133
|
}
|
134
134
|
},
|
135
135
|
"amd64-freebsd" => {
|
136
136
|
"static" => {
|
137
|
-
"checksum" => "
|
137
|
+
"checksum" => "09e21821eb98ad6afdb5d3708b67ea25799aedbee2ccb0d566b99d9c5703cb1e",
|
138
138
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
139
139
|
},
|
140
140
|
"dynamic" => {
|
141
|
-
"checksum" => "
|
141
|
+
"checksum" => "e77592de9dd7ff41efb6c1d2d88e06fa7b663e9ff009392bb971b1333e0f28d7",
|
142
142
|
"filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
|
143
143
|
}
|
144
144
|
}
|
data/lib/appsignal/config.rb
CHANGED
@@ -232,6 +232,7 @@ module Appsignal
|
|
232
232
|
# How to integrate AppSignal manually
|
233
233
|
def initialize(root_path, env, initial_config = {}, logger = Appsignal.logger,
|
234
234
|
config_file = nil)
|
235
|
+
@config_file_error = false
|
235
236
|
@root_path = root_path
|
236
237
|
@config_file = config_file
|
237
238
|
@logger = logger
|
@@ -417,8 +418,20 @@ module Appsignal
|
|
417
418
|
nil
|
418
419
|
end
|
419
420
|
rescue => e
|
420
|
-
|
421
|
-
|
421
|
+
# TODO: Remove in the next major version
|
422
|
+
@config_file_error = true
|
423
|
+
extra_message =
|
424
|
+
if inactive_on_config_file_error?
|
425
|
+
"Not starting AppSignal because " \
|
426
|
+
"APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR is set."
|
427
|
+
else
|
428
|
+
"Skipping file config. In future versions AppSignal will not start " \
|
429
|
+
"on a config file error. To opt-in to this new behavior set " \
|
430
|
+
"'APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR=1' in your system " \
|
431
|
+
"environment."
|
432
|
+
end
|
433
|
+
message = "An error occured while loading the AppSignal config file. " \
|
434
|
+
"#{extra_message}\n" \
|
422
435
|
"File: #{config_file.inspect}\n" \
|
423
436
|
"#{e.class.name}: #{e}"
|
424
437
|
Kernel.warn "appsignal: #{message}"
|
@@ -485,6 +498,12 @@ module Appsignal
|
|
485
498
|
# stick around as a structure for future deprecations.
|
486
499
|
def determine_overrides
|
487
500
|
config = {}
|
501
|
+
# If an error was detected during config file reading/parsing and the new
|
502
|
+
# behavior is enabled to not start AppSignal on incomplete config, do not
|
503
|
+
# start AppSignal.
|
504
|
+
# TODO: Make default behavior in next major version. Remove
|
505
|
+
# `inactive_on_config_file_error?` call.
|
506
|
+
config[:active] = false if @config_file_error && inactive_on_config_file_error?
|
488
507
|
skip_session_data = config_hash[:skip_session_data]
|
489
508
|
send_session_data = config_hash[:send_session_data]
|
490
509
|
if skip_session_data.nil? # Deprecated option is not set
|
@@ -508,5 +527,11 @@ module Appsignal
|
|
508
527
|
config_hash[key] = value
|
509
528
|
end
|
510
529
|
end
|
530
|
+
|
531
|
+
# Does it use the new behavior?
|
532
|
+
def inactive_on_config_file_error?
|
533
|
+
value = ENV.fetch("APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR", false)
|
534
|
+
["1", "true"].include?(value)
|
535
|
+
end
|
511
536
|
end
|
512
537
|
end
|
@@ -320,7 +320,14 @@ module Appsignal
|
|
320
320
|
end
|
321
321
|
|
322
322
|
def set_sample_data(key, data)
|
323
|
-
return unless key && data
|
323
|
+
return unless key && data
|
324
|
+
|
325
|
+
if !data.is_a?(Array) && !data.is_a?(Hash)
|
326
|
+
Appsignal.logger.error(
|
327
|
+
"Invalid sample data for '#{key}'. Value is not an Array or Hash: '#{data.inspect}'"
|
328
|
+
)
|
329
|
+
return
|
330
|
+
end
|
324
331
|
|
325
332
|
@ext.set_sample_data(
|
326
333
|
key.to_s,
|
data/lib/appsignal/version.rb
CHANGED
@@ -294,19 +294,48 @@ describe Appsignal::Config do
|
|
294
294
|
end
|
295
295
|
let(:config) { Appsignal::Config.new(config_path, "foo") }
|
296
296
|
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
"
|
303
|
-
|
304
|
-
|
305
|
-
|
306
|
-
|
307
|
-
|
308
|
-
|
309
|
-
|
297
|
+
context "when APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR is not set" do
|
298
|
+
it "logs & prints an error, skipping the file source" do
|
299
|
+
stdout = std_stream
|
300
|
+
stderr = std_stream
|
301
|
+
log = capture_logs { capture_std_streams(stdout, stderr) { config } }
|
302
|
+
message = "An error occured while loading the AppSignal config file. " \
|
303
|
+
"Skipping file config. " \
|
304
|
+
"In future versions AppSignal will not start on a config file " \
|
305
|
+
"error. To opt-in to this new behavior set " \
|
306
|
+
"'APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR=1' in your system " \
|
307
|
+
"environment.\n" \
|
308
|
+
"File: #{File.join(config_path, "config", "appsignal.yml").inspect}\n" \
|
309
|
+
"KeyError: key not found"
|
310
|
+
expect(log).to contains_log :error, message
|
311
|
+
expect(log).to include("/appsignal/config.rb:") # Backtrace
|
312
|
+
expect(stdout.read).to_not include("appsignal:")
|
313
|
+
expect(stderr.read).to include "appsignal: #{message}"
|
314
|
+
expect(config.file_config).to eql({})
|
315
|
+
end
|
316
|
+
end
|
317
|
+
|
318
|
+
context "when APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR=1 is set" do
|
319
|
+
it "does not start AppSignal, logs & prints an error" do
|
320
|
+
stdout = std_stream
|
321
|
+
stderr = std_stream
|
322
|
+
ENV["APPSIGNAL_ACTIVE"] = "true"
|
323
|
+
ENV["APPSIGNAL_APP_NAME"] = "My app"
|
324
|
+
ENV["APPSIGNAL_APP_ENV"] = "dev"
|
325
|
+
ENV["APPSIGNAL_PUSH_API_KEY"] = "something valid"
|
326
|
+
ENV["APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR"] = "1"
|
327
|
+
log = capture_logs { capture_std_streams(stdout, stderr) { config } }
|
328
|
+
message = "An error occured while loading the AppSignal config file. " \
|
329
|
+
"Not starting AppSignal because APPSIGNAL_INACTIVE_ON_CONFIG_FILE_ERROR is set.\n" \
|
330
|
+
"File: #{File.join(config_path, "config", "appsignal.yml").inspect}\n" \
|
331
|
+
"KeyError: key not found"
|
332
|
+
expect(log).to contains_log :error, message
|
333
|
+
expect(log).to include("/appsignal/config.rb:") # Backtrace
|
334
|
+
expect(stdout.read).to_not include("appsignal:")
|
335
|
+
expect(stderr.read).to include "appsignal: #{message}"
|
336
|
+
expect(config.file_config).to eql({})
|
337
|
+
expect(config.active?).to be(false)
|
338
|
+
end
|
310
339
|
end
|
311
340
|
end
|
312
341
|
|
@@ -688,6 +688,8 @@ describe Appsignal::Transaction do
|
|
688
688
|
transaction.set_sample_data("params", "string")
|
689
689
|
|
690
690
|
expect(transaction.to_h["sample_data"]).to eq({})
|
691
|
+
expect(log_contents(log)).to contains_log :error,
|
692
|
+
%(Invalid sample data for 'params'. Value is not an Array or Hash: '"string"')
|
691
693
|
end
|
692
694
|
end
|
693
695
|
|
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.4.
|
4
|
+
version: 3.4.12
|
5
5
|
platform: java
|
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: 2023-08-
|
13
|
+
date: 2023-08-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|