opentelemetry-instrumentation-graphql 0.26.4 → 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: d7dd33ec7aa4e3438bb3fee83f193b0f935654c0cf5144d18616f0cadabb4e50
4
- data.tar.gz: 85ce4c04a9725b67f15232bdfd7825565fab723119f49048ad182c2b52249617
3
+ metadata.gz: f2ee4e6b6b0313ac55ff8b18be5a3339c3179537d8c0dfc71a0bf008d24c808b
4
+ data.tar.gz: e74e1ac464c4f7c7bd789b6703163a48a4dd7a57dc0d60b49873551bae2b5624
5
5
  SHA512:
6
- metadata.gz: 07c6ecd695bc2833b9bbd7f799a64e795fcf214e74097f3e6ca971a92b0345cd375283efffba0fd3cfb8f70d1f3469d20cd15a1b170eb964c5e6e9766d88d337
7
- data.tar.gz: 66286561a18df82a1d507256989a0bc0b066608244d0771f69ffc8852cab5ba0a6b4bcb1f711b66ed4f05ecffa159463a8bb62e564ffa4be4dc3ce9763cc9333
6
+ metadata.gz: 21398d75cd97be83a36b0da4d7155c23b98c0780de93b4f0fc99b041397f1bef7afb79cd1c2ef61eb9f0b054ec8d7b995ec361c4302ae55d66854cd2dbb7e5df
7
+ data.tar.gz: f4f1bb42e7411615da3588d58badd0b91b693c45186f82a01ba02f732029b40d41018de119f98e0670c95622322ac4bb92ec6c07f81fc9560c556dcbe53b7d68
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
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
+
7
+ ### v0.26.5 / 2023-08-03
8
+
9
+ * FIXED: Remove inline linter rules
10
+
3
11
  ### v0.26.4 / 2023-08-01
4
12
 
5
13
  * FIXED: GraphQL tests and installation
@@ -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]
@@ -24,7 +24,7 @@ module OpenTelemetry
24
24
  'execute_multiplex' => 'graphql.execute_multiplex'
25
25
  }
26
26
 
27
- def platform_trace(platform_key, key, data) # rubocop:disable Metrics/CyclomaticComplexity
27
+ def platform_trace(platform_key, key, data)
28
28
  return yield if platform_key.nil?
29
29
 
30
30
  tracer.in_span(platform_key, attributes: attributes_for(key, data)) do |span|
@@ -85,7 +85,7 @@ module OpenTelemetry
85
85
  GraphQL::Instrumentation.instance.config
86
86
  end
87
87
 
88
- def attributes_for(key, data) # rubocop:disable Metrics/CyclomaticComplexity
88
+ def attributes_for(key, data)
89
89
  attributes = {}
90
90
  case key
91
91
  when 'execute_field', 'execute_field_lazy'
@@ -7,7 +7,7 @@
7
7
  module OpenTelemetry
8
8
  module Instrumentation
9
9
  module GraphQL
10
- VERSION = '0.26.4'
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.4
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-01 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
@@ -148,14 +148,14 @@ dependencies:
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: 1.54.1
151
+ version: 1.55.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.54.1
158
+ version: 1.55.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.4/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.4
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: