appsignal 2.11.0.beta.5 → 2.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/appsignal/config.rb +47 -15
- data/lib/appsignal/version.rb +1 -1
- data/spec/lib/appsignal/config_spec.rb +18 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 729af361ecc593072a0ff944ebc54f5fc3f11153e645240eab9510bb9bc6d864
|
4
|
+
data.tar.gz: a4f1867b5cb1fdc6cee90b846bc3dd6ff2b8c7bea4d0665188517b857eaddac2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e522ef35f000186b9182d3f97d921e97649abb15bb70ee040b05d60f2e7bc6e5329ac55520476f23613a304e708b924043aeea049c1ae12370de769e592de603
|
7
|
+
data.tar.gz: 00aa8330ec753a31c30b511a6f9aab3f63d8b14dd9f07d87bb154cb10de1617bd80318d1582f3113d4438511c82a6f8a9f9274e719e98536e6aae4aa204abbe8
|
data/CHANGELOG.md
CHANGED
@@ -27,6 +27,10 @@
|
|
27
27
|
- Update AuthCheck class to use DeprecationMessage helper. PR #649
|
28
28
|
- Print extension load error when AppSignal is loaded. PR #651
|
29
29
|
|
30
|
+
# 2.10.12
|
31
|
+
- Fix `working_directory_path` config option loaded from environment variables.
|
32
|
+
PR #653
|
33
|
+
|
30
34
|
# 2.10.11
|
31
35
|
- Fix extension install report status output in `appsignal diagnose`. PR #636
|
32
36
|
- Support setting a specific configuration file to load with the
|
data/lib/appsignal/config.rb
CHANGED
@@ -81,6 +81,50 @@ module Appsignal
|
|
81
81
|
"APPSIGNAL_TRANSACTION_DEBUG_MODE" => :transaction_debug_mode,
|
82
82
|
"APP_REVISION" => :revision
|
83
83
|
}.freeze
|
84
|
+
# @api private
|
85
|
+
ENV_STRING_KEYS = %w[
|
86
|
+
APPSIGNAL_APP_NAME
|
87
|
+
APPSIGNAL_CA_FILE_PATH
|
88
|
+
APPSIGNAL_DNS_SERVERS
|
89
|
+
APPSIGNAL_FRONTEND_ERROR_CATCHING_PATH
|
90
|
+
APPSIGNAL_HOSTNAME
|
91
|
+
APPSIGNAL_HTTP_PROXY
|
92
|
+
APPSIGNAL_LOG
|
93
|
+
APPSIGNAL_LOG_PATH
|
94
|
+
APPSIGNAL_PUSH_API_ENDPOINT
|
95
|
+
APPSIGNAL_PUSH_API_KEY
|
96
|
+
APPSIGNAL_WORKING_DIRECTORY_PATH
|
97
|
+
APPSIGNAL_WORKING_DIR_PATH
|
98
|
+
APP_REVISION
|
99
|
+
].freeze
|
100
|
+
# @api private
|
101
|
+
ENV_BOOLEAN_KEYS = %w[
|
102
|
+
APPSIGNAL_ACTIVE
|
103
|
+
APPSIGNAL_DEBUG
|
104
|
+
APPSIGNAL_ENABLE_ALLOCATION_TRACKING
|
105
|
+
APPSIGNAL_ENABLE_FRONTEND_ERROR_CATCHING
|
106
|
+
APPSIGNAL_ENABLE_GC_INSTRUMENTATION
|
107
|
+
APPSIGNAL_ENABLE_HOST_METRICS
|
108
|
+
APPSIGNAL_ENABLE_MINUTELY_PROBES
|
109
|
+
APPSIGNAL_FILES_WORLD_ACCESSIBLE
|
110
|
+
APPSIGNAL_INSTRUMENT_NET_HTTP
|
111
|
+
APPSIGNAL_INSTRUMENT_REDIS
|
112
|
+
APPSIGNAL_INSTRUMENT_SEQUEL
|
113
|
+
APPSIGNAL_RUNNING_IN_CONTAINER
|
114
|
+
APPSIGNAL_SEND_ENVIRONMENT_METADATA
|
115
|
+
APPSIGNAL_SEND_PARAMS
|
116
|
+
APPSIGNAL_SKIP_SESSION_DATA
|
117
|
+
APPSIGNAL_TRANSACTION_DEBUG_MODE
|
118
|
+
].freeze
|
119
|
+
# @api private
|
120
|
+
ENV_ARRAY_KEYS = %w[
|
121
|
+
APPSIGNAL_FILTER_PARAMETERS
|
122
|
+
APPSIGNAL_FILTER_SESSION_DATA
|
123
|
+
APPSIGNAL_IGNORE_ACTIONS
|
124
|
+
APPSIGNAL_IGNORE_ERRORS
|
125
|
+
APPSIGNAL_IGNORE_NAMESPACES
|
126
|
+
APPSIGNAL_REQUEST_HEADERS
|
127
|
+
].freeze
|
84
128
|
|
85
129
|
# Mapping of old and deprecated AppSignal configuration keys
|
86
130
|
DEPRECATED_CONFIG_KEY_MAPPING = {
|
@@ -358,33 +402,21 @@ module Appsignal
|
|
358
402
|
config = {}
|
359
403
|
|
360
404
|
# Configuration with string type
|
361
|
-
|
362
|
-
APPSIGNAL_FRONTEND_ERROR_CATCHING_PATH APPSIGNAL_HTTP_PROXY
|
363
|
-
APPSIGNAL_LOG APPSIGNAL_LOG_PATH APPSIGNAL_WORKING_DIR_PATH
|
364
|
-
APPSIGNAL_HOSTNAME APPSIGNAL_CA_FILE_PATH APP_REVISION].each do |var|
|
405
|
+
ENV_STRING_KEYS.each do |var|
|
365
406
|
env_var = ENV[var]
|
366
407
|
next unless env_var
|
367
408
|
config[ENV_TO_KEY_MAPPING[var]] = env_var
|
368
409
|
end
|
369
410
|
|
370
411
|
# Configuration with boolean type
|
371
|
-
|
372
|
-
APPSIGNAL_INSTRUMENT_REDIS APPSIGNAL_INSTRUMENT_SEQUEL
|
373
|
-
APPSIGNAL_SKIP_SESSION_DATA APPSIGNAL_ENABLE_FRONTEND_ERROR_CATCHING
|
374
|
-
APPSIGNAL_ENABLE_ALLOCATION_TRACKING APPSIGNAL_ENABLE_GC_INSTRUMENTATION
|
375
|
-
APPSIGNAL_RUNNING_IN_CONTAINER APPSIGNAL_ENABLE_HOST_METRICS
|
376
|
-
APPSIGNAL_SEND_ENVIRONMENT_METADATA APPSIGNAL_SEND_PARAMS
|
377
|
-
APPSIGNAL_ENABLE_MINUTELY_PROBES APPSIGNAL_FILES_WORLD_ACCESSIBLE
|
378
|
-
APPSIGNAL_TRANSACTION_DEBUG_MODE].each do |var|
|
412
|
+
ENV_BOOLEAN_KEYS.each do |var|
|
379
413
|
env_var = ENV[var]
|
380
414
|
next unless env_var
|
381
415
|
config[ENV_TO_KEY_MAPPING[var]] = env_var.casecmp("true").zero?
|
382
416
|
end
|
383
417
|
|
384
418
|
# Configuration with array of strings type
|
385
|
-
|
386
|
-
APPSIGNAL_IGNORE_NAMESPACES APPSIGNAL_FILTER_PARAMETERS
|
387
|
-
APPSIGNAL_FILTER_SESSION_DATA APPSIGNAL_REQUEST_HEADERS].each do |var|
|
419
|
+
ENV_ARRAY_KEYS.each do |var|
|
388
420
|
env_var = ENV[var]
|
389
421
|
next unless env_var
|
390
422
|
config[ENV_TO_KEY_MAPPING[var]] = env_var.split(",")
|
data/lib/appsignal/version.rb
CHANGED
@@ -1,4 +1,18 @@
|
|
1
1
|
describe Appsignal::Config do
|
2
|
+
describe "config keys" do
|
3
|
+
it "all config keys have an environment variable version registered" do
|
4
|
+
config = Appsignal::Config
|
5
|
+
mapped_env_keys = config::ENV_TO_KEY_MAPPING.keys.sort
|
6
|
+
configured_env_keys = (
|
7
|
+
config::ENV_STRING_KEYS +
|
8
|
+
config::ENV_BOOLEAN_KEYS +
|
9
|
+
config::ENV_ARRAY_KEYS
|
10
|
+
).sort
|
11
|
+
|
12
|
+
expect(mapped_env_keys).to eql(configured_env_keys)
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
2
16
|
describe "#initialize" do
|
3
17
|
describe "environment" do
|
4
18
|
context "when environment is nil" do
|
@@ -418,6 +432,7 @@ describe Appsignal::Config do
|
|
418
432
|
:debug => true
|
419
433
|
)
|
420
434
|
end
|
435
|
+
let(:working_directory_path) { File.join(tmp_dir, "test_working_directory_path") }
|
421
436
|
let(:env_config) do
|
422
437
|
{
|
423
438
|
:running_in_container => true,
|
@@ -434,7 +449,8 @@ describe Appsignal::Config do
|
|
434
449
|
:files_world_accessible => false,
|
435
450
|
:request_headers => %w[accept accept-charset],
|
436
451
|
:revision => "v2.5.1",
|
437
|
-
:send_environment_metadata => false
|
452
|
+
:send_environment_metadata => false,
|
453
|
+
:working_directory_path => working_directory_path
|
438
454
|
}
|
439
455
|
end
|
440
456
|
before do
|
@@ -452,6 +468,7 @@ describe Appsignal::Config do
|
|
452
468
|
ENV["APPSIGNAL_FILES_WORLD_ACCESSIBLE"] = "false"
|
453
469
|
ENV["APPSIGNAL_REQUEST_HEADERS"] = "accept,accept-charset"
|
454
470
|
ENV["APPSIGNAL_SEND_ENVIRONMENT_METADATA"] = "false"
|
471
|
+
ENV["APPSIGNAL_WORKING_DIRECTORY_PATH"] = working_directory_path
|
455
472
|
ENV["APP_REVISION"] = "v2.5.1"
|
456
473
|
end
|
457
474
|
|
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.11.0
|
4
|
+
version: 2.11.0
|
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: 2020-
|
13
|
+
date: 2020-08-11 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rack
|
@@ -406,9 +406,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
406
406
|
version: '1.9'
|
407
407
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
408
408
|
requirements:
|
409
|
-
- - "
|
409
|
+
- - ">="
|
410
410
|
- !ruby/object:Gem::Version
|
411
|
-
version:
|
411
|
+
version: '0'
|
412
412
|
requirements: []
|
413
413
|
rubygems_version: 3.1.4
|
414
414
|
signing_key:
|