graphql-metrics 5.0.4 → 5.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7422838e228e2f0dd82382ee2b165b7ab7dfee2b5430044d5b8e2e3f83da173a
4
- data.tar.gz: 934f63e77e19731fa2f675185d92d81c30b9087a747cfddc7798986327b85a8c
3
+ metadata.gz: 9f93d51a57f59de189c9b97ad3f0f26eee049c3ec1af8dc77951cb3e892558f8
4
+ data.tar.gz: 62531e77262446959b6309c57a34e29313d8c006af3acbd2a9b74b02888d78d7
5
5
  SHA512:
6
- metadata.gz: 16f4f5ed3f00779216232748c5ad45e248b90b8827568d6f323e3a9477e61e273f67e66893bb439494d3e88526b8aec84a7fe1d35691b283235687cecacdbf58
7
- data.tar.gz: c69155471bc5c372903af17d8311b0a6f95c55df7f8e490436217ffbfb0c4472401567375ed097bc11b93aa4cd1276f3d64a7d09e6d3e41254efc0fbed0a1156
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:, &block)
19
- return yield if @skip_tracing
20
- capture_multiplex_start_time(&block)
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:, &block)
26
- return yield if @skip_tracing
27
- capture_lexing_time(&block)
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:, &block)
32
- return yield if @skip_tracing
33
- capture_parsing_time(&block)
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:, &block)
37
- return yield if @skip_tracing
38
- capture_validation_time(query.context, &block)
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:, &block)
43
- return yield if @skip_tracing
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
- yield
46
+ super
48
47
  end
49
48
 
50
- def analyze_query(query:, &block)
51
- return yield if @skip_tracing
52
- capture_analysis_time(query.context, &block)
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:, &block)
56
- return yield if @skip_tracing
57
- capture_query_start_time(query.context, &block)
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:, &block)
61
- return yield if @skip_tracing || query.context[SKIP_FIELD_AND_ARGUMENT_METRICS]
62
- return yield unless GraphQL::Metrics.timings_capture_enabled?(query.context)
63
- trace_field(GraphQL::Metrics::INLINE_FIELD_TIMINGS, query, &block)
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:, &block)
67
- return yield if @skip_tracing || query.context[SKIP_FIELD_AND_ARGUMENT_METRICS]
68
- return yield unless GraphQL::Metrics.timings_capture_enabled?(query.context)
69
- trace_field(GraphQL::Metrics::LAZY_FIELD_TIMINGS, query, &block)
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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GraphQL
4
4
  module Metrics
5
- VERSION = "5.0.4"
5
+ VERSION = "5.0.5"
6
6
  end
7
7
  end
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
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-03-27 00:00:00.000000000 Z
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.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: []