skylight 6.0.0.beta → 6.0.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 +5 -0
- data/lib/skylight/probes/graphql.rb +51 -4
- data/lib/skylight/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db7c1b9e7e3c11a49107722bc5493279ecd54ad5b82d01bc9458c15b8f94628d
|
4
|
+
data.tar.gz: 8d830a0cb96c6e9437d4433a380677bad41dae15d8e7a01b238c37ac85d31d2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8644d21c6ade08e05538ef1d237945b44fe87a58ea9301f3150423769c1dde523c8a9e1cae19f3f218df27349db1e5551ca95300ef32bc920473b70ad859d905
|
7
|
+
data.tar.gz: 9a27ba15d8ec9a51922628bc4851016f41fa7efd24f998e129fa3e36b09791b03fc23a05fa9ee0fbe8a3a30b0b8abbd9717927fd378d931342c29f6c058a6107
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 6.0.0-beta2 (prerelease)
|
2
|
+
- [IMPROVEMENT] Better support for GraphQL versions >= 2.0.18.
|
3
|
+
|
1
4
|
## 6.0.0-beta (prerelease)
|
2
5
|
- [BREAKING] End support for Ruby 2.6
|
3
6
|
- The following libraries are no longer tested and are not guaranteed to work with Skylight 6:
|
@@ -11,6 +14,8 @@
|
|
11
14
|
responder (like a Rails router), Skylight will not set the endpoint name after exception processing has started.
|
12
15
|
This means that error traces will now be aggregated under the original endpoint that generated the error (but with
|
13
16
|
the 'error' segment), rather than under the exception handler's controller and action name.
|
17
|
+
- [IMPROVEMENT] (Once again) Provide native support for FreeBSD.
|
18
|
+
- [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)
|
14
19
|
|
15
20
|
## 5.3.4 (October 17, 2022)
|
16
21
|
|
@@ -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.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: 2023-
|
11
|
+
date: 2023-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|