graphql-metrics 5.0.6 → 5.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: efe8bea1e59d9020f597627aedf1cde1735d6c2558c5910e3e818e5bf7cab6ff
4
- data.tar.gz: e28a49b6e546eaa55cb4d8e3b34ad2a81d4ea4b5c7c3edd62f300206d84ff3b1
3
+ metadata.gz: fb76c2152e1b9b2f4aa99e247bbe12d4c73dc025782f0aab882b13b52c2fc842
4
+ data.tar.gz: 704828351a5ecd8d46543137fae938e9305a3e3387cfd09f18658ccc14805ea4
5
5
  SHA512:
6
- metadata.gz: 19aa99f9ee90e7af56f762890fab216cabb01d73775b49caa98c896add21272b6f83d149d379df1ee10d5644527bce17e7c8cad7650a411d001684815c1c2cdb
7
- data.tar.gz: 0de176edaa686d33f5b8de7986353d64a9b1e80a11293808ae333ecd46f5bd531baa1c871374b297280b0550fc2a791783ddf371e92be55ed21b921a54790ac7
6
+ metadata.gz: 3a8482de9c2476cdda17d2368a9a814c3be8344bf53e6599dff40302db2e0d8386d7f2e7882862253b0bd58a1cdeda1429d541953e69c85ba897019b0f18fbf7
7
+ data.tar.gz: d42a59103325ed909e1d4954269c4fd9d99c70207302adfc6e490005657fff87dd1318dc3d37deb0da60d0561a4c588b08aeaba26204fb8ed0bb71678b0548a5
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ 5.0.7
2
+ -----
3
+ - [75](https://github.com/Shopify/graphql-metrics/pull/75) Trace: capture path before yielding
4
+
1
5
  5.0.6
2
6
  -----
3
7
  - [74](https://github.com/Shopify/graphql-metrics/pull/74) Fix skip_tracing compatibility with new Tracing API
@@ -181,13 +181,14 @@ module GraphQL
181
181
  ns = query.context.namespace(CONTEXT_NAMESPACE)
182
182
  offset_time = ns[GraphQL::Metrics::QUERY_START_TIME_MONOTONIC]
183
183
  start_time = GraphQL::Metrics.current_time_monotonic
184
+ path = query.context[:current_path]
184
185
 
185
186
  result = yield
186
187
 
187
188
  duration = GraphQL::Metrics.current_time_monotonic - start_time
188
189
  time_since_offset = start_time - offset_time if offset_time
189
190
 
190
- path_excluding_numeric_indicies = query.context[:current_path].select { |p| p.is_a?(String) }
191
+ path_excluding_numeric_indicies = path.select { |p| p.is_a?(String) }
191
192
  ns[context_key][path_excluding_numeric_indicies] ||= []
192
193
  ns[context_key][path_excluding_numeric_indicies] << {
193
194
  start_time_offset: time_since_offset, duration: duration
@@ -2,6 +2,6 @@
2
2
 
3
3
  module GraphQL
4
4
  module Metrics
5
- VERSION = "5.0.6"
5
+ VERSION = "5.0.7"
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.6
4
+ version: 5.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Butcher
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-12 00:00:00.000000000 Z
11
+ date: 2023-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: graphql