graphql 1.13.20 → 1.13.21

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: 42ac23f472a071c76db0088cb6b8971b47dded8692fa0b6579d81a03b448eaf3
4
- data.tar.gz: ce9dfbaef1d8735ffde98da1133f5369c97966e73c4fdf792225b299f3f84c7b
3
+ metadata.gz: e6f4a769f1d336cba980166fa10a5fb9e2f27bd160c1244a150ce7e6e176af1a
4
+ data.tar.gz: 2f856cb35f4da282f44aa0273f299503fba684f1337cea9c255e14b1d2901d5d
5
5
  SHA512:
6
- metadata.gz: 51a45060c4ce9a6fbaa256c85e01b81818c0424ebb5248a563ddecc7fcafedfc7b0a7ddeab28df78ab7b22e4e1f2b385e040b366cd866acf43fb7689f2a8e2cd
7
- data.tar.gz: e0440aa1314f6c2e9e99dc0df00c8f4f99a7efcc92e8b64733ac146caa01959a5dea11f40a8be1b10810a07d2f948d7a8bb045704298540884900ba3d7f0ae74
6
+ metadata.gz: 181400c68fa6ad9e91f4c7d72e5114e1eed235659c9202088e645df46bc6b85f78c9ad4a10b8d6358ad31150438f931bdf16be060f38755b78e40f5943b91943
7
+ data.tar.gz: d5b472779668fcb6167ec9880e6b7ec1893474217cc81286ecc63cd47beeca92b885db9d9f35ef6b49a85b19b64b25f9cd9d3e12bc75727577e678cd9bcefd9d
@@ -15,12 +15,9 @@ module GraphQL
15
15
  }
16
16
 
17
17
  def platform_trace(platform_key, key, data)
18
- tracer.trace(platform_key, service: service_name) do |span|
19
- span.span_type = 'custom'
20
- if defined?(Datadog::Tracing::Metadata::Ext) # Introduced in ddtrace 1.0
21
- span.set_tag(Datadog::Tracing::Metadata::Ext::TAG_COMPONENT, 'graphql')
22
- span.set_tag(Datadog::Tracing::Metadata::Ext::TAG_OPERATION, key)
23
- end
18
+ tracer.trace(platform_key, service: options[:service], type: 'custom') do |span|
19
+ span.set_tag('component', 'graphql')
20
+ span.set_tag('operation', key)
24
21
 
25
22
  if key == 'execute_multiplex'
26
23
  operations = data[:multiplex].queries.map(&:selected_operation_name).join(', ')
@@ -33,10 +30,8 @@ module GraphQL
33
30
  end
34
31
  span.resource = resource if resource
35
32
 
36
- # For top span of query, set the analytics sample rate tag, if available.
37
- if analytics_enabled?
38
- Datadog::Contrib::Analytics.set_sample_rate(span, analytics_sample_rate)
39
- end
33
+ # [Deprecated] will be removed in the future
34
+ span.set_metric('_dd1.sr.eausr', analytics_sample_rate) if analytics_enabled?
40
35
  end
41
36
 
42
37
  if key == 'execute_query'
@@ -51,10 +46,6 @@ module GraphQL
51
46
  end
52
47
  end
53
48
 
54
- def service_name
55
- options.fetch(:service, 'ruby-graphql')
56
- end
57
-
58
49
  # Implement this method in a subclass to apply custom tags to datadog spans
59
50
  # @param key [String] The event being traced
60
51
  # @param data [Hash] The runtime data for this event (@see GraphQL::Tracing for keys for each event)
@@ -65,17 +56,13 @@ module GraphQL
65
56
  def tracer
66
57
  default_tracer = defined?(Datadog::Tracing) ? Datadog::Tracing : Datadog.tracer
67
58
 
59
+ # [Deprecated] options[:tracer] will be removed in the future
68
60
  options.fetch(:tracer, default_tracer)
69
61
  end
70
62
 
71
- def analytics_available?
72
- defined?(Datadog::Contrib::Analytics) \
73
- && Datadog::Contrib::Analytics.respond_to?(:enabled?) \
74
- && Datadog::Contrib::Analytics.respond_to?(:set_sample_rate)
75
- end
76
-
77
63
  def analytics_enabled?
78
- analytics_available? && Datadog::Contrib::Analytics.enabled?(options.fetch(:analytics_enabled, false))
64
+ # [Deprecated] options[:analytics_enabled] will be removed in the future
65
+ options.fetch(:analytics_enabled, false)
79
66
  end
80
67
 
81
68
  def analytics_sample_rate
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module GraphQL
3
- VERSION = "1.13.20"
3
+ VERSION = "1.13.21"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphql
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.20
4
+ version: 1.13.21
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Mosolgo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-20 00:00:00.000000000 Z
11
+ date: 2024-01-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: benchmark-ips
@@ -722,7 +722,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
722
722
  - !ruby/object:Gem::Version
723
723
  version: '0'
724
724
  requirements: []
725
- rubygems_version: 3.4.10
725
+ rubygems_version: 3.5.5
726
726
  signing_key:
727
727
  specification_version: 4
728
728
  summary: A GraphQL language and runtime for Ruby