skylight 6.0.0.beta → 6.0.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 -1
- data/lib/skylight/probes/graphql.rb +51 -4
- data/lib/skylight/version.rb +1 -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: 98bbb52dcc3879f40677c3cb97ea2b17e6a64604b8ff4bc4d79dafdb63a4664b
|
4
|
+
data.tar.gz: 6be670d8453346d3f4b6a72de3debfd03741059d4373e12ca4cdb8bc0272727e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8820d77b664d80a35e01f2277a8e89535ccda401bad9b9ac2a143bf0810439da4512d2fe35a46a5c500a7ce87eb8399406e5a28d399073e608d40c666b9c4033
|
7
|
+
data.tar.gz: af18513abf5c96509ece88f289ee6d5ffa0380036f9137cc08e6f67850f9e76584a8eaa1a79228be26a603e9681571ec67b8ba934a33ac24fa0181a59e68052a
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
## 6.0.0
|
1
|
+
## 6.0.0 (September 11, 2023)
|
2
2
|
- [BREAKING] End support for Ruby 2.6
|
3
3
|
- The following libraries are no longer tested and are not guaranteed to work with Skylight 6:
|
4
4
|
- Sinatra 1.x
|
@@ -11,6 +11,9 @@
|
|
11
11
|
responder (like a Rails router), Skylight will not set the endpoint name after exception processing has started.
|
12
12
|
This means that error traces will now be aggregated under the original endpoint that generated the error (but with
|
13
13
|
the 'error' segment), rather than under the exception handler's controller and action name.
|
14
|
+
- [IMPROVEMENT] (Once again) Provide native support for FreeBSD.
|
15
|
+
- [BUGFIX] Fix an issue in which the daemon could time out if the processes file descriptor count was set very high (e.g. on Heroku's Performance dynos)
|
16
|
+
- [IMPROVEMENT] Better support for GraphQL versions >= 2.0.18.
|
14
17
|
|
15
18
|
## 5.3.4 (October 17, 2022)
|
16
19
|
|
@@ -11,20 +11,67 @@ module Skylight
|
|
11
11
|
|
12
12
|
return unless defined?(@tracers)
|
13
13
|
|
14
|
+
# This is the legacy tracing used in graphql =< 2.0.17
|
14
15
|
unless @tracers.include?(::GraphQL::Tracing::ActiveSupportNotificationsTracing)
|
15
16
|
@tracers << ::GraphQL::Tracing::ActiveSupportNotificationsTracing
|
16
17
|
end
|
17
18
|
end
|
18
19
|
end
|
19
20
|
|
21
|
+
module InstrumentationV2
|
22
|
+
def self.included(base)
|
23
|
+
base.singleton_class.prepend ClassMethods
|
24
|
+
end
|
25
|
+
|
26
|
+
# GraphQL versions 2.0.18 - 2.0.21 (or higher?) were missing this notification
|
27
|
+
module ExecuteMultiplexNotification
|
28
|
+
def execute_multiplex(**metadata, &blk)
|
29
|
+
if @notifications_engine
|
30
|
+
@notifications_engine.instrument("execute_multiplex.graphql", metadata, &blk)
|
31
|
+
else
|
32
|
+
# safety fallback in case graphql's authors unexpectedly rename @notifications_engine
|
33
|
+
super
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
module ClassMethods
|
39
|
+
def new_trace(*, **)
|
40
|
+
unless @__sk_instrumentation_installed
|
41
|
+
trace_with(::GraphQL::Tracing::ActiveSupportNotificationsTrace)
|
42
|
+
|
43
|
+
unless ::GraphQL::Tracing::ActiveSupportNotificationsTrace.instance_methods.include?(:execute_multiplex)
|
44
|
+
trace_with(ExecuteMultiplexNotification)
|
45
|
+
end
|
46
|
+
|
47
|
+
@__sk_instrumentation_installed = true
|
48
|
+
end
|
49
|
+
|
50
|
+
super
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
20
55
|
class Probe
|
21
56
|
def install
|
22
|
-
|
23
|
-
|
57
|
+
new_tracing = false
|
58
|
+
begin
|
59
|
+
require "graphql/tracing/active_support_notifications_trace"
|
60
|
+
new_tracing = true
|
61
|
+
rescue LoadError # rubocop:disable Lint/SuppressedException
|
62
|
+
end
|
63
|
+
|
64
|
+
if new_tracing
|
65
|
+
# GraphQL >= 2.0.18
|
66
|
+
::GraphQL::Schema.include(InstrumentationV2)
|
67
|
+
else
|
68
|
+
tracing_klass_name = "::GraphQL::Tracing::ActiveSupportNotificationsTracing"
|
69
|
+
klasses_to_probe = %w[::GraphQL::Execution::Multiplex ::GraphQL::Query]
|
24
70
|
|
25
|
-
|
71
|
+
return unless ([tracing_klass_name] + klasses_to_probe).all?(&method(:safe_constantize))
|
26
72
|
|
27
|
-
|
73
|
+
klasses_to_probe.each { |klass_name| safe_constantize(klass_name).prepend(Instrumentation) }
|
74
|
+
end
|
28
75
|
end
|
29
76
|
|
30
77
|
def safe_constantize(klass_name)
|
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: 6.0.0
|
4
|
+
version: 6.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tilde, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -396,9 +396,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
396
396
|
version: '2.7'
|
397
397
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
398
398
|
requirements:
|
399
|
-
- - "
|
399
|
+
- - ">="
|
400
400
|
- !ruby/object:Gem::Version
|
401
|
-
version:
|
401
|
+
version: '0'
|
402
402
|
requirements: []
|
403
403
|
rubygems_version: 3.4.3
|
404
404
|
signing_key:
|