skylight 5.1.0.beta3 → 5.2.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -6
- data/ERRORS.md +3 -0
- data/ext/libskylight.yml +8 -10
- data/lib/skylight/cli/doctor.rb +1 -1
- data/lib/skylight/config.rb +41 -37
- data/lib/skylight/data/cacert.pem +730 -1023
- data/lib/skylight/errors.rb +3 -0
- data/lib/skylight/extensions/source_location.rb +2 -2
- data/lib/skylight/middleware.rb +16 -3
- data/lib/skylight/normalizers/active_job/perform.rb +22 -25
- data/lib/skylight/normalizers/grape/endpoint.rb +1 -1
- data/lib/skylight/probes/middleware.rb +2 -2
- data/lib/skylight/probes/rack_builder.rb +37 -0
- data/lib/skylight/probes/sinatra_add_middleware.rb +2 -2
- data/lib/skylight/railtie.rb +2 -2
- data/lib/skylight/sinatra.rb +1 -1
- data/lib/skylight/util/clock.rb +1 -1
- data/lib/skylight/util/deploy.rb +4 -4
- data/lib/skylight/util/platform.rb +2 -2
- data/lib/skylight/version.rb +1 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99481f50c8e9caf68288746feb32c93d2a969c0770c573ea6a4f5339deca7a8e
|
4
|
+
data.tar.gz: f39c3462788ebd87ec29c56c3863efac94bf9be18f023c93540d4af96228ba18
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ea1d4c80b043c085f612cbee130f10079b0a9f24392552a4a14b3fcd327831f8ca61d19fee4570d1a04d7289e18d431ff5f9ed5a8d567eb69afa7fd6f6d9fea
|
7
|
+
data.tar.gz: cc73adc6a339389ecfeca93f7a91496958f6769c24bea6d29dad2885800c8b5f3273635522450f56c6de3f53f42045219e32e054edc80620a5abe1cde779f682
|
data/CHANGELOG.md
CHANGED
@@ -1,19 +1,29 @@
|
|
1
|
-
## 5.
|
1
|
+
## 5.2.0-beta2 (10 November 2021)
|
2
2
|
|
3
|
-
- [
|
3
|
+
- [FEATURE] Experimental gRPC transport
|
4
|
+
- [IMPROVEMENT] Internal native client refactors
|
5
|
+
- [BUGFIX] Fix some internal errors related to Rails 7 alpha
|
4
6
|
|
5
|
-
## 5.
|
7
|
+
## 5.2.0-beta (7 September 2021)
|
6
8
|
|
7
|
-
- [IMPROVEMENT]
|
8
|
-
- [
|
9
|
+
- [IMPROVEMENT] Add Rack::Builder probe to better instrument middlewares in Sinatra and other Builder-based apps
|
10
|
+
- [BUGFIX] Fix an issue in which trace logging could output the incorrect request ID.
|
11
|
+
- [BUGFIX] fix native extension configuration for arm64 hosts
|
12
|
+
|
13
|
+
## 5.1.1 (May 27, 2021)
|
9
14
|
|
10
|
-
|
15
|
+
- [BUGFIX] Correct ruby version requirement in skylight.gemspec
|
16
|
+
|
17
|
+
## 5.1.0 (May 24, 2021)
|
11
18
|
|
12
19
|
- [FEATURE] Add experimental tcp-based `skylightd` (may be enabled with `SKYLIGHT_ENABLE_TCP=true`)
|
13
20
|
|
14
21
|
- [IMPROVEMENT] Support aarch64-darwin targets (Apple M1)
|
15
22
|
- [IMPROVEMENT] Support aarch64-linux-gnu targets
|
16
23
|
- [IMPROVEMENT] Support aarch64-linux-musl targets
|
24
|
+
- [IMPROVEMENT] Prevent large traces from shutting down the instrumenter
|
25
|
+
- [IMPROVEMENT] Avoid 'invalid option' warnings when instrumenting certain Tilt templates in Sinatra
|
26
|
+
- [IMPROVEMENT] Decrease verbosity of source locations logs in the debug level.
|
17
27
|
|
18
28
|
- [BREAKING] Remove `SKYLIGHT_SSL_CERT_DIR` config
|
19
29
|
- [BREAKING] Drop support for Ruby 2.5
|
data/ERRORS.md
CHANGED
@@ -2,4 +2,7 @@ E0001 - Spans were closed out of order
|
|
2
2
|
E0002 - Exceeded the number of unique span descriptions
|
3
3
|
E0003 - Exceeded maximum number of spans
|
4
4
|
E0004 - Failed to lex SQL query
|
5
|
+
E0005 - Instrumenter is not running
|
6
|
+
E0006 - Invalid UTF-8
|
7
|
+
E0007 - Failed to connect to gRPC server
|
5
8
|
E9999 - Unknown
|
data/ext/libskylight.yml
CHANGED
@@ -1,11 +1,9 @@
|
|
1
|
-
|
2
|
-
---
|
3
|
-
version: "5.1.0-0d59831"
|
1
|
+
version: "5.1.0-f504521"
|
4
2
|
checksums:
|
5
|
-
x86-linux: "
|
6
|
-
x86_64-linux: "
|
7
|
-
x86_64-linux-musl: "
|
8
|
-
x86_64-darwin: "
|
9
|
-
aarch64-linux: "
|
10
|
-
aarch64-linux-musl: "
|
11
|
-
aarch64-darwin: "
|
3
|
+
x86-linux: "46bdaaf5a0b2605e1bf581756317dcac7cd6db66bda1b2994dd8de5f933f752e"
|
4
|
+
x86_64-linux: "300e3d2e770c2cefdb43bde6d6538bde69c18ec9c6b50210f24959a8efcd8749"
|
5
|
+
x86_64-linux-musl: "9f790db33f2c4f6c68ecb2d4719c881e3cf3634ac3718db4c108994d6c55f6a8"
|
6
|
+
x86_64-darwin: "90c4ff6650350f084495cc031bb70ae1ef7a4934712a0c97dcdbfc6ce418342c"
|
7
|
+
aarch64-linux: "f5437881ecb6ac59af1e8c89e19e68baf52730088efd030855b2e40bc714a2ba"
|
8
|
+
aarch64-linux-musl: "d52bac0d1a0d965940ded2168acb72d2c23b060eb1bac9983763cc8b7cada8ba"
|
9
|
+
aarch64-darwin: "b92c85242b94e7eb71680de41a504a22e9dba145408bdd810757e693e065456d"
|
data/lib/skylight/cli/doctor.rb
CHANGED
data/lib/skylight/config.rb
CHANGED
@@ -32,9 +32,9 @@ module Skylight
|
|
32
32
|
-"COMPONENT" => :component,
|
33
33
|
-"REPORT_RAILS_ENV" => :report_rails_env,
|
34
34
|
# == Deploy settings ==
|
35
|
-
-"DEPLOY_ID" => :
|
36
|
-
-"DEPLOY_GIT_SHA" => :
|
37
|
-
-"DEPLOY_DESCRIPTION" => :
|
35
|
+
-"DEPLOY_ID" => :"deploy.id",
|
36
|
+
-"DEPLOY_GIT_SHA" => :"deploy.git_sha",
|
37
|
+
-"DEPLOY_DESCRIPTION" => :"deploy.description",
|
38
38
|
# == Logging ==
|
39
39
|
-"LOG_FILE" => :log_file,
|
40
40
|
-"LOG_LEVEL" => :log_level,
|
@@ -67,37 +67,39 @@ module Skylight
|
|
67
67
|
-"REPORT_HTTP_CONNECT_TIMEOUT" => :report_http_connect_timeout,
|
68
68
|
-"REPORT_HTTP_READ_TIMEOUT" => :report_http_read_timeout,
|
69
69
|
-"REPORT_HTTP_DISABLED" => :report_http_disabled,
|
70
|
+
-"REPORT_USE_GRPC" => :report_use_grpc,
|
71
|
+
-"REPORT_GRPC_URL" => :report_grpc_url,
|
70
72
|
# == Native agent settings ==
|
71
73
|
#
|
72
|
-
-"LAZY_START" => :
|
73
|
-
-"DAEMON_EXEC_PATH" => :
|
74
|
-
-"DAEMON_LIB_PATH" => :
|
75
|
-
-"PIDFILE_PATH" => :
|
76
|
-
-"SOCKDIR_PATH" => :
|
77
|
-
-"BATCH_QUEUE_DEPTH" => :
|
78
|
-
-"BATCH_SAMPLE_SIZE" => :
|
79
|
-
-"BATCH_FLUSH_INTERVAL" => :
|
80
|
-
-"DAEMON_TICK_INTERVAL" => :
|
81
|
-
-"DAEMON_LOCK_CHECK_INTERVAL" => :
|
82
|
-
-"DAEMON_INACTIVITY_TIMEOUT" => :
|
83
|
-
-"CLIENT_MAX_TRIES" => :
|
84
|
-
-"CLIENT_CONN_TRY_WIN" => :
|
85
|
-
-"MAX_PRESPAWN_JITTER" => :
|
86
|
-
-"DAEMON_WAIT_TIMEOUT" => :
|
87
|
-
-"CLIENT_CHECK_INTERVAL" => :
|
88
|
-
-"CLIENT_QUEUE_DEPTH" => :
|
89
|
-
-"CLIENT_WRITE_TIMEOUT" => :
|
90
|
-
-"SSL_CERT_PATH" => :
|
91
|
-
-"ENABLE_TCP" => :
|
92
|
-
-"TCP_PORT" => :
|
74
|
+
-"LAZY_START" => :"daemon.lazy_start",
|
75
|
+
-"DAEMON_EXEC_PATH" => :"daemon.exec_path",
|
76
|
+
-"DAEMON_LIB_PATH" => :"daemon.lib_path",
|
77
|
+
-"PIDFILE_PATH" => :"daemon.pidfile_path",
|
78
|
+
-"SOCKDIR_PATH" => :"daemon.sockdir_path",
|
79
|
+
-"BATCH_QUEUE_DEPTH" => :"daemon.batch_queue_depth",
|
80
|
+
-"BATCH_SAMPLE_SIZE" => :"daemon.batch_sample_size",
|
81
|
+
-"BATCH_FLUSH_INTERVAL" => :"daemon.batch_flush_interval",
|
82
|
+
-"DAEMON_TICK_INTERVAL" => :"daemon.tick_interval",
|
83
|
+
-"DAEMON_LOCK_CHECK_INTERVAL" => :"daemon.lock_check_interval",
|
84
|
+
-"DAEMON_INACTIVITY_TIMEOUT" => :"daemon.inactivity_timeout",
|
85
|
+
-"CLIENT_MAX_TRIES" => :"daemon.max_connect_tries",
|
86
|
+
-"CLIENT_CONN_TRY_WIN" => :"daemon.connect_try_window",
|
87
|
+
-"MAX_PRESPAWN_JITTER" => :"daemon.max_prespawn_jitter",
|
88
|
+
-"DAEMON_WAIT_TIMEOUT" => :"daemon.wait_timeout",
|
89
|
+
-"CLIENT_CHECK_INTERVAL" => :"daemon.client_check_interval",
|
90
|
+
-"CLIENT_QUEUE_DEPTH" => :"daemon.client_queue_depth",
|
91
|
+
-"CLIENT_WRITE_TIMEOUT" => :"daemon.client_write_timeout",
|
92
|
+
-"SSL_CERT_PATH" => :"daemon.ssl_cert_path",
|
93
|
+
-"ENABLE_TCP" => :"daemon.enable_tcp",
|
94
|
+
-"TCP_PORT" => :"daemon.tcp_port",
|
93
95
|
# == Legacy env vars ==
|
94
96
|
#
|
95
|
-
-"AGENT_LOCKFILE" => :
|
96
|
-
-"AGENT_SOCKFILE_PATH" => :
|
97
|
+
-"AGENT_LOCKFILE" => :"agent.lockfile",
|
98
|
+
-"AGENT_SOCKFILE_PATH" => :"agent.sockfile_path",
|
97
99
|
# == User config settings ==
|
98
100
|
-"USER_CONFIG_PATH" => :user_config_path,
|
99
101
|
# == Heroku settings ==
|
100
|
-
-"HEROKU_DYNO_INFO_PATH" => :
|
102
|
+
-"HEROKU_DYNO_INFO_PATH" => :"heroku.dyno_info_path",
|
101
103
|
# == Source Location ==
|
102
104
|
-"SOURCE_LOCATION_IGNORED_GEMS" => :source_location_ignored_gems,
|
103
105
|
-"SOURCE_LOCATION_CACHE_SIZE" => :source_location_cache_size
|
@@ -135,22 +137,22 @@ module Skylight
|
|
135
137
|
sinatra_route_prefixes: false,
|
136
138
|
enable_source_locations: true,
|
137
139
|
# Deploys
|
138
|
-
|
140
|
+
"heroku.dyno_info_path": -"/etc/heroku/dyno",
|
139
141
|
report_rails_env: true,
|
140
142
|
# Daemon
|
141
|
-
|
143
|
+
"daemon.lazy_start": true,
|
142
144
|
hostname: Util::Hostname.default_hostname,
|
143
145
|
report_max_spans_exceeded: false,
|
144
146
|
prune_large_traces: true
|
145
147
|
}
|
146
148
|
|
147
|
-
ret[:
|
149
|
+
ret[:"daemon.ssl_cert_path"] = Util::SSL.ca_cert_file_or_default unless Util::Platform::OS == -"darwin"
|
148
150
|
|
149
151
|
if Skylight.native?
|
150
152
|
native_path = Skylight.libskylight_path
|
151
153
|
|
152
|
-
ret[:
|
153
|
-
ret[:
|
154
|
+
ret[:"daemon.lib_path"] = native_path
|
155
|
+
ret[:"daemon.exec_path"] = File.join(native_path, "skylightd")
|
154
156
|
end
|
155
157
|
|
156
158
|
ret
|
@@ -184,6 +186,8 @@ module Skylight
|
|
184
186
|
report_http_connect_timeout
|
185
187
|
report_http_read_timeout
|
186
188
|
report_http_disabled
|
189
|
+
report_use_grpc
|
190
|
+
report_grpc_url
|
187
191
|
daemon.lazy_start
|
188
192
|
daemon.exec_path
|
189
193
|
daemon.lib_path
|
@@ -211,12 +215,12 @@ module Skylight
|
|
211
215
|
|
212
216
|
# Maps legacy config keys to new config keys
|
213
217
|
def self.legacy_keys
|
214
|
-
@legacy_keys ||= {
|
218
|
+
@legacy_keys ||= { "agent.sockfile_path": :"daemon.sockdir_path", "agent.lockfile": :"daemon.pidfile_path" }
|
215
219
|
end
|
216
220
|
|
217
221
|
def self.validators
|
218
222
|
@validators ||=
|
219
|
-
{
|
223
|
+
{ "agent.interval": [->(v, _c) { v.is_a?(Integer) && v > 0 }, "must be an integer greater than 0"] }
|
220
224
|
end
|
221
225
|
|
222
226
|
# @api private
|
@@ -334,8 +338,8 @@ module Skylight
|
|
334
338
|
# TODO: Move this out of the validate! method: https://github.com/tildeio/direwolf-agent/issues/273
|
335
339
|
# FIXME: Why not set the sockdir_path and pidfile_path explicitly?
|
336
340
|
# That way we don't have to keep this in sync with the Rust repo.
|
337
|
-
sockdir_path = File.expand_path(self[:
|
338
|
-
pidfile_path = File.expand_path(self[:
|
341
|
+
sockdir_path = File.expand_path(self[:"daemon.sockdir_path"] || ".", root)
|
342
|
+
pidfile_path = File.expand_path(self[:"daemon.pidfile_path"] || "skylight.pid", sockdir_path)
|
339
343
|
|
340
344
|
check_file_permissions(pidfile_path, "daemon.pidfile_path or daemon.sockdir_path")
|
341
345
|
check_sockdir_permissions(sockdir_path)
|
@@ -588,7 +592,7 @@ module Skylight
|
|
588
592
|
end
|
589
593
|
|
590
594
|
def on_heroku?
|
591
|
-
File.exist?(get(:
|
595
|
+
File.exist?(get(:"heroku.dyno_info_path"))
|
592
596
|
end
|
593
597
|
|
594
598
|
private
|