skylight 5.1.0.beta → 5.1.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 +390 -371
- data/CLA.md +1 -1
- data/LICENSE.md +7 -17
- data/README.md +1 -1
- data/ext/extconf.rb +42 -54
- data/lib/skylight.rb +20 -30
- data/lib/skylight/api.rb +22 -18
- data/lib/skylight/cli.rb +47 -46
- data/lib/skylight/cli/doctor.rb +50 -50
- data/lib/skylight/cli/helpers.rb +19 -19
- data/lib/skylight/cli/merger.rb +141 -139
- data/lib/skylight/config.rb +265 -302
- data/lib/skylight/deprecation.rb +4 -4
- data/lib/skylight/errors.rb +3 -4
- data/lib/skylight/extensions.rb +17 -29
- data/lib/skylight/extensions/source_location.rb +128 -128
- data/lib/skylight/formatters/http.rb +1 -3
- data/lib/skylight/gc.rb +30 -40
- data/lib/skylight/helpers.rb +43 -41
- data/lib/skylight/instrumenter.rb +25 -18
- data/lib/skylight/middleware.rb +31 -35
- data/lib/skylight/native.rb +8 -10
- data/lib/skylight/native_ext_fetcher.rb +10 -12
- data/lib/skylight/normalizers.rb +43 -39
- data/lib/skylight/normalizers/action_controller/process_action.rb +24 -25
- data/lib/skylight/normalizers/action_controller/send_file.rb +7 -6
- data/lib/skylight/normalizers/action_dispatch/route_set.rb +7 -7
- data/lib/skylight/normalizers/active_job/perform.rb +48 -44
- data/lib/skylight/normalizers/active_model_serializers/render.rb +7 -3
- data/lib/skylight/normalizers/active_storage.rb +11 -13
- data/lib/skylight/normalizers/active_support/cache.rb +1 -12
- data/lib/skylight/normalizers/coach/handler_finish.rb +1 -3
- data/lib/skylight/normalizers/default.rb +1 -9
- data/lib/skylight/normalizers/faraday/request.rb +1 -3
- data/lib/skylight/normalizers/grape/endpoint.rb +13 -19
- data/lib/skylight/normalizers/grape/endpoint_run.rb +16 -18
- data/lib/skylight/normalizers/grape/endpoint_run_filters.rb +1 -3
- data/lib/skylight/normalizers/graphql/base.rb +23 -28
- data/lib/skylight/normalizers/render.rb +19 -21
- data/lib/skylight/normalizers/shrine.rb +15 -17
- data/lib/skylight/normalizers/sql.rb +4 -4
- data/lib/skylight/probes.rb +38 -46
- data/lib/skylight/probes/action_controller.rb +32 -28
- data/lib/skylight/probes/action_dispatch/request_id.rb +9 -5
- data/lib/skylight/probes/action_dispatch/routing/route_set.rb +7 -5
- data/lib/skylight/probes/action_view.rb +9 -10
- data/lib/skylight/probes/active_job_enqueue.rb +3 -9
- data/lib/skylight/probes/active_model_serializers.rb +8 -8
- data/lib/skylight/probes/delayed_job.rb +37 -42
- data/lib/skylight/probes/elasticsearch.rb +3 -5
- data/lib/skylight/probes/excon.rb +1 -1
- data/lib/skylight/probes/excon/middleware.rb +22 -23
- data/lib/skylight/probes/graphql.rb +2 -7
- data/lib/skylight/probes/middleware.rb +14 -5
- data/lib/skylight/probes/mongo.rb +83 -91
- data/lib/skylight/probes/net_http.rb +1 -1
- data/lib/skylight/probes/redis.rb +5 -17
- data/lib/skylight/probes/sequel.rb +7 -11
- data/lib/skylight/probes/sinatra.rb +8 -5
- data/lib/skylight/probes/tilt.rb +2 -4
- data/lib/skylight/railtie.rb +121 -135
- data/lib/skylight/sidekiq.rb +4 -5
- data/lib/skylight/subscriber.rb +31 -33
- data/lib/skylight/test.rb +89 -84
- data/lib/skylight/trace.rb +121 -115
- data/lib/skylight/user_config.rb +14 -17
- data/lib/skylight/util/clock.rb +1 -0
- data/lib/skylight/util/component.rb +18 -21
- data/lib/skylight/util/deploy.rb +11 -13
- data/lib/skylight/util/http.rb +104 -105
- data/lib/skylight/util/logging.rb +4 -6
- data/lib/skylight/util/lru_cache.rb +2 -6
- data/lib/skylight/util/platform.rb +2 -6
- data/lib/skylight/util/ssl.rb +1 -3
- data/lib/skylight/version.rb +1 -1
- data/lib/skylight/vm/gc.rb +1 -9
- metadata +4 -4
@@ -19,15 +19,11 @@ module Skylight
|
|
19
19
|
found = true
|
20
20
|
value = @data.delete(key) { found = false }
|
21
21
|
|
22
|
-
if !found && block_given?
|
23
|
-
value = yield
|
24
|
-
end
|
22
|
+
value = yield if !found && block_given?
|
25
23
|
|
26
24
|
@data[key] = value if value
|
27
25
|
|
28
|
-
if !found && value && @data.length > @max_size
|
29
|
-
@data.shift
|
30
|
-
end
|
26
|
+
@data.shift if !found && value && @data.length > @max_size
|
31
27
|
|
32
28
|
value
|
33
29
|
end
|
@@ -12,11 +12,7 @@ module Skylight
|
|
12
12
|
# Ruby doesn't know that it's on a musl-based platform. `ldd` is the
|
13
13
|
# only reliable way to detect musl that we've found.
|
14
14
|
# See https://github.com/skylightio/skylight-ruby/issues/92
|
15
|
-
|
16
|
-
"linux-musl"
|
17
|
-
else
|
18
|
-
"linux"
|
19
|
-
end
|
15
|
+
ENV["SKYLIGHT_MUSL"] || `ldd --version 2>&1` =~ /musl/ ? "linux-musl" : "linux"
|
20
16
|
when /darwin/
|
21
17
|
"darwin"
|
22
18
|
when /freebsd/
|
@@ -56,7 +52,7 @@ module Skylight
|
|
56
52
|
"so"
|
57
53
|
when /windows|cygwin/
|
58
54
|
"dll"
|
59
|
-
else
|
55
|
+
else
|
60
56
|
"so"
|
61
57
|
end
|
62
58
|
|
data/lib/skylight/util/ssl.rb
CHANGED
data/lib/skylight/version.rb
CHANGED
data/lib/skylight/vm/gc.rb
CHANGED
@@ -2,7 +2,6 @@ module Skylight
|
|
2
2
|
# @api private
|
3
3
|
module VM
|
4
4
|
if defined?(JRUBY_VERSION)
|
5
|
-
|
6
5
|
# This doesn't quite work as we would like it. I believe that the GC
|
7
6
|
# statistics includes time that is not stop-the-world, this does not
|
8
7
|
# necessarily take time away from the application.
|
@@ -26,9 +25,7 @@ module Skylight
|
|
26
25
|
# res
|
27
26
|
# end
|
28
27
|
# end
|
29
|
-
|
30
28
|
elsif defined?(::GC::Profiler)
|
31
|
-
|
32
29
|
class GC
|
33
30
|
def initialize
|
34
31
|
@total = 0
|
@@ -42,19 +39,15 @@ module Skylight
|
|
42
39
|
# Reported in seconds
|
43
40
|
run = (::GC::Profiler.total_time * 1_000_000).to_i
|
44
41
|
|
45
|
-
if run > 0
|
46
|
-
::GC::Profiler.clear
|
47
|
-
end
|
42
|
+
::GC::Profiler.clear if run > 0
|
48
43
|
|
49
44
|
@total += run
|
50
45
|
end
|
51
46
|
end
|
52
|
-
|
53
47
|
end
|
54
48
|
|
55
49
|
# Fallback
|
56
50
|
unless defined?(VM::GC)
|
57
|
-
|
58
51
|
class GC
|
59
52
|
def enable; end
|
60
53
|
|
@@ -62,7 +55,6 @@ module Skylight
|
|
62
55
|
0
|
63
56
|
end
|
64
57
|
end
|
65
|
-
|
66
58
|
end
|
67
59
|
end
|
68
60
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skylight
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.1.0.
|
4
|
+
version: 5.1.0.beta2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tilde, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1.
|
145
|
+
version: 1.15.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 1.
|
152
|
+
version: 1.15.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: simplecov
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|