appsignal 3.3.11 → 3.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +1 -1
- data/.semaphore/semaphore.yml +26 -1267
- data/CHANGELOG.md +7 -9
- data/Gemfile +2 -0
- data/appsignal.gemspec +11 -31
- data/build_matrix.yml +2 -115
- data/ext/agent.rb +27 -29
- data/lib/appsignal/config.rb +1 -1
- data/lib/appsignal/logger.rb +22 -7
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/config_spec.rb +1 -1
- data/spec/lib/appsignal/logger_spec.rb +4 -2
- metadata +25 -32
- data/gemfiles/rails-3.2.gemfile +0 -8
- data/gemfiles/rails-4.2.gemfile +0 -23
- data/gemfiles/rails-5.0.gemfile +0 -6
- data/gemfiles/rails-5.1.gemfile +0 -6
- data/gemfiles/rails-5.2.gemfile +0 -6
- data/gemfiles/resque-1.gemfile +0 -7
- data/gemfiles/sequel-435.gemfile +0 -10
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,14 @@
|
|
1
1
|
# AppSignal for Ruby gem Changelog
|
2
2
|
|
3
|
-
## 3.
|
3
|
+
## 3.4.0
|
4
4
|
|
5
|
-
###
|
5
|
+
### Deprecated
|
6
6
|
|
7
|
-
- [
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
- Fix container detection for hosts running Docker itself.
|
13
|
-
- Add APPSIGNAL_STATSD_PORT config option.
|
7
|
+
- [6f9b7a4d](https://github.com/appsignal/appsignal-ruby/commit/6f9b7a4d12c6ff3353359cb37c5c02af8bbc6ec6) minor - Remove support for Ruby versions in that are end of life, following our [maintenance policy](https://docs.appsignal.com/support/maintenance-policy.html). Please upgrade your Ruby version to a supported version before upgrading AppSignal.
|
8
|
+
|
9
|
+
### Fixed
|
10
|
+
|
11
|
+
- [5b7735ac](https://github.com/appsignal/appsignal-ruby/commit/5b7735ac5868b0fbf9727922a32ca4645d4e2fdd) patch - Fix Logger add method signature error
|
14
12
|
|
15
13
|
## 3.3.10
|
16
14
|
|
data/Gemfile
CHANGED
data/appsignal.gemspec
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require File.expand_path("lib/appsignal/version", __dir__)
|
2
4
|
|
3
5
|
Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
|
4
6
|
gem.authors = [
|
@@ -19,50 +21,28 @@ Gem::Specification.new do |gem| # rubocop:disable Metrics/BlockLength
|
|
19
21
|
gem.name = "appsignal"
|
20
22
|
gem.require_paths = %w[lib ext]
|
21
23
|
gem.version = Appsignal::VERSION
|
22
|
-
gem.required_ruby_version = ">=
|
24
|
+
gem.required_ruby_version = ">= 3.0"
|
23
25
|
# Default extension installer. Overridden by JRuby gemspec as defined in
|
24
26
|
# `Rakefile`.
|
25
27
|
gem.extensions = %w[ext/extconf.rb]
|
26
28
|
|
27
29
|
gem.metadata = {
|
28
30
|
"rubygems_mfa_required" => "true",
|
29
|
-
"bug_tracker_uri"
|
30
|
-
"changelog_uri"
|
31
|
+
"bug_tracker_uri" => "https://github.com/appsignal/appsignal-ruby/issues",
|
32
|
+
"changelog_uri" =>
|
31
33
|
"https://github.com/appsignal/appsignal-ruby/blob/main/CHANGELOG.md",
|
32
34
|
"documentation_uri" => "https://docs.appsignal.com/ruby/",
|
33
|
-
"homepage_uri"
|
34
|
-
"source_code_uri"
|
35
|
+
"homepage_uri" => "https://docs.appsignal.com/ruby/",
|
36
|
+
"source_code_uri" => "https://github.com/appsignal/appsignal-ruby"
|
35
37
|
}
|
36
38
|
|
37
39
|
gem.add_dependency "rack"
|
38
40
|
|
41
|
+
gem.add_development_dependency "pry"
|
39
42
|
gem.add_development_dependency "rake", ">= 12"
|
40
43
|
gem.add_development_dependency "rspec", "~> 3.8"
|
44
|
+
gem.add_development_dependency "rubocop"
|
41
45
|
gem.add_development_dependency "timecop"
|
46
|
+
gem.add_development_dependency "webmock"
|
42
47
|
gem.add_development_dependency "yard", ">= 0.9.20"
|
43
|
-
gem.add_development_dependency "pry"
|
44
|
-
|
45
|
-
# Dependencies that need to be locked to a specific version in developement
|
46
|
-
ruby_version = Gem::Version.new(RUBY_VERSION)
|
47
|
-
if ruby_version < Gem::Version.new("2.3.0")
|
48
|
-
gem.add_development_dependency "webmock", "3.14.0"
|
49
|
-
else
|
50
|
-
gem.add_development_dependency "webmock"
|
51
|
-
end
|
52
|
-
if ruby_version > Gem::Version.new("2.5.0")
|
53
|
-
# RuboCop dependency parallel depends on Ruby > 2.4
|
54
|
-
gem.add_development_dependency "rubocop", "0.50.0"
|
55
|
-
end
|
56
|
-
if ruby_version < Gem::Version.new("2.1.0")
|
57
|
-
# Newer versions of rexml use keyword arguments with optional arguments which
|
58
|
-
# work in Ruby 2.1 and newer.
|
59
|
-
gem.add_development_dependency "rexml", "3.2.4"
|
60
|
-
end
|
61
|
-
if ruby_version < Gem::Version.new("2.1.0")
|
62
|
-
# public_suffix 3.0 and newer don't support Ruby < 2.1
|
63
|
-
gem.add_development_dependency "public_suffix", "~> 2.0.5"
|
64
|
-
elsif ruby_version < Gem::Version.new("2.3.0")
|
65
|
-
# public_suffix 4.0 and newer don't support Ruby < 2.3
|
66
|
-
gem.add_development_dependency "public_suffix", "~> 3.1.1"
|
67
|
-
end
|
68
48
|
end
|
data/build_matrix.yml
CHANGED
@@ -61,7 +61,7 @@ semaphore: # Default `.semaphore/semaphore.yml` contents
|
|
61
61
|
- name: Validate CI setup
|
62
62
|
env_vars:
|
63
63
|
- name: RUBY_VERSION
|
64
|
-
value: 2.
|
64
|
+
value: 3.2.2
|
65
65
|
- name: GEMSET
|
66
66
|
value: no_dependencies
|
67
67
|
- name: BUNDLE_GEMFILE
|
@@ -85,7 +85,7 @@ semaphore: # Default `.semaphore/semaphore.yml` contents
|
|
85
85
|
- name: RuboCop
|
86
86
|
env_vars:
|
87
87
|
- name: RUBY_VERSION
|
88
|
-
value: 2.
|
88
|
+
value: 3.2.2
|
89
89
|
- name: GEMSET
|
90
90
|
value: no_dependencies
|
91
91
|
- name: BUNDLE_GEMFILE
|
@@ -165,45 +165,16 @@ matrix:
|
|
165
165
|
gemsets: # By default all gems are tested
|
166
166
|
none:
|
167
167
|
- "no_dependencies"
|
168
|
-
old_rails:
|
169
|
-
- "no_dependencies"
|
170
|
-
- "rails-3.2"
|
171
|
-
- "rails-4.2"
|
172
168
|
minimal:
|
173
169
|
- "no_dependencies"
|
174
|
-
- "rails-5.2"
|
175
170
|
- "rails-6.0"
|
176
171
|
- "rails-6.1"
|
177
172
|
- "rails-7.0"
|
178
173
|
|
179
174
|
ruby:
|
180
|
-
- ruby: "2.0.0-p648"
|
181
|
-
rubygems: "2.7.8"
|
182
|
-
bundler: "1.17.3"
|
183
|
-
gems: "old_rails"
|
184
|
-
- ruby: "2.1.10"
|
185
|
-
rubygems: "2.7.8"
|
186
|
-
bundler: "1.17.3"
|
187
|
-
gems: "none"
|
188
|
-
- ruby: "2.2.10"
|
189
|
-
rubygems: "2.7.8"
|
190
|
-
bundler: "1.17.3"
|
191
|
-
gems: "none"
|
192
|
-
- ruby: "2.3.8"
|
193
|
-
gems: "none"
|
194
|
-
rubygems: "3.3.26"
|
195
|
-
bundler: "2.3.26"
|
196
|
-
- ruby: "2.4.10"
|
197
|
-
gems: "none"
|
198
|
-
- ruby: "2.5.8"
|
199
|
-
gems: "minimal"
|
200
|
-
- ruby: "2.6.9"
|
201
|
-
- ruby: "2.7.7"
|
202
175
|
- ruby: "3.0.5"
|
203
176
|
- ruby: "3.1.3"
|
204
177
|
- ruby: "3.2.1"
|
205
|
-
- ruby: "jruby-9.3.9.0"
|
206
|
-
gems: "minimal"
|
207
178
|
- ruby: "jruby-9.4.0.0"
|
208
179
|
gems: "minimal"
|
209
180
|
gems:
|
@@ -233,73 +204,14 @@ matrix:
|
|
233
204
|
- "3.2.1"
|
234
205
|
- gem: "que"
|
235
206
|
- gem: "que_beta"
|
236
|
-
- gem: "rails-3.2"
|
237
|
-
bundler: "1.17.3"
|
238
|
-
only:
|
239
|
-
ruby:
|
240
|
-
- "2.0.0-p648"
|
241
|
-
- "2.1.10"
|
242
|
-
- "2.2.10"
|
243
|
-
- "2.3.8"
|
244
|
-
- "2.4.10"
|
245
|
-
- "2.5.8"
|
246
|
-
- gem: "rails-4.2"
|
247
|
-
bundler: "1.17.3"
|
248
|
-
only:
|
249
|
-
ruby:
|
250
|
-
- "2.1.10"
|
251
|
-
- "2.2.10"
|
252
|
-
- "2.3.8"
|
253
|
-
- "2.4.10"
|
254
|
-
- "2.5.8"
|
255
|
-
- gem: "rails-5.0"
|
256
|
-
only:
|
257
|
-
ruby:
|
258
|
-
- "2.0.0-p648"
|
259
|
-
- "2.1.10"
|
260
|
-
- "2.2.10"
|
261
|
-
- "2.3.8"
|
262
|
-
- "2.4.10"
|
263
|
-
- "2.5.8"
|
264
|
-
- "2.6.9"
|
265
|
-
- "2.7.7"
|
266
|
-
- gem: "rails-5.1"
|
267
|
-
only:
|
268
|
-
ruby:
|
269
|
-
- "2.0.0-p648"
|
270
|
-
- "2.1.10"
|
271
|
-
- "2.2.10"
|
272
|
-
- "2.3.8"
|
273
|
-
- "2.4.10"
|
274
|
-
- "2.5.8"
|
275
|
-
- "2.6.9"
|
276
|
-
- "2.7.7"
|
277
|
-
- gem: "rails-5.2"
|
278
|
-
only:
|
279
|
-
ruby:
|
280
|
-
- "2.0.0-p648"
|
281
|
-
- "2.1.10"
|
282
|
-
- "2.2.10"
|
283
|
-
- "2.3.8"
|
284
|
-
- "2.4.10"
|
285
|
-
- "2.5.8"
|
286
|
-
- "2.6.9"
|
287
|
-
- "2.7.7"
|
288
|
-
- "jruby-9.3.9.0"
|
289
207
|
- gem: "rails-6.0"
|
290
208
|
only:
|
291
209
|
ruby:
|
292
|
-
- "2.5.8"
|
293
|
-
- "2.6.9"
|
294
|
-
- "2.7.7"
|
295
210
|
- "3.0.5"
|
296
211
|
- "jruby-9.4.0.0"
|
297
212
|
- gem: "rails-6.1"
|
298
213
|
only:
|
299
214
|
ruby:
|
300
|
-
- "2.5.8"
|
301
|
-
- "2.6.9"
|
302
|
-
- "2.7.7"
|
303
215
|
- "3.0.5"
|
304
216
|
- "3.1.3"
|
305
217
|
- "3.2.1"
|
@@ -307,36 +219,11 @@ matrix:
|
|
307
219
|
- gem: "rails-7.0"
|
308
220
|
only:
|
309
221
|
ruby:
|
310
|
-
- "2.7.7"
|
311
222
|
- "3.0.5"
|
312
223
|
- "3.1.3"
|
313
224
|
- "3.2.1"
|
314
225
|
- "jruby-9.4.0.0"
|
315
|
-
- gem: "resque-1"
|
316
|
-
bundler: "1.17.3"
|
317
|
-
only:
|
318
|
-
ruby:
|
319
|
-
- "2.0.0-p648"
|
320
|
-
- "2.1.10"
|
321
|
-
- "2.2.10"
|
322
|
-
- "2.3.8"
|
323
|
-
- "2.4.10"
|
324
|
-
- "2.5.8"
|
325
|
-
- "2.6.9"
|
326
|
-
- "2.7.7"
|
327
|
-
- gem: "resque-2"
|
328
226
|
- gem: "sequel"
|
329
|
-
- gem: "sequel-435"
|
330
|
-
only:
|
331
|
-
ruby:
|
332
|
-
- "2.0.0-p648"
|
333
|
-
- "2.1.10"
|
334
|
-
- "2.2.10"
|
335
|
-
- "2.3.8"
|
336
|
-
- "2.4.10"
|
337
|
-
- "2.5.8"
|
338
|
-
- "2.6.9"
|
339
|
-
- "2.7.7"
|
340
227
|
- gem: "sinatra"
|
341
228
|
- gem: "webmachine1"
|
342
229
|
- gem: "webmachine2"
|
data/ext/agent.rb
CHANGED
@@ -1,12 +1,10 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
1
|
# DO NOT EDIT
|
4
2
|
# This is a generated file by the `rake ship` family of tasks in the
|
5
3
|
# appsignal-agent repository.
|
6
4
|
# Modifications to this file will be overwritten with the next agent release.
|
7
5
|
|
8
6
|
APPSIGNAL_AGENT_CONFIG = {
|
9
|
-
"version" => "
|
7
|
+
"version" => "dee4fcb",
|
10
8
|
"mirrors" => [
|
11
9
|
"https://appsignal-agent-releases.global.ssl.fastly.net",
|
12
10
|
"https://d135dj0rjqvssy.cloudfront.net"
|
@@ -14,131 +12,131 @@ APPSIGNAL_AGENT_CONFIG = {
|
|
14
12
|
"triples" => {
|
15
13
|
"x86_64-darwin" => {
|
16
14
|
"static" => {
|
17
|
-
"checksum" => "
|
15
|
+
"checksum" => "d45bfc2eb38138c317b501c3156459b8dbbb15a59910f1e2ec3d2d02e461a147",
|
18
16
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
19
17
|
},
|
20
18
|
"dynamic" => {
|
21
|
-
"checksum" => "
|
19
|
+
"checksum" => "a126901650046ae1c40affd386ab5dfcda5cb89f9bd05cf0a3087faff1d2d77d",
|
22
20
|
"filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
|
23
21
|
}
|
24
22
|
},
|
25
23
|
"universal-darwin" => {
|
26
24
|
"static" => {
|
27
|
-
"checksum" => "
|
25
|
+
"checksum" => "d45bfc2eb38138c317b501c3156459b8dbbb15a59910f1e2ec3d2d02e461a147",
|
28
26
|
"filename" => "appsignal-x86_64-darwin-all-static.tar.gz"
|
29
27
|
},
|
30
28
|
"dynamic" => {
|
31
|
-
"checksum" => "
|
29
|
+
"checksum" => "a126901650046ae1c40affd386ab5dfcda5cb89f9bd05cf0a3087faff1d2d77d",
|
32
30
|
"filename" => "appsignal-x86_64-darwin-all-dynamic.tar.gz"
|
33
31
|
}
|
34
32
|
},
|
35
33
|
"aarch64-darwin" => {
|
36
34
|
"static" => {
|
37
|
-
"checksum" => "
|
35
|
+
"checksum" => "1cd875e74ba18c2bc81533437a9eebdf08f624e0201427c13326c2be00f22907",
|
38
36
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
39
37
|
},
|
40
38
|
"dynamic" => {
|
41
|
-
"checksum" => "
|
39
|
+
"checksum" => "d2243146bf4e5839a4cf4430870b7b87d6553e1da4dc631c9fb396bba094cea4",
|
42
40
|
"filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
|
43
41
|
}
|
44
42
|
},
|
45
43
|
"arm64-darwin" => {
|
46
44
|
"static" => {
|
47
|
-
"checksum" => "
|
45
|
+
"checksum" => "1cd875e74ba18c2bc81533437a9eebdf08f624e0201427c13326c2be00f22907",
|
48
46
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
49
47
|
},
|
50
48
|
"dynamic" => {
|
51
|
-
"checksum" => "
|
49
|
+
"checksum" => "d2243146bf4e5839a4cf4430870b7b87d6553e1da4dc631c9fb396bba094cea4",
|
52
50
|
"filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
|
53
51
|
}
|
54
52
|
},
|
55
53
|
"arm-darwin" => {
|
56
54
|
"static" => {
|
57
|
-
"checksum" => "
|
55
|
+
"checksum" => "1cd875e74ba18c2bc81533437a9eebdf08f624e0201427c13326c2be00f22907",
|
58
56
|
"filename" => "appsignal-aarch64-darwin-all-static.tar.gz"
|
59
57
|
},
|
60
58
|
"dynamic" => {
|
61
|
-
"checksum" => "
|
59
|
+
"checksum" => "d2243146bf4e5839a4cf4430870b7b87d6553e1da4dc631c9fb396bba094cea4",
|
62
60
|
"filename" => "appsignal-aarch64-darwin-all-dynamic.tar.gz"
|
63
61
|
}
|
64
62
|
},
|
65
63
|
"aarch64-linux" => {
|
66
64
|
"static" => {
|
67
|
-
"checksum" => "
|
65
|
+
"checksum" => "72fbfaa1c6ed72defea9eca59679372f53ddeab845a9b2f75d9d165e4983d69e",
|
68
66
|
"filename" => "appsignal-aarch64-linux-all-static.tar.gz"
|
69
67
|
},
|
70
68
|
"dynamic" => {
|
71
|
-
"checksum" => "
|
69
|
+
"checksum" => "bf31b4836c84ceaa87a52aa85f296d40e32cfd784a8aa5b19ec5ca3a4aa5c8eb",
|
72
70
|
"filename" => "appsignal-aarch64-linux-all-dynamic.tar.gz"
|
73
71
|
}
|
74
72
|
},
|
75
73
|
"i686-linux" => {
|
76
74
|
"static" => {
|
77
|
-
"checksum" => "
|
75
|
+
"checksum" => "c504a7233512c9285274a7ba0142ab91cf4637c6f5f57c58c6890137ba0f82de",
|
78
76
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
79
77
|
},
|
80
78
|
"dynamic" => {
|
81
|
-
"checksum" => "
|
79
|
+
"checksum" => "19091f50e98afed547b73bc220770bdafce737e152ab9345dabe03e284219cc1",
|
82
80
|
"filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
|
83
81
|
}
|
84
82
|
},
|
85
83
|
"x86-linux" => {
|
86
84
|
"static" => {
|
87
|
-
"checksum" => "
|
85
|
+
"checksum" => "c504a7233512c9285274a7ba0142ab91cf4637c6f5f57c58c6890137ba0f82de",
|
88
86
|
"filename" => "appsignal-i686-linux-all-static.tar.gz"
|
89
87
|
},
|
90
88
|
"dynamic" => {
|
91
|
-
"checksum" => "
|
89
|
+
"checksum" => "19091f50e98afed547b73bc220770bdafce737e152ab9345dabe03e284219cc1",
|
92
90
|
"filename" => "appsignal-i686-linux-all-dynamic.tar.gz"
|
93
91
|
}
|
94
92
|
},
|
95
93
|
"x86_64-linux" => {
|
96
94
|
"static" => {
|
97
|
-
"checksum" => "
|
95
|
+
"checksum" => "f9e68dbbee7d38b255c5b9bc0cb75226764f79cd51421e4e00a9e7454b0c6ccb",
|
98
96
|
"filename" => "appsignal-x86_64-linux-all-static.tar.gz"
|
99
97
|
},
|
100
98
|
"dynamic" => {
|
101
|
-
"checksum" => "
|
99
|
+
"checksum" => "58e3192c87903a2abce6540b893c9d25a69f43e37fd2367df45c2c22c26068ba",
|
102
100
|
"filename" => "appsignal-x86_64-linux-all-dynamic.tar.gz"
|
103
101
|
}
|
104
102
|
},
|
105
103
|
"x86_64-linux-musl" => {
|
106
104
|
"static" => {
|
107
|
-
"checksum" => "
|
105
|
+
"checksum" => "8fa1d110d2544502509cc66ba8ec6685010d8c6d8373f4f14ebe721d4be157e0",
|
108
106
|
"filename" => "appsignal-x86_64-linux-musl-all-static.tar.gz"
|
109
107
|
},
|
110
108
|
"dynamic" => {
|
111
|
-
"checksum" => "
|
109
|
+
"checksum" => "fc46dd29864165968d96bb78fde1c8970903488d80d97056e630636c736cf86f",
|
112
110
|
"filename" => "appsignal-x86_64-linux-musl-all-dynamic.tar.gz"
|
113
111
|
}
|
114
112
|
},
|
115
113
|
"aarch64-linux-musl" => {
|
116
114
|
"static" => {
|
117
|
-
"checksum" => "
|
115
|
+
"checksum" => "a43895183baf017879332885a904208773befc14b9bd628efae6d1513052b782",
|
118
116
|
"filename" => "appsignal-aarch64-linux-musl-all-static.tar.gz"
|
119
117
|
},
|
120
118
|
"dynamic" => {
|
121
|
-
"checksum" => "
|
119
|
+
"checksum" => "7e96b29348be655066cf162ae5c15248bba7d7177663e35e60a6c5ad243937d0",
|
122
120
|
"filename" => "appsignal-aarch64-linux-musl-all-dynamic.tar.gz"
|
123
121
|
}
|
124
122
|
},
|
125
123
|
"x86_64-freebsd" => {
|
126
124
|
"static" => {
|
127
|
-
"checksum" => "
|
125
|
+
"checksum" => "1b992f770bdbced09f7b5f18d7aa721710218d4a76a131adc7affe44d68684f0",
|
128
126
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
129
127
|
},
|
130
128
|
"dynamic" => {
|
131
|
-
"checksum" => "
|
129
|
+
"checksum" => "300b718986c10ff65f237e1d74086e9cc0f7079d7b531e3b6f9a64752f1aa6ee",
|
132
130
|
"filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
|
133
131
|
}
|
134
132
|
},
|
135
133
|
"amd64-freebsd" => {
|
136
134
|
"static" => {
|
137
|
-
"checksum" => "
|
135
|
+
"checksum" => "1b992f770bdbced09f7b5f18d7aa721710218d4a76a131adc7affe44d68684f0",
|
138
136
|
"filename" => "appsignal-x86_64-freebsd-all-static.tar.gz"
|
139
137
|
},
|
140
138
|
"dynamic" => {
|
141
|
-
"checksum" => "
|
139
|
+
"checksum" => "300b718986c10ff65f237e1d74086e9cc0f7079d7b531e3b6f9a64752f1aa6ee",
|
142
140
|
"filename" => "appsignal-x86_64-freebsd-all-dynamic.tar.gz"
|
143
141
|
}
|
144
142
|
}
|
data/lib/appsignal/config.rb
CHANGED
@@ -324,7 +324,7 @@ module Appsignal
|
|
324
324
|
ENV["_APPSIGNAL_ENABLE_HOST_METRICS"] = config_hash[:enable_host_metrics].to_s
|
325
325
|
ENV["_APPSIGNAL_ENABLE_STATSD"] = config_hash[:enable_statsd].to_s
|
326
326
|
ENV["_APPSIGNAL_ENABLE_NGINX_METRICS"] = config_hash[:enable_nginx_metrics].to_s
|
327
|
-
ENV["
|
327
|
+
ENV["_APPSIGNAL_ENVIRONMENT"] = env
|
328
328
|
ENV["_APPSIGNAL_FILES_WORLD_ACCESSIBLE"] = config_hash[:files_world_accessible].to_s
|
329
329
|
ENV["_APPSIGNAL_FILTER_PARAMETERS"] = config_hash[:filter_parameters].join(",")
|
330
330
|
ENV["_APPSIGNAL_FILTER_SESSION_DATA"] = config_hash[:filter_session_data].join(",")
|
data/lib/appsignal/logger.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
require "logger"
|
4
4
|
require "set"
|
5
|
+
require "thread"
|
5
6
|
|
6
7
|
module Appsignal
|
7
8
|
# Logger that flushes logs to the AppSignal logging service
|
@@ -27,12 +28,13 @@ module Appsignal
|
|
27
28
|
@group = group
|
28
29
|
@level = level
|
29
30
|
@format = format
|
31
|
+
@mutex = Mutex.new
|
30
32
|
end
|
31
33
|
|
32
34
|
# We support the various methods in the Ruby
|
33
35
|
# logger class by supplying this method.
|
34
36
|
# @api private
|
35
|
-
def add(severity, message = nil, group = nil
|
37
|
+
def add(severity, message = nil, group = nil)
|
36
38
|
severity ||= UNKNOWN
|
37
39
|
return true if severity < level
|
38
40
|
group = @group if group.nil?
|
@@ -52,7 +54,7 @@ module Appsignal
|
|
52
54
|
SEVERITY_MAP.fetch(severity, 0),
|
53
55
|
@format,
|
54
56
|
message,
|
55
|
-
Appsignal::Utils::Data.generate(
|
57
|
+
Appsignal::Utils::Data.generate(appsignal_attributes)
|
56
58
|
)
|
57
59
|
end
|
58
60
|
alias log add
|
@@ -65,7 +67,7 @@ module Appsignal
|
|
65
67
|
return if DEBUG < level
|
66
68
|
message = yield if message.nil? && block_given?
|
67
69
|
return if message.nil?
|
68
|
-
|
70
|
+
add_with_attributes(DEBUG, message, @group, attributes)
|
69
71
|
end
|
70
72
|
|
71
73
|
# Log an info level message
|
@@ -76,7 +78,7 @@ module Appsignal
|
|
76
78
|
return if INFO < level
|
77
79
|
message = yield if message.nil? && block_given?
|
78
80
|
return if message.nil?
|
79
|
-
|
81
|
+
add_with_attributes(INFO, message, @group, attributes)
|
80
82
|
end
|
81
83
|
|
82
84
|
# Log a warn level message
|
@@ -87,7 +89,7 @@ module Appsignal
|
|
87
89
|
return if WARN < level
|
88
90
|
message = yield if message.nil? && block_given?
|
89
91
|
return if message.nil?
|
90
|
-
|
92
|
+
add_with_attributes(WARN, message, @group, attributes)
|
91
93
|
end
|
92
94
|
|
93
95
|
# Log an error level message
|
@@ -98,7 +100,7 @@ module Appsignal
|
|
98
100
|
return if ERROR < level
|
99
101
|
message = yield if message.nil? && block_given?
|
100
102
|
return if message.nil?
|
101
|
-
|
103
|
+
add_with_attributes(ERROR, message, @group, attributes)
|
102
104
|
end
|
103
105
|
|
104
106
|
# Log a fatal level message
|
@@ -109,7 +111,20 @@ module Appsignal
|
|
109
111
|
return if FATAL < level
|
110
112
|
message = yield if message.nil? && block_given?
|
111
113
|
return if message.nil?
|
112
|
-
|
114
|
+
add_with_attributes(FATAL, message, @group, attributes)
|
115
|
+
end
|
116
|
+
|
117
|
+
private
|
118
|
+
|
119
|
+
def add_with_attributes(severity, message, group, attributes)
|
120
|
+
Thread.current[:appsignal_logger_attributes] = attributes
|
121
|
+
add(severity, message, group)
|
122
|
+
ensure
|
123
|
+
Thread.current[:appsignal_logger_attributes] = nil
|
124
|
+
end
|
125
|
+
|
126
|
+
def appsignal_attributes
|
127
|
+
Thread.current.fetch(:appsignal_logger_attributes, {})
|
113
128
|
end
|
114
129
|
end
|
115
130
|
end
|
data/lib/appsignal/version.rb
CHANGED
@@ -622,7 +622,7 @@ describe Appsignal::Config do
|
|
622
622
|
expect(ENV["_APPSIGNAL_PUSH_API_ENDPOINT"]).to eq "https://push.appsignal.com"
|
623
623
|
expect(ENV["_APPSIGNAL_PUSH_API_KEY"]).to eq "abc"
|
624
624
|
expect(ENV["_APPSIGNAL_APP_NAME"]).to eq "TestApp"
|
625
|
-
expect(ENV["
|
625
|
+
expect(ENV["_APPSIGNAL_ENVIRONMENT"]).to eq "production"
|
626
626
|
expect(ENV["_APPSIGNAL_LANGUAGE_INTEGRATION_VERSION"]).to eq "ruby-#{Appsignal::VERSION}"
|
627
627
|
expect(ENV["_APPSIGNAL_HTTP_PROXY"]).to eq "http://localhost"
|
628
628
|
expect(ENV["_APPSIGNAL_IGNORE_ACTIONS"]).to eq "action1,action2"
|
@@ -76,13 +76,15 @@ describe Appsignal::Logger do
|
|
76
76
|
].each do |method|
|
77
77
|
describe "##{method[0]}" do
|
78
78
|
it "should log with a message" do
|
79
|
+
# rubocop:disable Style/BracesAroundHashParameters
|
79
80
|
expect(Appsignal::Utils::Data).to receive(:generate)
|
80
|
-
.with({})
|
81
|
+
.with({ :attribute => "value" })
|
81
82
|
.and_call_original
|
83
|
+
# rubocop:enable Style/BracesAroundHashParameters
|
82
84
|
expect(Appsignal::Extension).to receive(:log)
|
83
85
|
.with("group", method[1], 0, "Log message", instance_of(Appsignal::Extension::Data))
|
84
86
|
|
85
|
-
logger.send(method[0], "Log message")
|
87
|
+
logger.send(method[0], "Log message", :attribute => "value")
|
86
88
|
end
|
87
89
|
|
88
90
|
it "should log with a block" do
|