opentelemetry-instrumentation-graphql 0.26.2 → 0.26.3

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: c779f3e4eae9a48b4a87832cd8d065fd086c9a3a9b1bee0d71d849924234d0a1
4
- data.tar.gz: ff670c5b08ebbb8db9c99290d051601caf2f766358cb90978ac656299eae4e02
3
+ metadata.gz: bf6a9c04d2fda8873f4d2e312f0d5cdf9e73c718bca07d445c99df4d8f24066e
4
+ data.tar.gz: f1acfe9eb0448ac08cacd9e76780fe49f245e4cb409d2e4ede3678c35ce5e9b1
5
5
  SHA512:
6
- metadata.gz: b43c7cef255cba53b3d1ff09f647f03050de365498258ffd65ba36267046461ca85fde87effc8366e8f07c92ddbdb694807ad5061dd9b256767c49fcb5e04d85
7
- data.tar.gz: 85b20c4104cb92568aee082e6af35519f122a54c420a6dc736980a06ddefee1885055b2d844bd0208c4cbcd902b54f7edfe3f680fa67084059790136306c8790
6
+ metadata.gz: d90f95f3f7bd93108bc020faa9889251e575e13c5a9d5d2fcb64bc665abd7af0f2a0670b85c579647fc4a944e199b656857d507ac35fd0c86faffed4962c5c4e
7
+ data.tar.gz: aa8276d0ec7fdbb2e5676e4b57dfe5a33b2964ac9da1b7833461c2e6e5fa4776031c68831d8c459e6fee5ae696272ec01604e0cd39cf96e9b3ca7abc241537bb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-graphql
2
2
 
3
+ ### v0.26.3 / 2023-07-29
4
+
5
+ * FIXED: GraphQL validate events
6
+
3
7
  ### v0.26.2 / 2023-06-05
4
8
 
5
9
  * FIXED: Base config options
@@ -36,12 +36,13 @@ module OpenTelemetry
36
36
  def validate(query:, validate:, &block)
37
37
  tracer.in_span('graphql.validate') do |span|
38
38
  super.tap do |response|
39
- errors = response[:errors]&.compact&.map(&:to_h)&.to_json
40
- unless errors.nil?
39
+ errors = response[:errors]&.compact&.map(&:to_h) || []
40
+
41
+ unless errors.empty?
41
42
  span.add_event(
42
43
  'graphql.validation.error',
43
44
  attributes: {
44
- 'message' => errors
45
+ 'exception.message' => errors.to_json
45
46
  }
46
47
  )
47
48
  end
@@ -29,12 +29,15 @@ module OpenTelemetry
29
29
 
30
30
  tracer.in_span(platform_key, attributes: attributes_for(key, data)) do |span|
31
31
  yield.tap do |response|
32
- errors = response[:errors]&.compact&.map(&:to_h)&.to_json if key == 'validate'
33
- unless errors.nil?
32
+ next unless key == 'validate'
33
+
34
+ errors = response[:errors]&.compact&.map(&:to_h) || []
35
+
36
+ unless errors.empty?
34
37
  span.add_event(
35
38
  'graphql.validation.error',
36
39
  attributes: {
37
- 'message' => errors
40
+ 'exception.message' => errors.to_json
38
41
  }
39
42
  )
40
43
  end
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module GraphQL
10
- VERSION = '0.26.2'
10
+ VERSION = '0.26.3'
11
11
  end
12
12
  end
13
13
  end
@@ -15,5 +15,5 @@ module OpenTelemetry
15
15
  end
16
16
  end
17
17
 
18
- require_relative './graphql/instrumentation'
19
- require_relative './graphql/version'
18
+ require_relative 'graphql/instrumentation'
19
+ require_relative 'graphql/version'
@@ -16,4 +16,4 @@ module OpenTelemetry
16
16
  end
17
17
  end
18
18
 
19
- require_relative './instrumentation/graphql'
19
+ require_relative 'instrumentation/graphql'
@@ -4,4 +4,4 @@
4
4
  #
5
5
  # SPDX-License-Identifier: Apache-2.0
6
6
 
7
- require_relative './opentelemetry/instrumentation'
7
+ require_relative 'opentelemetry/instrumentation'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opentelemetry-instrumentation-graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.2
4
+ version: 0.26.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenTelemetry Authors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-05 00:00:00.000000000 Z
11
+ date: 2023-07-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -148,14 +148,14 @@ dependencies:
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: 1.50.2
151
+ version: 1.54.1
152
152
  type: :development
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: 1.50.2
158
+ version: 1.54.1
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: simplecov
161
161
  requirement: !ruby/object:Gem::Requirement
@@ -234,10 +234,10 @@ homepage: https://github.com/open-telemetry/opentelemetry-ruby-contrib
234
234
  licenses:
235
235
  - Apache-2.0
236
236
  metadata:
237
- changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-graphql/0.26.2/file/CHANGELOG.md
237
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-graphql/0.26.3/file/CHANGELOG.md
238
238
  source_code_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/tree/main/instrumentation/graphql
239
239
  bug_tracker_uri: https://github.com/open-telemetry/opentelemetry-ruby-contrib/issues
240
- documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-graphql/0.26.2
240
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-graphql/0.26.3
241
241
  post_install_message:
242
242
  rdoc_options: []
243
243
  require_paths: