skylight 5.3.2 → 5.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/ext/extconf.rb +8 -8
- data/lib/skylight/native.rb +3 -3
- data/lib/skylight/probes/mongo.rb +14 -1
- data/lib/skylight/probes/mongoid.rb +6 -13
- data/lib/skylight/railtie.rb +1 -1
- data/lib/skylight/sidekiq.rb +1 -1
- data/lib/skylight/user_config.rb +4 -2
- data/lib/skylight/util/platform.rb +1 -1
- data/lib/skylight/version.rb +1 -1
- metadata +7 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f3b769eb5f54b2400e4e2ba1678a5e45e1bdf3aff9dc205274387317035e606b
|
4
|
+
data.tar.gz: 1bf4191e377224dfb2c5e064dc6391462c2005a6bf3c8cc658feaa6b6d67e002
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 830f58c5a32ffaf48584fe0769508451e2b0719fb0fc3ed9c3c13a031fff5706e94485a9bf11dacbf0c9b48e95cfd4df07d875eb097c54e90fcf018858eca133
|
7
|
+
data.tar.gz: 1bcdb766cbb4040a9f0734ebeb2a727ddc665bef8c58842b69a48dc33a965b0985ae4dd38cea714f2acca4ab12b79a55c37b5c1bba43985541c68ff80687d7f9
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 5.3.3 (July 13, 2022)
|
2
|
+
|
3
|
+
- [IMPROVEMENT] Track the original class/method name for Sidekiq delayed object proxies
|
4
|
+
- [BUGFIX] Fix `mongoid` probe not activating correctly
|
5
|
+
- [BUGFIX] Fix `mongo` probe not instrumenting clients created before Skylight initialization
|
6
|
+
|
1
7
|
## 5.3.2 (April 6, 2022)
|
2
8
|
|
3
9
|
- [BUGFIX] Fix case-sensitivity issue when computing relative paths
|
data/ext/extconf.rb
CHANGED
@@ -43,19 +43,19 @@ end
|
|
43
43
|
include Skylight::Util
|
44
44
|
|
45
45
|
SKYLIGHT_INSTALL_LOG = File.expand_path("install.log", __dir__)
|
46
|
-
SKYLIGHT_REQUIRED = ENV.key?("SKYLIGHT_REQUIRED") && ENV
|
47
|
-
SKYLIGHT_FETCH_LIB = !ENV.key?("SKYLIGHT_FETCH_LIB") || ENV
|
46
|
+
SKYLIGHT_REQUIRED = ENV.key?("SKYLIGHT_REQUIRED") && ENV.fetch("SKYLIGHT_REQUIRED", nil) !~ /^false$/i
|
47
|
+
SKYLIGHT_FETCH_LIB = !ENV.key?("SKYLIGHT_FETCH_LIB") || ENV.fetch("SKYLIGHT_FETCH_LIB", nil) !~ /^false$/i
|
48
48
|
|
49
49
|
# Directory where skylight.h exists
|
50
|
-
SKYLIGHT_HDR_PATH = ENV
|
50
|
+
SKYLIGHT_HDR_PATH = ENV.fetch("SKYLIGHT_HDR_PATH") { ENV.fetch("SKYLIGHT_LIB_PATH", ".") }
|
51
51
|
SKYLIGHT_LIB_PATH =
|
52
|
-
ENV
|
52
|
+
ENV.fetch("SKYLIGHT_LIB_PATH") { File.expand_path("../../lib/skylight/native/#{Platform.tuple}", __FILE__) }
|
53
53
|
|
54
|
-
SKYLIGHT_SOURCE_URL = ENV
|
55
|
-
SKYLIGHT_VERSION = ENV
|
56
|
-
SKYLIGHT_CHECKSUM = ENV
|
54
|
+
SKYLIGHT_SOURCE_URL = ENV.fetch("SKYLIGHT_SOURCE_URL", nil)
|
55
|
+
SKYLIGHT_VERSION = ENV.fetch("SKYLIGHT_VERSION", nil)
|
56
|
+
SKYLIGHT_CHECKSUM = ENV.fetch("SKYLIGHT_CHECKSUM", nil)
|
57
57
|
|
58
|
-
SKYLIGHT_EXT_STRICT = ENV.key?("SKYLIGHT_EXT_STRICT") && ENV
|
58
|
+
SKYLIGHT_EXT_STRICT = ENV.key?("SKYLIGHT_EXT_STRICT") && ENV.fetch("SKYLIGHT_EXT_STRICT", nil) =~ /^true$/i
|
59
59
|
|
60
60
|
# Setup logger
|
61
61
|
LOG = Logger.new(MultiIO.new($stdout, File.open(SKYLIGHT_INSTALL_LOG, "a")))
|
data/lib/skylight/native.rb
CHANGED
@@ -59,13 +59,13 @@ module Skylight
|
|
59
59
|
end
|
60
60
|
|
61
61
|
def self.libskylight_path
|
62
|
-
ENV
|
62
|
+
ENV.fetch("SKYLIGHT_LIB_PATH") { File.expand_path("../native/#{Util::Platform.tuple}", __FILE__) }
|
63
63
|
end
|
64
64
|
|
65
|
-
skylight_required = ENV.key?("SKYLIGHT_REQUIRED") && ENV
|
65
|
+
skylight_required = ENV.key?("SKYLIGHT_REQUIRED") && ENV.fetch("SKYLIGHT_REQUIRED", nil) !~ /^false$/i
|
66
66
|
|
67
67
|
begin
|
68
|
-
unless ENV.key?("SKYLIGHT_DISABLE_AGENT") && ENV
|
68
|
+
unless ENV.key?("SKYLIGHT_DISABLE_AGENT") && ENV.fetch("SKYLIGHT_DISABLE_AGENT", nil) !~ /^false$/i
|
69
69
|
lib = "#{libskylight_path}/libskylight.#{Util::Platform.libext}"
|
70
70
|
|
71
71
|
if File.exist?(lib)
|
@@ -5,7 +5,20 @@ module Skylight
|
|
5
5
|
|
6
6
|
class Probe
|
7
7
|
def install
|
8
|
-
|
8
|
+
subscriber = Subscriber.new
|
9
|
+
|
10
|
+
# From the mongo driver:
|
11
|
+
#
|
12
|
+
# > Global subscriptions must be established prior to creating
|
13
|
+
# > clients. When a client is constructed it copies subscribers from
|
14
|
+
# > the Global module; subsequent subscriptions or unsubscriptions
|
15
|
+
# > on the Global module have no effect on already created clients.
|
16
|
+
#
|
17
|
+
# So, for existing clients created before the Skylight initializer
|
18
|
+
# runs, we'll have to subscribe to those individually.
|
19
|
+
::Mongoid::Clients.clients.each { |_name, client| client.subscribe(::Mongo::Monitoring::COMMAND, subscriber) }
|
20
|
+
|
21
|
+
::Mongo::Monitoring::Global.subscribe(::Mongo::Monitoring::COMMAND, subscriber)
|
9
22
|
end
|
10
23
|
end
|
11
24
|
|
@@ -1,13 +1,6 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
end
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
register(:mongoid, "Mongoid", "mongoid", Mongoid::Probe.new)
|
12
|
-
end
|
13
|
-
end
|
1
|
+
# Older versions of the mongoid uses the moped under-the-hood, while newer
|
2
|
+
# verions uses the official driver. It used to be that the the mongoid probe
|
3
|
+
# exists to detect and enable either one of those underlying probes, but at
|
4
|
+
# this point we no longer support moped, so this is now just an alias for the
|
5
|
+
# mongo probe.
|
6
|
+
require_relative "mongo"
|
data/lib/skylight/railtie.rb
CHANGED
@@ -153,7 +153,7 @@ module Skylight
|
|
153
153
|
return false unless sk_config
|
154
154
|
|
155
155
|
key = "SKYLIGHT_ENABLED"
|
156
|
-
activate = ENV.key?(key) ? ENV
|
156
|
+
activate = ENV.key?(key) ? ENV.fetch(key, nil) !~ /^false$/i : environments.include?(Rails.env.to_s)
|
157
157
|
|
158
158
|
show_worker_activation_warning(sk_config) if activate
|
159
159
|
|
data/lib/skylight/sidekiq.rb
CHANGED
@@ -21,7 +21,7 @@ module Skylight
|
|
21
21
|
|
22
22
|
def call(worker, job, queue)
|
23
23
|
t { "Sidekiq middleware beginning trace" }
|
24
|
-
title = job["wrapped"] || job["class"]
|
24
|
+
title = job["display_class"] || job["wrapped"] || job["class"]
|
25
25
|
|
26
26
|
# TODO: Using hints here would be ideal but requires further refactoring
|
27
27
|
meta =
|
data/lib/skylight/user_config.rb
CHANGED
@@ -18,7 +18,9 @@ module Skylight
|
|
18
18
|
@config[:user_config_path] ||
|
19
19
|
begin
|
20
20
|
require "etc"
|
21
|
-
home_dir =
|
21
|
+
home_dir =
|
22
|
+
ENV.fetch("HOME", nil) || Etc.getpwuid.dir ||
|
23
|
+
(ENV.fetch("USER", nil) && File.expand_path("~#{ENV.fetch("USER", nil)}"))
|
22
24
|
if home_dir
|
23
25
|
File.join(home_dir, ".skylight")
|
24
26
|
else
|
@@ -31,7 +33,7 @@ module Skylight
|
|
31
33
|
end
|
32
34
|
|
33
35
|
def disable_dev_warning?
|
34
|
-
disable_dev_warning || ENV
|
36
|
+
disable_dev_warning || ENV.fetch("SKYLIGHT_DISABLE_DEV_WARNING", nil) =~ /^true$/i
|
35
37
|
end
|
36
38
|
|
37
39
|
def disable_env_warning?
|
@@ -12,7 +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
|
-
ENV
|
15
|
+
ENV.fetch("SKYLIGHT_MUSL") { `ldd --version 2>&1` =~ /musl/ } ? "linux-musl" : "linux"
|
16
16
|
when /darwin/
|
17
17
|
"darwin"
|
18
18
|
when /freebsd/
|
data/lib/skylight/version.rb
CHANGED
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.3.
|
4
|
+
version: 5.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tilde, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: 1.
|
103
|
+
version: 1.2.0
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: 1.
|
110
|
+
version: 1.2.0
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: rspec
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,14 +142,14 @@ dependencies:
|
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 1.
|
145
|
+
version: 1.31.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.31.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
154
|
name: simplecov
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -385,7 +385,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
385
385
|
- !ruby/object:Gem::Version
|
386
386
|
version: '0'
|
387
387
|
requirements: []
|
388
|
-
rubygems_version: 3.
|
388
|
+
rubygems_version: 3.2.15
|
389
389
|
signing_key:
|
390
390
|
specification_version: 4
|
391
391
|
summary: Skylight is a smart profiler for Rails, Sinatra, and other Ruby apps.
|