graphql-metrics 5.0.4 → 5.0.5
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/graphql/metrics/trace.rb +29 -30
- data/lib/graphql/metrics/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9f93d51a57f59de189c9b97ad3f0f26eee049c3ec1af8dc77951cb3e892558f8
|
4
|
+
data.tar.gz: 62531e77262446959b6309c57a34e29313d8c006af3acbd2a9b74b02888d78d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b8782d2b3ffe8891f2f54e8554b8c3f1e121090fd74525f64ae38730a1bc4d277f0fa8a4bf7d7ae5e33258edae3e6f31351a1bf897507a92de828fcde5854a7
|
7
|
+
data.tar.gz: 16aa581d6b9073dbd6ca0db8ebada56c6d4af05e74e4f78ac0d20577768068f5f39b620860bfc4cb2470da1825dee9a0f25f8a26ec4e1dddaf8c22e1867ef8c4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
|
+
5.0.5
|
2
|
+
-----
|
3
|
+
- [73](https://github.com/Shopify/graphql-metrics/pull/73) Fix calls to other traces.
|
4
|
+
|
1
5
|
5.0.4
|
2
6
|
-----
|
7
|
+
- [66](https://github.com/Shopify/graphql-metrics/pull/66) Support graphql-ruby's new tracing API (backwards compatible)
|
3
8
|
- [71](https://github.com/Shopify/graphql-metrics/pull/71) Fix handling of inline fragment without a parent type.
|
4
9
|
|
5
10
|
5.0.3
|
@@ -15,58 +15,57 @@ module GraphQL
|
|
15
15
|
# multiplexing multiple queries.
|
16
16
|
|
17
17
|
# wraps everything below this line; only run once
|
18
|
-
def execute_multiplex(multiplex
|
19
|
-
return
|
20
|
-
capture_multiplex_start_time
|
21
|
-
|
18
|
+
def execute_multiplex(multiplex:)
|
19
|
+
return super if @skip_tracing
|
20
|
+
capture_multiplex_start_time { super }
|
22
21
|
end
|
23
22
|
|
24
23
|
# may not trigger if the query is passed in pre-parsed
|
25
|
-
def lex(query_string
|
26
|
-
return
|
27
|
-
capture_lexing_time
|
24
|
+
def lex(query_string:)
|
25
|
+
return super if @skip_tracing
|
26
|
+
capture_lexing_time { super }
|
28
27
|
end
|
29
28
|
|
30
29
|
# may not trigger if the query is passed in pre-parsed
|
31
|
-
def parse(query_string
|
32
|
-
return
|
33
|
-
capture_parsing_time
|
30
|
+
def parse(query_string:)
|
31
|
+
return super if @skip_tracing
|
32
|
+
capture_parsing_time { super }
|
34
33
|
end
|
35
34
|
|
36
|
-
def validate(query:, validate
|
37
|
-
return
|
38
|
-
capture_validation_time(query.context
|
35
|
+
def validate(query:, validate:)
|
36
|
+
return super if @skip_tracing
|
37
|
+
capture_validation_time(query.context) { super }
|
39
38
|
end
|
40
39
|
|
41
40
|
# wraps all `analyze_query`s; only run once
|
42
|
-
def analyze_multiplex(multiplex
|
43
|
-
return
|
41
|
+
def analyze_multiplex(multiplex:)
|
42
|
+
return super if @skip_tracing
|
44
43
|
# Ensures that we reset potentially long-lived PreContext objects between multiplexs. We reset at this point
|
45
44
|
# since all parsing and validation will be done by this point, and a GraphQL::Query::Context will exist.
|
46
45
|
pre_context.reset
|
47
|
-
|
46
|
+
super
|
48
47
|
end
|
49
48
|
|
50
|
-
def analyze_query(query
|
51
|
-
return
|
52
|
-
capture_analysis_time(query.context
|
49
|
+
def analyze_query(query:)
|
50
|
+
return super if @skip_tracing
|
51
|
+
capture_analysis_time(query.context) { super }
|
53
52
|
end
|
54
53
|
|
55
|
-
def execute_query(query
|
56
|
-
return
|
57
|
-
capture_query_start_time(query.context
|
54
|
+
def execute_query(query:)
|
55
|
+
return super if @skip_tracing
|
56
|
+
capture_query_start_time(query.context) { super }
|
58
57
|
end
|
59
58
|
|
60
|
-
def execute_field(field:, query:, ast_node:, arguments:, object
|
61
|
-
return
|
62
|
-
return
|
63
|
-
trace_field(GraphQL::Metrics::INLINE_FIELD_TIMINGS, query
|
59
|
+
def execute_field(field:, query:, ast_node:, arguments:, object:)
|
60
|
+
return super if @skip_tracing || query.context[SKIP_FIELD_AND_ARGUMENT_METRICS]
|
61
|
+
return super unless GraphQL::Metrics.timings_capture_enabled?(query.context)
|
62
|
+
trace_field(GraphQL::Metrics::INLINE_FIELD_TIMINGS, query) { super }
|
64
63
|
end
|
65
64
|
|
66
|
-
def execute_field_lazy(field:, query:, ast_node:, arguments:, object
|
67
|
-
return
|
68
|
-
return
|
69
|
-
trace_field(GraphQL::Metrics::LAZY_FIELD_TIMINGS, query
|
65
|
+
def execute_field_lazy(field:, query:, ast_node:, arguments:, object:)
|
66
|
+
return super if @skip_tracing || query.context[SKIP_FIELD_AND_ARGUMENT_METRICS]
|
67
|
+
return super unless GraphQL::Metrics.timings_capture_enabled?(query.context)
|
68
|
+
trace_field(GraphQL::Metrics::LAZY_FIELD_TIMINGS, query) { super }
|
70
69
|
end
|
71
70
|
|
72
71
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: graphql-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.
|
4
|
+
version: 5.0.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Butcher
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: graphql
|
@@ -230,7 +230,7 @@ homepage: https://github.com/Shopify/graphql-metrics
|
|
230
230
|
licenses:
|
231
231
|
- MIT
|
232
232
|
metadata: {}
|
233
|
-
post_install_message:
|
233
|
+
post_install_message:
|
234
234
|
rdoc_options: []
|
235
235
|
require_paths:
|
236
236
|
- lib
|
@@ -245,8 +245,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
245
245
|
- !ruby/object:Gem::Version
|
246
246
|
version: '0'
|
247
247
|
requirements: []
|
248
|
-
rubygems_version: 3.3.
|
249
|
-
signing_key:
|
248
|
+
rubygems_version: 3.0.3.1
|
249
|
+
signing_key:
|
250
250
|
specification_version: 4
|
251
251
|
summary: GraphQL Metrics Extractor
|
252
252
|
test_files: []
|