appsignal 3.4.7-java → 3.4.9-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 +20 -0
- data/ext/agent.rb +27 -27
- data/lib/appsignal/config.rb +3 -0
- data/lib/appsignal/integrations/railtie.rb +7 -2
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/config_spec.rb +4 -0
- data/spec/lib/appsignal/integrations/railtie_spec.rb +27 -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: ec05b07de3c89bde6669f2af1a8d25b25de7a2149bfcde89aab3b369c2e4fb00
|
4
|
+
data.tar.gz: 1dd9ac89d972087f32e3ffad6c0b6f2d60a15a749d2b90dd0ebd50b3fdb1ac13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21680ba7d680c7d0303a51940dbaddf4bcf8ea34428236678169dffb61e415bad1acdaf3349a33883b42defe67efaa099cd85c08134d12a2855874cdf8ad94cc
|
7
|
+
data.tar.gz: c198818a139d0d0f9a05e7408fe14c7c387c7658025dc22f6dd565d1d16d5b58cc09390f8b5fb80b481060149691b2fa6fe04da8bcf329e1381c0ec9097cbfee
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,25 @@
|
|
1
1
|
# AppSignal for Ruby gem Changelog
|
2
2
|
|
3
|
+
## 3.4.9
|
4
|
+
|
5
|
+
### Added
|
6
|
+
|
7
|
+
- [d048c778](https://github.com/appsignal/appsignal-ruby/commit/d048c778e2718110609ba03f4d755953828bf4c5) patch - Allow passing custom data using the `appsignal` context via the Rails error reporter:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
custom_data = { :hash => { :one => 1, :two => 2 }, :array => [1, 2] }
|
11
|
+
Rails.error.handle(:context => { :appsignal => { :custom_data => custom_data } }) do
|
12
|
+
raise "Test"
|
13
|
+
end
|
14
|
+
```
|
15
|
+
|
16
|
+
## 3.4.8
|
17
|
+
|
18
|
+
### Added
|
19
|
+
|
20
|
+
- [5ddde58b](https://github.com/appsignal/appsignal-ruby/commit/5ddde58bb492984626d2dbddb292cecdfc225576) patch - Allow configuration of the agent's TCP and UDP servers using the `bind_address` config option. This is by default set to `127.0.0.1`, which only makes it accessible from the same host. If you want it to be accessible from other machines, use `0.0.0.0` or a specific IP address.
|
21
|
+
- [74583d26](https://github.com/appsignal/appsignal-ruby/commit/74583d26147e3ec386cdefbd4653abbe805ded96) patch - Report total CPU usage host metric for VMs. This change adds another `state` tag value on the `cpu` metric called `total_usage`, which reports the VM's total CPU usage in percentages.
|
22
|
+
|
3
23
|
## 3.4.7
|
4
24
|
|
5
25
|
### 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" => "ceaca3b",
|
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" => "00f1b2c0b79827ce1abb751005221c4852787ca1804ebcd7e2634714d146ffe0",
|
18
18
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
19
19
|
},
|
20
20
|
"dynamic" => {
|
21
|
-
"checksum" => "
|
21
|
+
"checksum" => "9aed6c7268caf2b2fb33e8dc241f499089a68aaaab18c270a606a22c8afcad55",
|
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" => "00f1b2c0b79827ce1abb751005221c4852787ca1804ebcd7e2634714d146ffe0",
|
28
28
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
29
29
|
},
|
30
30
|
"dynamic" => {
|
31
|
-
"checksum" => "
|
31
|
+
"checksum" => "9aed6c7268caf2b2fb33e8dc241f499089a68aaaab18c270a606a22c8afcad55",
|
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" => "e9195d0aa4e22214eeb2dcb54651014db09f2b84f5f5ef41f6c7fcddb9b58384",
|
38
38
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
39
39
|
},
|
40
40
|
"dynamic" => {
|
41
|
-
"checksum" => "
|
41
|
+
"checksum" => "031c9ed8449f4ebb24ebb50861b76162f10c9f371f163d86a48a6bc695a1a4ba",
|
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" => "e9195d0aa4e22214eeb2dcb54651014db09f2b84f5f5ef41f6c7fcddb9b58384",
|
48
48
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
49
49
|
},
|
50
50
|
"dynamic" => {
|
51
|
-
"checksum" => "
|
51
|
+
"checksum" => "031c9ed8449f4ebb24ebb50861b76162f10c9f371f163d86a48a6bc695a1a4ba",
|
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" => "e9195d0aa4e22214eeb2dcb54651014db09f2b84f5f5ef41f6c7fcddb9b58384",
|
58
58
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
59
59
|
},
|
60
60
|
"dynamic" => {
|
61
|
-
"checksum" => "
|
61
|
+
"checksum" => "031c9ed8449f4ebb24ebb50861b76162f10c9f371f163d86a48a6bc695a1a4ba",
|
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" => "d568c447595d5a46b726c09c44c66a28153bb85b843d9f915e755de60d2cc797",
|
68
68
|
"filename" => "appsignal-aarch64-linux-all-static.tar.gz"
|
69
69
|
},
|
70
70
|
"dynamic" => {
|
71
|
-
"checksum" => "
|
71
|
+
"checksum" => "3884412af9f537b641113cb84e1b534e07289baadf5691cd3f4877fc4cd05896",
|
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" => "4a8135e861ef8dd347ada22fa1fc993d1c5ba5db7f9f043a38fb9891c57368a5",
|
78
78
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
79
79
|
},
|
80
80
|
"dynamic" => {
|
81
|
-
"checksum" => "
|
81
|
+
"checksum" => "baf3941d9913f8b348bb4fce01c7638f6e0a112a8cc788889b081f141949a643",
|
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" => "4a8135e861ef8dd347ada22fa1fc993d1c5ba5db7f9f043a38fb9891c57368a5",
|
88
88
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
89
89
|
},
|
90
90
|
"dynamic" => {
|
91
|
-
"checksum" => "
|
91
|
+
"checksum" => "baf3941d9913f8b348bb4fce01c7638f6e0a112a8cc788889b081f141949a643",
|
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" => "4a22f454e5c125cd24436ad331d53df965394be81272c8ab366a2e6ea5f02625",
|
98
98
|
"filename" => "appsignal-x86_64-linux-all-static.tar.gz"
|
99
99
|
},
|
100
100
|
"dynamic" => {
|
101
|
-
"checksum" => "
|
101
|
+
"checksum" => "a49e8d8700b64f6aeb06c074cb628ed99d3d57662a52029f5409f8b51e185c4f",
|
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" => "d770f78f9f87d3b5b01a93f0e3f0dffc36a4f8bd664ce37574fd0671276d4d8b",
|
108
108
|
"filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
|
109
109
|
},
|
110
110
|
"dynamic" => {
|
111
|
-
"checksum" => "
|
111
|
+
"checksum" => "1f018b072fca2234b7f8c9bdc0ae26a93826ddf3d715a1107c24b9e98a0e01d9",
|
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" => "ef4838e0cd3e43d0cc138e0eb6b78b7cf1f29244daa8379bb30c47b1497f5570",
|
118
118
|
"filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
|
119
119
|
},
|
120
120
|
"dynamic" => {
|
121
|
-
"checksum" => "
|
121
|
+
"checksum" => "1bac2cce3dcde3e17174f56c7db149b69a347c0d40723c6555a292425fab41e0",
|
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" => "f1730afd98b48f3fa938fd07b27dc470e7dcd3f8d2e72a7a0fc2a4b080461f5b",
|
128
128
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
129
129
|
},
|
130
130
|
"dynamic" => {
|
131
|
-
"checksum" => "
|
131
|
+
"checksum" => "e7760c461ed4930983fe6b07a954c7ffa42c63ef627890c246eb2c4fb63bca84",
|
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" => "f1730afd98b48f3fa938fd07b27dc470e7dcd3f8d2e72a7a0fc2a4b080461f5b",
|
138
138
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
139
139
|
},
|
140
140
|
"dynamic" => {
|
141
|
-
"checksum" => "
|
141
|
+
"checksum" => "e7760c461ed4930983fe6b07a954c7ffa42c63ef627890c246eb2c4fb63bca84",
|
142
142
|
"filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
|
143
143
|
}
|
144
144
|
}
|
data/lib/appsignal/config.rb
CHANGED
@@ -66,6 +66,7 @@ module Appsignal
|
|
66
66
|
ENV_TO_KEY_MAPPING = {
|
67
67
|
"APPSIGNAL_ACTIVE" => :active,
|
68
68
|
"APPSIGNAL_APP_NAME" => :name,
|
69
|
+
"APPSIGNAL_BIND_ADDRESS" => :bind_address,
|
69
70
|
"APPSIGNAL_CA_FILE_PATH" => :ca_file_path,
|
70
71
|
"APPSIGNAL_DEBUG" => :debug,
|
71
72
|
"APPSIGNAL_DNS_SERVERS" => :dns_servers,
|
@@ -111,6 +112,7 @@ module Appsignal
|
|
111
112
|
# @api private
|
112
113
|
ENV_STRING_KEYS = %w[
|
113
114
|
APPSIGNAL_APP_NAME
|
115
|
+
APPSIGNAL_BIND_ADDRESS
|
114
116
|
APPSIGNAL_CA_FILE_PATH
|
115
117
|
APPSIGNAL_HOSTNAME
|
116
118
|
APPSIGNAL_HTTP_PROXY
|
@@ -323,6 +325,7 @@ module Appsignal
|
|
323
325
|
ENV["_APPSIGNAL_AGENT_PATH"] = File.expand_path("../../ext", __dir__).to_s
|
324
326
|
ENV["_APPSIGNAL_APP_NAME"] = config_hash[:name]
|
325
327
|
ENV["_APPSIGNAL_APP_PATH"] = root_path.to_s
|
328
|
+
ENV["_APPSIGNAL_BIND_ADDRESS"] = config_hash[:bind_address].to_s
|
326
329
|
ENV["_APPSIGNAL_CA_FILE_PATH"] = config_hash[:ca_file_path].to_s
|
327
330
|
ENV["_APPSIGNAL_DEBUG_LOGGING"] = config_hash[:debug].to_s
|
328
331
|
ENV["_APPSIGNAL_DNS_SERVERS"] = config_hash[:dns_servers].join(",")
|
@@ -55,9 +55,10 @@ module Appsignal
|
|
55
55
|
return unless handled
|
56
56
|
|
57
57
|
Appsignal.send_error(error) do |transaction|
|
58
|
-
namespace, action_name, tags = context_for(context.dup)
|
58
|
+
namespace, action_name, tags, custom_data = context_for(context.dup)
|
59
59
|
transaction.set_namespace(namespace) if namespace
|
60
60
|
transaction.set_action(action_name) if action_name
|
61
|
+
transaction.set_sample_data("custom_data", custom_data) if custom_data
|
61
62
|
|
62
63
|
tags[:severity] = severity
|
63
64
|
tags[:source] = source.to_s if source
|
@@ -69,6 +70,7 @@ module Appsignal
|
|
69
70
|
|
70
71
|
def context_for(context)
|
71
72
|
tags = {}
|
73
|
+
custom_data = nil
|
72
74
|
|
73
75
|
appsignal_context = context.delete(:appsignal)
|
74
76
|
# Fetch the namespace and action name based on the Rails execution
|
@@ -102,10 +104,13 @@ module Appsignal
|
|
102
104
|
|
103
105
|
context_action_name = appsignal_context[:action]
|
104
106
|
action_name = context_action_name if context_action_name
|
107
|
+
|
108
|
+
context_custom_data = appsignal_context[:custom_data]
|
109
|
+
custom_data = context_custom_data if context_custom_data
|
105
110
|
end
|
106
111
|
tags.merge!(context)
|
107
112
|
|
108
|
-
[namespace, action_name, tags]
|
113
|
+
[namespace, action_name, tags, custom_data]
|
109
114
|
end
|
110
115
|
end
|
111
116
|
end
|
data/lib/appsignal/version.rb
CHANGED
@@ -383,6 +383,7 @@ describe Appsignal::Config do
|
|
383
383
|
:running_in_container => true,
|
384
384
|
:push_api_key => "aaa-bbb-ccc",
|
385
385
|
:active => true,
|
386
|
+
:bind_address => "0.0.0.0",
|
386
387
|
:name => "App name",
|
387
388
|
:debug => true,
|
388
389
|
:dns_servers => ["8.8.8.8", "8.8.4.4"],
|
@@ -404,6 +405,7 @@ describe Appsignal::Config do
|
|
404
405
|
ENV["APPSIGNAL_PUSH_API_KEY"] = "aaa-bbb-ccc"
|
405
406
|
ENV["APPSIGNAL_ACTIVE"] = "true"
|
406
407
|
ENV["APPSIGNAL_APP_NAME"] = "App name"
|
408
|
+
ENV["APPSIGNAL_BIND_ADDRESS"] = "0.0.0.0"
|
407
409
|
ENV["APPSIGNAL_DEBUG"] = "true"
|
408
410
|
ENV["APPSIGNAL_DNS_SERVERS"] = "8.8.8.8,8.8.4.4"
|
409
411
|
ENV["APPSIGNAL_IGNORE_ACTIONS"] = "action1,action2"
|
@@ -598,6 +600,7 @@ describe Appsignal::Config do
|
|
598
600
|
describe "#write_to_environment" do
|
599
601
|
let(:config) { project_fixture_config(:production) }
|
600
602
|
before do
|
603
|
+
config[:bind_address] = "0.0.0.0"
|
601
604
|
config[:logging_endpoint] = "http://localhost:123"
|
602
605
|
config[:http_proxy] = "http://localhost"
|
603
606
|
config[:ignore_actions] = %w[action1 action2]
|
@@ -620,6 +623,7 @@ describe Appsignal::Config do
|
|
620
623
|
expect(ENV.fetch("_APPSIGNAL_APP_PATH", nil))
|
621
624
|
.to end_with("spec/support/fixtures/projects/valid")
|
622
625
|
expect(ENV.fetch("_APPSIGNAL_AGENT_PATH", nil)).to end_with("/ext")
|
626
|
+
expect(ENV.fetch("_APPSIGNAL_BIND_ADDRESS", nil)).to eq("0.0.0.0")
|
623
627
|
expect(ENV.fetch("_APPSIGNAL_DEBUG_LOGGING", nil)).to eq "false"
|
624
628
|
expect(ENV.fetch("_APPSIGNAL_LOG", nil)).to eq "stdout"
|
625
629
|
expect(ENV.fetch("_APPSIGNAL_LOG_FILE_PATH", nil)).to end_with("/tmp/appsignal.log")
|
@@ -196,6 +196,33 @@ if DependencyHelper.rails_present?
|
|
196
196
|
end
|
197
197
|
end
|
198
198
|
|
199
|
+
it "sends tags stored in :appsignal -> :custom_data as custom data" do
|
200
|
+
current_transaction = http_request_transaction
|
201
|
+
|
202
|
+
with_current_transaction current_transaction do
|
203
|
+
given_context = {
|
204
|
+
:appsignal => {
|
205
|
+
:custom_data => {
|
206
|
+
:array => [1, 2],
|
207
|
+
:hash => { :one => 1, :two => 2 }
|
208
|
+
}
|
209
|
+
}
|
210
|
+
}
|
211
|
+
Rails.error.handle(:context => given_context) { raise ExampleStandardError }
|
212
|
+
|
213
|
+
transaction = last_transaction
|
214
|
+
transaction_hash = transaction.to_h
|
215
|
+
expect(transaction_hash).to include(
|
216
|
+
"sample_data" => hash_including(
|
217
|
+
"custom_data" => {
|
218
|
+
"array" => [1, 2],
|
219
|
+
"hash" => { "one" => 1, "two" => 2 }
|
220
|
+
}
|
221
|
+
)
|
222
|
+
)
|
223
|
+
end
|
224
|
+
end
|
225
|
+
|
199
226
|
it "overwrites duplicated namespace and action with custom from context" do
|
200
227
|
current_transaction = http_request_transaction
|
201
228
|
current_transaction.set_namespace "custom"
|
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.9
|
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-07-
|
13
|
+
date: 2023-07-27 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|