appsignal 2.7.3.beta.2-java → 2.8.0.alpha.1-java
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -11
- data/ext/agent.yml +35 -35
- data/ext/extconf.rb +0 -12
- data/lib/appsignal/cli/diagnose.rb +1 -11
- data/lib/appsignal/cli/install.rb +2 -2
- data/lib/appsignal/config.rb +1 -0
- data/lib/appsignal/garbage_collection_profiler.rb +0 -11
- data/lib/appsignal/system.rb +4 -6
- data/lib/appsignal/transaction.rb +1 -2
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/cli/diagnose_spec.rb +0 -18
- data/spec/lib/appsignal/config_spec.rb +1 -0
- data/spec/lib/appsignal/event_formatter/elastic_search/search_formatter_spec.rb +1 -1
- data/spec/lib/appsignal/extension_spec.rb +2 -5
- data/spec/lib/appsignal/garbage_collection_profiler_spec.rb +0 -10
- data/spec/lib/appsignal/system_spec.rb +1 -1
- data/spec/lib/appsignal/transaction_spec.rb +7 -24
- 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: 239421689e186297ec12140f6fb8b31c1036f69fedfe96fbef6d38d4128b39cb
|
|
4
|
+
data.tar.gz: facbbd23780eb8ae0858e416a48345849a0cd4342c3e403fe0768940f2193602
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2aa20ac503d3407641e7e4fa2dff68f20c06c5ed07ef83ab28906133df15749599c150886f0a3953e6e0e150fe7206adf2db192321705b4b0aef723aa1376d07
|
|
7
|
+
data.tar.gz: 2babcf1d9922648c79be50668e2ed6ce7e6e2563f24e2d75187f49960d790500fcc7a7bba38bcd6cb9bec6ac6bf89985dd2996a21b75f02cd61e47b60505426b
|
data/CHANGELOG.md
CHANGED
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
# 2.
|
|
2
|
-
-
|
|
3
|
-
- Add user and group context to agent logs. PR #436
|
|
4
|
-
- Fixes for running with multiple users
|
|
1
|
+
# 2.8.0 (unreleased)
|
|
2
|
+
- Support memory host metrics collection for containers. PR #428
|
|
5
3
|
|
|
6
|
-
# 2.7.
|
|
7
|
-
- Change the order of instructions in the install script for Rails. PR #433
|
|
8
|
-
- Fix linking issues on multi-stage build setups. PR #434
|
|
9
|
-
|
|
10
|
-
# 2.7.1
|
|
4
|
+
# 2.7.1 (unreleased)
|
|
11
5
|
- Improve error log on unsupported architecture and build combination on
|
|
12
6
|
install. PR #426
|
|
13
|
-
- Improve performance when garbage collection profiling is disabled. PR #429
|
|
14
7
|
|
|
15
8
|
# 2.7.0
|
|
16
9
|
- Detect Kubernetes containers as containers for `running_in_container`
|
|
@@ -529,7 +522,7 @@ Yanked
|
|
|
529
522
|
* Debug log about missing name in config
|
|
530
523
|
|
|
531
524
|
# 0.10.4
|
|
532
|
-
* Add REQUEST_URI and PATH_INFO to env params
|
|
525
|
+
* Add REQUEST_URI and PATH_INFO to env params whitelist
|
|
533
526
|
|
|
534
527
|
# 0.10.3
|
|
535
528
|
* Shut down all operations when agent is not active
|
data/ext/agent.yml
CHANGED
|
@@ -1,64 +1,64 @@
|
|
|
1
1
|
---
|
|
2
|
-
version:
|
|
2
|
+
version: 01362a4
|
|
3
3
|
triples:
|
|
4
4
|
x86_64-darwin:
|
|
5
5
|
static:
|
|
6
|
-
checksum:
|
|
7
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
6
|
+
checksum: a33aa14ae9b8c58c379667e7f79807bdc843354baf635abc334a14c3b984114d
|
|
7
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-x86_64-darwin-all-static.tar.gz
|
|
8
8
|
dynamic:
|
|
9
|
-
checksum:
|
|
10
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
9
|
+
checksum: 9956fc35234bbd0f01095ee9032dbf3631d424bdf51536b50c59e8f765834ce1
|
|
10
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-x86_64-darwin-all-dynamic.tar.gz
|
|
11
11
|
universal-darwin:
|
|
12
12
|
static:
|
|
13
|
-
checksum:
|
|
14
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
13
|
+
checksum: a33aa14ae9b8c58c379667e7f79807bdc843354baf635abc334a14c3b984114d
|
|
14
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-x86_64-darwin-all-static.tar.gz
|
|
15
15
|
dynamic:
|
|
16
|
-
checksum:
|
|
17
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
16
|
+
checksum: 9956fc35234bbd0f01095ee9032dbf3631d424bdf51536b50c59e8f765834ce1
|
|
17
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-x86_64-darwin-all-dynamic.tar.gz
|
|
18
18
|
i686-linux:
|
|
19
19
|
static:
|
|
20
|
-
checksum:
|
|
21
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
20
|
+
checksum: 44d729dd8b3c6bf3041ee32dee1c155bfd19b5309cbf6ef95959fc026819915c
|
|
21
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-i686-linux-all-static.tar.gz
|
|
22
22
|
dynamic:
|
|
23
|
-
checksum:
|
|
24
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
23
|
+
checksum: 30fa55577862addebe16b0fddfdd73c6613f321d769606f15bbd14be8850aa68
|
|
24
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-i686-linux-all-dynamic.tar.gz
|
|
25
25
|
x86-linux:
|
|
26
26
|
static:
|
|
27
|
-
checksum:
|
|
28
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
27
|
+
checksum: 44d729dd8b3c6bf3041ee32dee1c155bfd19b5309cbf6ef95959fc026819915c
|
|
28
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-i686-linux-all-static.tar.gz
|
|
29
29
|
dynamic:
|
|
30
|
-
checksum:
|
|
31
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
30
|
+
checksum: 30fa55577862addebe16b0fddfdd73c6613f321d769606f15bbd14be8850aa68
|
|
31
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-i686-linux-all-dynamic.tar.gz
|
|
32
32
|
i686-linux-musl:
|
|
33
33
|
static:
|
|
34
|
-
checksum:
|
|
35
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
34
|
+
checksum: 0bb69e60781db9bd0867ccece63a029706cf0d5a26d34d70668bc2264b531ce4
|
|
35
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-i686-linux-musl-all-static.tar.gz
|
|
36
36
|
x86-linux-musl:
|
|
37
37
|
static:
|
|
38
|
-
checksum:
|
|
39
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
38
|
+
checksum: 0bb69e60781db9bd0867ccece63a029706cf0d5a26d34d70668bc2264b531ce4
|
|
39
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-i686-linux-musl-all-static.tar.gz
|
|
40
40
|
x86_64-linux:
|
|
41
41
|
static:
|
|
42
|
-
checksum:
|
|
43
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
42
|
+
checksum: 92b3662722978b39176c9d2e986fb8cc527772470dd0d9d7a8ea808cd4780b70
|
|
43
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-x86_64-linux-all-static.tar.gz
|
|
44
44
|
dynamic:
|
|
45
|
-
checksum:
|
|
46
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
45
|
+
checksum: 3a9af3a4280b9842702d8af6cc4af84acc452b910fc8d753ee5907807de8f58c
|
|
46
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-x86_64-linux-all-dynamic.tar.gz
|
|
47
47
|
x86_64-linux-musl:
|
|
48
48
|
static:
|
|
49
|
-
checksum:
|
|
50
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
49
|
+
checksum: 41624a50b603eeb4f875ee19dde41bb0877a0a039f6f2f560a9efc3d6b73a195
|
|
50
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-x86_64-linux-musl-all-static.tar.gz
|
|
51
51
|
x86_64-freebsd:
|
|
52
52
|
static:
|
|
53
|
-
checksum:
|
|
54
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
53
|
+
checksum: 14cdca07045a53b2c69647f1255cbc2f9fe322ddf6040c2e1a6ba36aa482cdf2
|
|
54
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-x86_64-freebsd-all-static.tar.gz
|
|
55
55
|
dynamic:
|
|
56
|
-
checksum:
|
|
57
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
56
|
+
checksum: 0433b4cd9e0af92b8b4efdb797de43129f754b71a04c2313786d571866092675
|
|
57
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
|
58
58
|
amd64-freebsd:
|
|
59
59
|
static:
|
|
60
|
-
checksum:
|
|
61
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
60
|
+
checksum: 14cdca07045a53b2c69647f1255cbc2f9fe322ddf6040c2e1a6ba36aa482cdf2
|
|
61
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-x86_64-freebsd-all-static.tar.gz
|
|
62
62
|
dynamic:
|
|
63
|
-
checksum:
|
|
64
|
-
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/
|
|
63
|
+
checksum: 0433b4cd9e0af92b8b4efdb797de43129f754b71a04c2313786d571866092675
|
|
64
|
+
download_url: https://appsignal-agent-releases.global.ssl.fastly.net/01362a4/appsignal-x86_64-freebsd-all-dynamic.tar.gz
|
data/ext/extconf.rb
CHANGED
|
@@ -23,18 +23,6 @@ def install
|
|
|
23
23
|
elsif !find_executable("appsignal-agent", EXT_PATH)
|
|
24
24
|
installation_failed "Aborting installation, appsignal-agent not found"
|
|
25
25
|
else
|
|
26
|
-
with_static_link = [
|
|
27
|
-
Appsignal::System::LINUX_TARGET,
|
|
28
|
-
Appsignal::System::MUSL_TARGET
|
|
29
|
-
].include?(PLATFORM)
|
|
30
|
-
if with_static_link
|
|
31
|
-
# Statically link libgcc and libgcc_s libraries.
|
|
32
|
-
# Dependencies of the libappsignal extension library.
|
|
33
|
-
# If the gem is installed on a host with build tools installed, but is
|
|
34
|
-
# run on one that isn't the missing libraries will cause the extension
|
|
35
|
-
# to fail on start.
|
|
36
|
-
$LDFLAGS += " -static-libgcc" # rubocop:disable Style/GlobalVars
|
|
37
|
-
end
|
|
38
26
|
create_makefile "appsignal_extension"
|
|
39
27
|
logger.info "Successfully created Makefile for appsignal extension"
|
|
40
28
|
end
|
|
@@ -225,8 +225,7 @@ module Appsignal
|
|
|
225
225
|
output = test["output"]
|
|
226
226
|
|
|
227
227
|
print " #{definition[:label]}: "
|
|
228
|
-
display_value =
|
|
229
|
-
definition[:values] ? definition[:values][value] : value
|
|
228
|
+
display_value = definition[:values][value]
|
|
230
229
|
print display_value.nil? ? "-" : display_value
|
|
231
230
|
print "\n Error: #{error}" if error
|
|
232
231
|
print "\n Output: #{output}" if output
|
|
@@ -250,10 +249,6 @@ module Appsignal
|
|
|
250
249
|
:values => { true => "started", false => "not started" }
|
|
251
250
|
}
|
|
252
251
|
},
|
|
253
|
-
"host" => {
|
|
254
|
-
"uid" => { :label => "Agent user id" },
|
|
255
|
-
"gid" => { :label => "Agent user group id" }
|
|
256
|
-
},
|
|
257
252
|
"config" => {
|
|
258
253
|
"valid" => {
|
|
259
254
|
:label => "Agent config",
|
|
@@ -266,11 +261,6 @@ module Appsignal
|
|
|
266
261
|
:values => { true => "started", false => "not started" }
|
|
267
262
|
}
|
|
268
263
|
},
|
|
269
|
-
"working_directory_stat" => {
|
|
270
|
-
"uid" => { :label => "Agent working directory user id" },
|
|
271
|
-
"gid" => { :label => "Agent working directory user group id" },
|
|
272
|
-
"mode" => { :label => "Agent working directory permissions" }
|
|
273
|
-
},
|
|
274
264
|
"lock_path" => {
|
|
275
265
|
"created" => {
|
|
276
266
|
:label => "Agent lock path",
|
|
@@ -73,10 +73,10 @@ module Appsignal
|
|
|
73
73
|
end
|
|
74
74
|
|
|
75
75
|
def install_for_rails(config)
|
|
76
|
-
puts "Installing for Ruby on Rails"
|
|
77
|
-
|
|
78
76
|
require File.expand_path(File.join(Dir.pwd, "config/application.rb"))
|
|
79
77
|
|
|
78
|
+
puts "Installing for Ruby on Rails"
|
|
79
|
+
|
|
80
80
|
config[:name] = Rails.application.class.parent_name
|
|
81
81
|
|
|
82
82
|
name_overwritten = yes_or_no(" Your app's name is: '#{config[:name]}' \n Do you want to change how this is displayed in AppSignal? (y/n): ")
|
data/lib/appsignal/config.rb
CHANGED
|
@@ -166,6 +166,7 @@ module Appsignal
|
|
|
166
166
|
ENV["_APPSIGNAL_IGNORE_ACTIONS"] = config_hash[:ignore_actions].join(",")
|
|
167
167
|
ENV["_APPSIGNAL_IGNORE_ERRORS"] = config_hash[:ignore_errors].join(",")
|
|
168
168
|
ENV["_APPSIGNAL_IGNORE_NAMESPACES"] = config_hash[:ignore_namespaces].join(",")
|
|
169
|
+
ENV["_APPSIGNAL_SEND_PARAMS"] = config_hash[:send_params].to_s
|
|
169
170
|
ENV["_APPSIGNAL_RUNNING_IN_CONTAINER"] = config_hash[:running_in_container].to_s
|
|
170
171
|
ENV["_APPSIGNAL_WORKING_DIR_PATH"] = config_hash[:working_dir_path] if config_hash[:working_dir_path]
|
|
171
172
|
ENV["_APPSIGNAL_WORKING_DIRECTORY_PATH"] = config_hash[:working_directory_path] if config_hash[:working_directory_path]
|
|
@@ -47,15 +47,4 @@ module Appsignal
|
|
|
47
47
|
self.class.lock
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
|
-
|
|
51
|
-
# {Appsignal::NilGarbageCollectionProfiler} is a dummy profiler
|
|
52
|
-
# that always returns 0 as the total time.
|
|
53
|
-
# Used when we don't want any profile information
|
|
54
|
-
#
|
|
55
|
-
# @api private
|
|
56
|
-
class NilGarbageCollectionProfiler
|
|
57
|
-
def total_time
|
|
58
|
-
0
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
50
|
end
|
data/lib/appsignal/system.rb
CHANGED
|
@@ -7,9 +7,7 @@ module Appsignal
|
|
|
7
7
|
#
|
|
8
8
|
# @api private
|
|
9
9
|
module System
|
|
10
|
-
LINUX_TARGET = "linux".freeze
|
|
11
10
|
MUSL_TARGET = "linux-musl".freeze
|
|
12
|
-
FREEBSD_TARGET = "freebsd".freeze
|
|
13
11
|
GEM_EXT_PATH = File.expand_path("../../../ext", __FILE__).freeze
|
|
14
12
|
|
|
15
13
|
def self.heroku?
|
|
@@ -47,12 +45,12 @@ module Appsignal
|
|
|
47
45
|
host_os = RbConfig::CONFIG["host_os"].downcase
|
|
48
46
|
local_os =
|
|
49
47
|
case host_os
|
|
50
|
-
when
|
|
51
|
-
|
|
48
|
+
when /linux/
|
|
49
|
+
"linux"
|
|
52
50
|
when /darwin/
|
|
53
51
|
"darwin"
|
|
54
|
-
when
|
|
55
|
-
|
|
52
|
+
when /freebsd/
|
|
53
|
+
"freebsd"
|
|
56
54
|
else
|
|
57
55
|
host_os
|
|
58
56
|
end
|
|
@@ -53,8 +53,7 @@ module Appsignal
|
|
|
53
53
|
end
|
|
54
54
|
|
|
55
55
|
def garbage_collection_profiler
|
|
56
|
-
@garbage_collection_profiler ||=
|
|
57
|
-
Appsignal.config[:enable_gc_instrumentation] ? Appsignal::GarbageCollectionProfiler.new : NilGarbageCollectionProfiler.new
|
|
56
|
+
@garbage_collection_profiler ||= Appsignal::GarbageCollectionProfiler.new
|
|
58
57
|
end
|
|
59
58
|
end
|
|
60
59
|
|
data/lib/appsignal/version.rb
CHANGED
|
@@ -205,22 +205,13 @@ describe Appsignal::CLI::Diagnose, :api_stub => true, :report => true do
|
|
|
205
205
|
end
|
|
206
206
|
|
|
207
207
|
describe "agent diagnostics" do
|
|
208
|
-
let(:working_directory_stat) { File.stat("/tmp/appsignal") }
|
|
209
|
-
|
|
210
208
|
it "starts the agent in diagnose mode and outputs the report" do
|
|
211
209
|
run
|
|
212
|
-
working_directory_stat = File.stat("/tmp/appsignal")
|
|
213
210
|
expect(output).to include \
|
|
214
211
|
"Agent diagnostics",
|
|
215
212
|
" Extension config: valid",
|
|
216
|
-
" Agent started: started",
|
|
217
|
-
" Agent user id: #{Process.uid}",
|
|
218
|
-
" Agent user group id: #{Process.gid}",
|
|
219
213
|
" Agent config: valid",
|
|
220
214
|
" Agent logger: started",
|
|
221
|
-
" Agent working directory user id: #{working_directory_stat.uid}",
|
|
222
|
-
" Agent working directory user group id: #{working_directory_stat.gid}",
|
|
223
|
-
" Agent working directory permissions: #{working_directory_stat.mode}",
|
|
224
215
|
" Agent lock path: writable"
|
|
225
216
|
end
|
|
226
217
|
|
|
@@ -232,17 +223,8 @@ describe Appsignal::CLI::Diagnose, :api_stub => true, :report => true do
|
|
|
232
223
|
},
|
|
233
224
|
"agent" => {
|
|
234
225
|
"boot" => { "started" => { "result" => true } },
|
|
235
|
-
"host" => {
|
|
236
|
-
"uid" => { "result" => Process.uid },
|
|
237
|
-
"gid" => { "result" => Process.gid }
|
|
238
|
-
},
|
|
239
226
|
"config" => { "valid" => { "result" => true } },
|
|
240
227
|
"logger" => { "started" => { "result" => true } },
|
|
241
|
-
"working_directory_stat" => {
|
|
242
|
-
"uid" => { "result" => working_directory_stat.uid },
|
|
243
|
-
"gid" => { "result" => working_directory_stat.gid },
|
|
244
|
-
"mode" => { "result" => working_directory_stat.mode }
|
|
245
|
-
},
|
|
246
228
|
"lock_path" => { "created" => { "result" => true } }
|
|
247
229
|
}
|
|
248
230
|
)
|
|
@@ -432,6 +432,7 @@ describe Appsignal::Config do
|
|
|
432
432
|
expect(ENV["_APPSIGNAL_IGNORE_ACTIONS"]).to eq "action1,action2"
|
|
433
433
|
expect(ENV["_APPSIGNAL_IGNORE_ERRORS"]).to eq "ExampleStandardError,AnotherError"
|
|
434
434
|
expect(ENV["_APPSIGNAL_IGNORE_NAMESPACES"]).to eq "admin,private_namespace"
|
|
435
|
+
expect(ENV["_APPSIGNAL_SEND_PARAMS"]).to eq "true"
|
|
435
436
|
expect(ENV["_APPSIGNAL_RUNNING_IN_CONTAINER"]).to eq "false"
|
|
436
437
|
expect(ENV["_APPSIGNAL_ENABLE_HOST_METRICS"]).to eq "true"
|
|
437
438
|
expect(ENV["_APPSIGNAL_ENABLE_MINUTELY_PROBES"]).to eq "false"
|
|
@@ -35,7 +35,7 @@ describe Appsignal::EventFormatter::ElasticSearch::SearchFormatter do
|
|
|
35
35
|
}
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
it "should sanitize non-
|
|
38
|
+
it "should sanitize non-whitelisted params" do
|
|
39
39
|
expect(
|
|
40
40
|
formatter.sanitized_search(search)
|
|
41
41
|
).to eql(:index => "users", :type => "user", :q => "?", :other => "?")
|
|
@@ -29,11 +29,8 @@ describe Appsignal::Extension do
|
|
|
29
29
|
subject.start
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
expect(output).to
|
|
33
|
-
|
|
34
|
-
WARNING:\sError\swhen\sreading\sappsignal\sconfig,\s
|
|
35
|
-
appsignal\s\(as\s(\d{2,4})/(\d{2,4})\)\snot\sstarting
|
|
36
|
-
}x
|
|
32
|
+
expect(output).to include \
|
|
33
|
+
"WARNING: Error when reading appsignal config, appsignal not starting"
|
|
37
34
|
end
|
|
38
35
|
end
|
|
39
36
|
|
|
@@ -64,13 +64,3 @@ describe Appsignal::GarbageCollectionProfiler do
|
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
66
|
end
|
|
67
|
-
|
|
68
|
-
describe Appsignal::NilGarbageCollectionProfiler do
|
|
69
|
-
let(:profiler) { described_class.new }
|
|
70
|
-
|
|
71
|
-
describe "#total_time" do
|
|
72
|
-
it "has a total time of 0" do
|
|
73
|
-
expect(profiler.total_time).to eq(0)
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
end
|
|
@@ -672,23 +672,6 @@ describe Appsignal::Transaction do
|
|
|
672
672
|
end
|
|
673
673
|
end
|
|
674
674
|
|
|
675
|
-
describe "#garbage_collection_profiler" do
|
|
676
|
-
before { Appsignal::Transaction.instance_variable_set(:@garbage_collection_profiler, nil) }
|
|
677
|
-
|
|
678
|
-
it "returns the NilGarbageCollectionProfiler" do
|
|
679
|
-
expect(Appsignal::Transaction.garbage_collection_profiler).to be_a(Appsignal::NilGarbageCollectionProfiler)
|
|
680
|
-
end
|
|
681
|
-
|
|
682
|
-
context "when gc profiling is enabled" do
|
|
683
|
-
before { Appsignal.config.config_hash[:enable_gc_instrumentation] = true }
|
|
684
|
-
after { Appsignal.config.config_hash[:enable_gc_instrumentation] = false }
|
|
685
|
-
|
|
686
|
-
it "returns the GarbageCollectionProfiler" do
|
|
687
|
-
expect(Appsignal::Transaction.garbage_collection_profiler).to be_a(Appsignal::GarbageCollectionProfiler)
|
|
688
|
-
end
|
|
689
|
-
end
|
|
690
|
-
end
|
|
691
|
-
|
|
692
675
|
describe "#start_event" do
|
|
693
676
|
it "should start the event in the extension" do
|
|
694
677
|
expect(transaction.ext).to receive(:start_event).with(0).and_call_original
|
|
@@ -1003,7 +986,7 @@ describe Appsignal::Transaction do
|
|
|
1003
986
|
end
|
|
1004
987
|
|
|
1005
988
|
describe "#sanitized_environment" do
|
|
1006
|
-
let(:
|
|
989
|
+
let(:whitelisted_keys) { Appsignal.config[:request_headers] }
|
|
1007
990
|
subject { transaction.send(:sanitized_environment) }
|
|
1008
991
|
|
|
1009
992
|
context "when request is nil" do
|
|
@@ -1021,14 +1004,14 @@ describe Appsignal::Transaction do
|
|
|
1021
1004
|
context "when env is present" do
|
|
1022
1005
|
let(:env) do
|
|
1023
1006
|
{}.tap do |hash|
|
|
1024
|
-
|
|
1025
|
-
hash[
|
|
1026
|
-
hash[:
|
|
1007
|
+
whitelisted_keys.each { |o| hash[o] = 1 } # use all whitelisted keys
|
|
1008
|
+
hash[whitelisted_keys] = nil # don't add if nil
|
|
1009
|
+
hash[:not_whitelisted] = "I will be sanitized"
|
|
1027
1010
|
end
|
|
1028
1011
|
end
|
|
1029
1012
|
|
|
1030
|
-
it "only sets
|
|
1031
|
-
expect(subject.keys).to match_array(
|
|
1013
|
+
it "only sets whitelisted keys" do
|
|
1014
|
+
expect(subject.keys).to match_array(whitelisted_keys)
|
|
1032
1015
|
end
|
|
1033
1016
|
|
|
1034
1017
|
context "with configured request_headers" do
|
|
@@ -1036,7 +1019,7 @@ describe Appsignal::Transaction do
|
|
|
1036
1019
|
Appsignal.config.config_hash[:request_headers] = %w[CONTENT_LENGTH]
|
|
1037
1020
|
end
|
|
1038
1021
|
|
|
1039
|
-
it "only sets
|
|
1022
|
+
it "only sets whitelisted keys" do
|
|
1040
1023
|
expect(subject.keys).to match_array(%w[CONTENT_LENGTH])
|
|
1041
1024
|
end
|
|
1042
1025
|
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: 2.
|
|
4
|
+
version: 2.8.0.alpha.1
|
|
5
5
|
platform: java
|
|
6
6
|
authors:
|
|
7
7
|
- Robert Beekman
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2018-
|
|
12
|
+
date: 2018-09-05 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rack
|