opentelemetry-instrumentation-graphql 0.26.5 → 0.26.6

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: 882f9b77148ce1df4548a68ea952642e066f83c6374ab117ff225aa0230759a9
4
- data.tar.gz: e17b57812cd01e4168bccb3fb16e01bfdc8422fcc47fdc8ab5b1d9c8aa15f73d
3
+ metadata.gz: f2ee4e6b6b0313ac55ff8b18be5a3339c3179537d8c0dfc71a0bf008d24c808b
4
+ data.tar.gz: e74e1ac464c4f7c7bd789b6703163a48a4dd7a57dc0d60b49873551bae2b5624
5
5
  SHA512:
6
- metadata.gz: 86ee690ae6f3085598f3d097c37d9f53ba86e57469b75a0ad4a800377b8de4a197ff5772ff4a288a7e25dc708ffd2a2ec0b6a8378e80ce3f32fe3d1921ba9697
7
- data.tar.gz: 958032ccc0726720a9b59d7cae647e46c101346a1206454ac08656fcfd4550ff1770facf101ac82ba83d14176565cfdd2eb7610c1c6a90bf0d85810eb6599885
6
+ metadata.gz: 21398d75cd97be83a36b0da4d7155c23b98c0780de93b4f0fc99b041397f1bef7afb79cd1c2ef61eb9f0b054ec8d7b995ec361c4302ae55d66854cd2dbb7e5df
7
+ data.tar.gz: f4f1bb42e7411615da3588d58badd0b91b693c45186f82a01ba02f732029b40d41018de119f98e0670c95622322ac4bb92ec6c07f81fc9560c556dcbe53b7d68
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Release History: opentelemetry-instrumentation-graphql
2
2
 
3
+ ### v0.26.6 / 2023-08-26
4
+
5
+ * FIXED: Improve GraphQL tracing compatibility with other tracers
6
+
3
7
  ### v0.26.5 / 2023-08-03
4
8
 
5
9
  * FIXED: Remove inline linter rules
@@ -15,9 +15,9 @@ module OpenTelemetry
15
15
  module GraphQLTrace # rubocop:disable Metrics/ModuleLength
16
16
  def initialize(trace_scalars: false, **_options)
17
17
  @trace_scalars = trace_scalars
18
- @platform_field_key_cache = Hash.new { |h, k| h[k] = platform_field_key(k) }
19
- @platform_authorized_key_cache = Hash.new { |h, k| h[k] = platform_authorized_key(k) }
20
- @platform_resolve_type_key_cache = Hash.new { |h, k| h[k] = platform_resolve_type_key(k) }
18
+ @_otel_field_key_cache = Hash.new { |h, k| h[k] = _otel_field_key(k) }
19
+ @_otel_authorized_key_cache = Hash.new { |h, k| h[k] = _otel_authorized_key(k) }
20
+ @_otel_resolve_type_key_cache = Hash.new { |h, k| h[k] = _otel_resolve_type_key(k) }
21
21
  super
22
22
  end
23
23
 
@@ -72,7 +72,7 @@ module OpenTelemetry
72
72
  end
73
73
 
74
74
  def execute_field(field:, query:, ast_node:, arguments:, object:, &block)
75
- platform_key = platform_execute_field_key(field: field)
75
+ platform_key = _otel_execute_field_key(field: field)
76
76
  return super unless platform_key
77
77
 
78
78
  attributes = {}
@@ -84,7 +84,7 @@ module OpenTelemetry
84
84
  end
85
85
 
86
86
  def execute_field_lazy(field:, query:, ast_node:, arguments:, object:, &block)
87
- platform_key = platform_execute_field_key(field: field)
87
+ platform_key = _otel_execute_field_key(field: field)
88
88
  return super unless platform_key
89
89
 
90
90
  attributes = {}
@@ -96,7 +96,7 @@ module OpenTelemetry
96
96
  end
97
97
 
98
98
  def authorized(query:, type:, object:, &block)
99
- platform_key = @platform_authorized_key_cache[type]
99
+ platform_key = @_otel_authorized_key_cache[type]
100
100
  return super unless platform_key
101
101
 
102
102
  attributes = {}
@@ -107,7 +107,7 @@ module OpenTelemetry
107
107
  end
108
108
 
109
109
  def authorized_lazy(query:, type:, object:, &block)
110
- platform_key = @platform_authorized_key_cache[type]
110
+ platform_key = @_otel_authorized_key_cache[type]
111
111
  return super unless platform_key
112
112
 
113
113
  attributes = {}
@@ -118,7 +118,7 @@ module OpenTelemetry
118
118
  end
119
119
 
120
120
  def resolve_type(query:, type:, object:, &block)
121
- platform_key = @platform_resolve_type_key_cache[type]
121
+ platform_key = @_otel_resolve_type_key_cache[type]
122
122
 
123
123
  attributes = {}
124
124
  attributes['graphql.type.name'] = type.graphql_name
@@ -128,7 +128,7 @@ module OpenTelemetry
128
128
  end
129
129
 
130
130
  def resolve_type_lazy(query:, type:, object:, &block)
131
- platform_key = @platform_resolve_type_key_cache[type]
131
+ platform_key = @_otel_resolve_type_key_cache[type]
132
132
 
133
133
  attributes = {}
134
134
  attributes['graphql.type.name'] = type.graphql_name
@@ -139,9 +139,9 @@ module OpenTelemetry
139
139
 
140
140
  private
141
141
 
142
- def platform_execute_field_key(field:, &block)
142
+ def _otel_execute_field_key(field:, &block)
143
143
  trace_field = trace_field?(field)
144
- platform_key = @platform_field_key_cache[field] if trace_field
144
+ platform_key = @_otel_field_key_cache[field] if trace_field
145
145
  platform_key if platform_key && trace_field
146
146
  end
147
147
 
@@ -155,7 +155,7 @@ module OpenTelemetry
155
155
  end
156
156
  end
157
157
 
158
- def platform_field_key(field)
158
+ def _otel_field_key(field)
159
159
  return unless config[:enable_platform_field]
160
160
 
161
161
  if config[:legacy_platform_span_names]
@@ -165,7 +165,7 @@ module OpenTelemetry
165
165
  end
166
166
  end
167
167
 
168
- def platform_authorized_key(type)
168
+ def _otel_authorized_key(type)
169
169
  return unless config[:enable_platform_authorized]
170
170
 
171
171
  if config[:legacy_platform_span_names]
@@ -175,7 +175,7 @@ module OpenTelemetry
175
175
  end
176
176
  end
177
177
 
178
- def platform_resolve_type_key(type)
178
+ def _otel_resolve_type_key(type)
179
179
  return unless config[:enable_platform_resolve_type]
180
180
 
181
181
  if config[:legacy_platform_span_names]
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module GraphQL
10
- VERSION = '0.26.5'
10
+ VERSION = '0.26.6'
11
11
  end
12
12
  end
13
13
  end
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.5
4
+ version: 0.26.6
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-08-03 00:00:00.000000000 Z
11
+ date: 2023-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opentelemetry-api
@@ -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.5/file/CHANGELOG.md
237
+ changelog_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-graphql/0.26.6/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.5
240
+ documentation_uri: https://rubydoc.info/gems/opentelemetry-instrumentation-graphql/0.26.6
241
241
  post_install_message:
242
242
  rdoc_options: []
243
243
  require_paths: