ddtrace 0.38.0 → 0.39.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/Appraisals +29 -5
  3. data/CHANGELOG.md +31 -1
  4. data/Rakefile +69 -66
  5. data/docs/GettingStarted.md +85 -50
  6. data/lib/ddtrace.rb +1 -0
  7. data/lib/ddtrace/configuration/settings.rb +9 -3
  8. data/lib/ddtrace/contrib/action_cable/configuration/settings.rb +7 -2
  9. data/lib/ddtrace/contrib/action_cable/ext.rb +5 -2
  10. data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +7 -0
  11. data/lib/ddtrace/contrib/action_pack/configuration/settings.rb +7 -2
  12. data/lib/ddtrace/contrib/action_pack/ext.rb +5 -2
  13. data/lib/ddtrace/contrib/action_view/configuration/settings.rb +7 -2
  14. data/lib/ddtrace/contrib/action_view/ext.rb +5 -2
  15. data/lib/ddtrace/contrib/active_model_serializers/configuration/settings.rb +7 -2
  16. data/lib/ddtrace/contrib/active_model_serializers/ext.rb +5 -2
  17. data/lib/ddtrace/contrib/active_record/configuration/settings.rb +7 -2
  18. data/lib/ddtrace/contrib/active_record/ext.rb +5 -2
  19. data/lib/ddtrace/contrib/active_support/configuration/settings.rb +7 -2
  20. data/lib/ddtrace/contrib/active_support/ext.rb +5 -2
  21. data/lib/ddtrace/contrib/aws/configuration/settings.rb +7 -2
  22. data/lib/ddtrace/contrib/aws/ext.rb +5 -2
  23. data/lib/ddtrace/contrib/concurrent_ruby/configuration/settings.rb +5 -0
  24. data/lib/ddtrace/contrib/concurrent_ruby/ext.rb +1 -0
  25. data/lib/ddtrace/contrib/configuration/settings.rb +1 -0
  26. data/lib/ddtrace/contrib/dalli/configuration/settings.rb +7 -2
  27. data/lib/ddtrace/contrib/dalli/ext.rb +5 -2
  28. data/lib/ddtrace/contrib/delayed_job/configuration/settings.rb +7 -2
  29. data/lib/ddtrace/contrib/delayed_job/ext.rb +5 -2
  30. data/lib/ddtrace/contrib/elasticsearch/configuration/settings.rb +7 -2
  31. data/lib/ddtrace/contrib/elasticsearch/ext.rb +5 -2
  32. data/lib/ddtrace/contrib/ethon/configuration/settings.rb +7 -2
  33. data/lib/ddtrace/contrib/ethon/ext.rb +5 -2
  34. data/lib/ddtrace/contrib/excon/configuration/settings.rb +7 -2
  35. data/lib/ddtrace/contrib/excon/ext.rb +5 -2
  36. data/lib/ddtrace/contrib/extensions.rb +1 -1
  37. data/lib/ddtrace/contrib/faraday/configuration/settings.rb +7 -2
  38. data/lib/ddtrace/contrib/faraday/ext.rb +5 -2
  39. data/lib/ddtrace/contrib/faraday/patcher.rb +12 -3
  40. data/lib/ddtrace/contrib/grape/configuration/settings.rb +7 -3
  41. data/lib/ddtrace/contrib/grape/ext.rb +5 -2
  42. data/lib/ddtrace/contrib/graphql/configuration/settings.rb +7 -2
  43. data/lib/ddtrace/contrib/graphql/ext.rb +5 -2
  44. data/lib/ddtrace/contrib/grpc/configuration/settings.rb +7 -2
  45. data/lib/ddtrace/contrib/grpc/ext.rb +5 -2
  46. data/lib/ddtrace/contrib/http/configuration/settings.rb +7 -2
  47. data/lib/ddtrace/contrib/http/ext.rb +5 -2
  48. data/lib/ddtrace/contrib/httprb/configuration/settings.rb +7 -2
  49. data/lib/ddtrace/contrib/httprb/ext.rb +5 -2
  50. data/lib/ddtrace/contrib/httprb/instrumentation.rb +3 -6
  51. data/lib/ddtrace/contrib/kafka/configuration/settings.rb +7 -2
  52. data/lib/ddtrace/contrib/kafka/ext.rb +5 -2
  53. data/lib/ddtrace/contrib/mongodb/configuration/settings.rb +7 -2
  54. data/lib/ddtrace/contrib/mongodb/ext.rb +5 -2
  55. data/lib/ddtrace/contrib/mysql2/configuration/settings.rb +7 -2
  56. data/lib/ddtrace/contrib/mysql2/ext.rb +5 -2
  57. data/lib/ddtrace/contrib/presto/configuration/settings.rb +7 -2
  58. data/lib/ddtrace/contrib/presto/ext.rb +5 -2
  59. data/lib/ddtrace/contrib/racecar/configuration/settings.rb +7 -2
  60. data/lib/ddtrace/contrib/racecar/ext.rb +5 -2
  61. data/lib/ddtrace/contrib/rack/configuration/settings.rb +7 -2
  62. data/lib/ddtrace/contrib/rack/ext.rb +5 -2
  63. data/lib/ddtrace/contrib/rails/configuration/settings.rb +7 -2
  64. data/lib/ddtrace/contrib/rails/ext.rb +5 -2
  65. data/lib/ddtrace/contrib/rake/configuration/settings.rb +7 -3
  66. data/lib/ddtrace/contrib/rake/ext.rb +5 -2
  67. data/lib/ddtrace/contrib/redis/configuration/settings.rb +7 -2
  68. data/lib/ddtrace/contrib/redis/ext.rb +5 -2
  69. data/lib/ddtrace/contrib/resque/configuration/settings.rb +7 -2
  70. data/lib/ddtrace/contrib/resque/ext.rb +5 -2
  71. data/lib/ddtrace/contrib/rest_client/configuration/settings.rb +7 -2
  72. data/lib/ddtrace/contrib/rest_client/ext.rb +5 -2
  73. data/lib/ddtrace/contrib/sequel/configuration/settings.rb +7 -2
  74. data/lib/ddtrace/contrib/sequel/ext.rb +5 -2
  75. data/lib/ddtrace/contrib/sequel/utils.rb +19 -1
  76. data/lib/ddtrace/contrib/shoryuken/configuration/settings.rb +7 -2
  77. data/lib/ddtrace/contrib/shoryuken/ext.rb +5 -2
  78. data/lib/ddtrace/contrib/sidekiq/configuration/settings.rb +7 -2
  79. data/lib/ddtrace/contrib/sidekiq/ext.rb +5 -2
  80. data/lib/ddtrace/contrib/sinatra/configuration/settings.rb +7 -2
  81. data/lib/ddtrace/contrib/sinatra/ext.rb +5 -2
  82. data/lib/ddtrace/contrib/sneakers/configuration/settings.rb +32 -0
  83. data/lib/ddtrace/contrib/sneakers/ext.rb +22 -0
  84. data/lib/ddtrace/contrib/sneakers/integration.rb +41 -0
  85. data/lib/ddtrace/contrib/sneakers/patcher.rb +24 -0
  86. data/lib/ddtrace/contrib/sneakers/tracer.rb +58 -0
  87. data/lib/ddtrace/contrib/sucker_punch/configuration/settings.rb +7 -2
  88. data/lib/ddtrace/contrib/sucker_punch/ext.rb +5 -2
  89. data/lib/ddtrace/diagnostics/environment_logger.rb +1 -1
  90. data/lib/ddtrace/environment.rb +14 -4
  91. data/lib/ddtrace/ext/diagnostics.rb +2 -1
  92. data/lib/ddtrace/ext/transport.rb +1 -0
  93. data/lib/ddtrace/logger.rb +1 -1
  94. data/lib/ddtrace/runtime/metrics.rb +18 -4
  95. data/lib/ddtrace/transport/http.rb +15 -0
  96. data/lib/ddtrace/transport/http/adapters/test.rb +2 -0
  97. data/lib/ddtrace/version.rb +1 -1
  98. metadata +36 -46
@@ -4,8 +4,11 @@ module Datadog
4
4
  # Sinatra integration constants
5
5
  module Ext
6
6
  APP = 'sinatra'.freeze
7
- ENV_ANALYTICS_ENABLED = 'DD_SINATRA_ANALYTICS_ENABLED'.freeze
8
- ENV_ANALYTICS_SAMPLE_RATE = 'DD_SINATRA_ANALYTICS_SAMPLE_RATE'.freeze
7
+ ENV_ENABLED = 'DD_TRACE_SINATRA_ENABLED'.freeze
8
+ ENV_ANALYTICS_ENABLED = 'DD_TRACE_SINATRA_ANALYTICS_ENABLED'.freeze
9
+ ENV_ANALYTICS_ENABLED_OLD = 'DD_SINATRA_ANALYTICS_ENABLED'.freeze
10
+ ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_SINATRA_ANALYTICS_SAMPLE_RATE'.freeze
11
+ ENV_ANALYTICS_SAMPLE_RATE_OLD = 'DD_SINATRA_ANALYTICS_SAMPLE_RATE'.freeze
9
12
  RACK_ENV_REQUEST_SPAN = 'datadog.sinatra_request_span'.freeze
10
13
  RACK_ENV_MIDDLEWARE_START_TIME = 'datadog.sinatra_middleware_start_time'.freeze
11
14
  RACK_ENV_MIDDLEWARE_TRACED = 'datadog.sinatra_middleware_traced'.freeze
@@ -0,0 +1,32 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ddtrace/contrib/configuration/settings'
4
+
5
+ module Datadog
6
+ module Contrib
7
+ module Sneakers
8
+ module Configuration
9
+ # Default settings for the Shoryuken integration
10
+ class Settings < Datadog::Contrib::Configuration::Settings
11
+ option :enabled do |o|
12
+ o.default { env_to_bool(Ext::ENV_ENABLED, true) }
13
+ o.lazy
14
+ end
15
+
16
+ option :analytics_enabled do |o|
17
+ o.default { env_to_bool([Ext::ENV_ANALYTICS_ENABLED, Ext::ENV_ANALYTICS_ENABLED_OLD], false) }
18
+ o.lazy
19
+ end
20
+
21
+ option :analytics_sample_rate do |o|
22
+ o.default { env_to_float([Ext::ENV_ANALYTICS_SAMPLE_RATE, Ext::ENV_ANALYTICS_SAMPLE_RATE_OLD], 1.0) }
23
+ o.lazy
24
+ end
25
+
26
+ option :service_name, default: Ext::SERVICE_NAME
27
+ option :tag_body, default: false
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Datadog
4
+ module Contrib
5
+ module Sneakers
6
+ # Sneakers integration constants
7
+ module Ext
8
+ APP = 'sneakers'.freeze
9
+ ENV_ENABLED = 'DD_TRACE_SNEAKERS_ENABLED'.freeze
10
+ ENV_ANALYTICS_ENABLED = 'DD_TRACE_SNEAKERS_ANALYTICS_ENABLED'.freeze
11
+ ENV_ANALYTICS_ENABLED_OLD = 'DD_SNEAKERS_ANALYTICS_ENABLED'.freeze
12
+ ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_SNEAKERS_ANALYTICS_SAMPLE_RATE'.freeze
13
+ ENV_ANALYTICS_SAMPLE_RATE_OLD = 'DD_SNEAKERS_ANALYTICS_SAMPLE_RATE'.freeze
14
+ SERVICE_NAME = 'sneakers'.freeze
15
+ SPAN_JOB = 'sneakers.job'.freeze
16
+ TAG_JOB_ROUTING_KEY = 'sneakers.routing_key'.freeze
17
+ TAG_JOB_QUEUE = 'sneakers.queue'.freeze
18
+ TAG_JOB_BODY = 'sneakers.body'.freeze
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,41 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ddtrace/contrib/integration'
4
+ require 'ddtrace/contrib/sneakers/ext'
5
+ require 'ddtrace/contrib/sneakers/configuration/settings'
6
+ require 'ddtrace/contrib/sneakers/patcher'
7
+
8
+ module Datadog
9
+ module Contrib
10
+ module Sneakers
11
+ # Description of Sneakers integration
12
+ class Integration
13
+ include Datadog::Contrib::Integration
14
+
15
+ MINIMUM_VERSION = Gem::Version.new('2.12.0')
16
+
17
+ register_as :sneakers, auto_patch: true
18
+
19
+ def self.version
20
+ Gem.loaded_specs['sneakers'] && Gem.loaded_specs['sneakers'].version
21
+ end
22
+
23
+ def self.loaded?
24
+ !defined?(::Sneakers).nil?
25
+ end
26
+
27
+ def self.compatible?
28
+ super && version >= MINIMUM_VERSION
29
+ end
30
+
31
+ def default_configuration
32
+ Configuration::Settings.new
33
+ end
34
+
35
+ def patcher
36
+ Patcher
37
+ end
38
+ end
39
+ end
40
+ end
41
+ end
@@ -0,0 +1,24 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ddtrace/contrib/sneakers/tracer'
4
+
5
+ module Datadog
6
+ module Contrib
7
+ module Sneakers
8
+ # Patcher enables patching of 'sneakers' module.
9
+ module Patcher
10
+ include Datadog::Contrib::Patcher
11
+
12
+ module_function
13
+
14
+ def target_version
15
+ Integration.version
16
+ end
17
+
18
+ def patch
19
+ ::Sneakers.middleware.use(Sneakers::Tracer, nil)
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,58 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'ddtrace/contrib/analytics'
4
+
5
+ module Datadog
6
+ module Contrib
7
+ module Sneakers
8
+ # Tracer is a Sneakers server-side middleware which traces executed jobs
9
+ class Tracer
10
+ def initialize(app, *args)
11
+ @app = app
12
+ @args = args
13
+ end
14
+
15
+ def call(deserialized_msg, delivery_info, metadata, handler)
16
+ trace_options = {
17
+ service: configuration[:service_name],
18
+ span_type: Datadog::Ext::AppTypes::WORKER
19
+ }
20
+ request_span = tracer.trace(Ext::SPAN_JOB, trace_options)
21
+
22
+ # Set analytics sample rate
23
+ if Datadog::Contrib::Analytics.enabled?(configuration[:analytics_enabled])
24
+ Datadog::Contrib::Analytics.set_sample_rate(request_span, configuration[:analytics_sample_rate])
25
+ end
26
+
27
+ # Measure service stats
28
+ Contrib::Analytics.set_measured(request_span)
29
+
30
+ request_span.resource = @app.to_proc.binding.eval('self.class').to_s
31
+ request_span.set_tag(Ext::TAG_JOB_ROUTING_KEY, delivery_info.routing_key)
32
+ request_span.set_tag(Ext::TAG_JOB_QUEUE, delivery_info.consumer.queue.name)
33
+
34
+ if configuration[:tag_body]
35
+ request_span.set_tag(Ext::TAG_JOB_BODY, deserialized_msg)
36
+ end
37
+
38
+ @app.call(deserialized_msg, delivery_info, metadata, handler)
39
+ rescue StandardError => e
40
+ request_span.set_error(e) unless request_span.nil?
41
+ raise e
42
+ ensure
43
+ request_span.finish if request_span
44
+ end
45
+
46
+ private
47
+
48
+ def tracer
49
+ configuration[:tracer]
50
+ end
51
+
52
+ def configuration
53
+ Datadog.configuration[:sneakers]
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -7,13 +7,18 @@ module Datadog
7
7
  module Configuration
8
8
  # Custom settings for the SuckerPunch integration
9
9
  class Settings < Contrib::Configuration::Settings
10
+ option :enabled do |o|
11
+ o.default { env_to_bool(Ext::ENV_ENABLED, true) }
12
+ o.lazy
13
+ end
14
+
10
15
  option :analytics_enabled do |o|
11
- o.default { env_to_bool(Ext::ENV_ANALYTICS_ENABLED, false) }
16
+ o.default { env_to_bool([Ext::ENV_ANALYTICS_ENABLED, Ext::ENV_ANALYTICS_ENABLED_OLD], false) }
12
17
  o.lazy
13
18
  end
14
19
 
15
20
  option :analytics_sample_rate do |o|
16
- o.default { env_to_float(Ext::ENV_ANALYTICS_SAMPLE_RATE, 1.0) }
21
+ o.default { env_to_float([Ext::ENV_ANALYTICS_SAMPLE_RATE, Ext::ENV_ANALYTICS_SAMPLE_RATE_OLD], 1.0) }
17
22
  o.lazy
18
23
  end
19
24
 
@@ -4,8 +4,11 @@ module Datadog
4
4
  # SuckerPunch integration constants
5
5
  module Ext
6
6
  APP = 'sucker_punch'.freeze
7
- ENV_ANALYTICS_ENABLED = 'DD_SUCKER_PUNCH_ANALYTICS_ENABLED'.freeze
8
- ENV_ANALYTICS_SAMPLE_RATE = 'DD_SUCKER_PUNCH_ANALYTICS_SAMPLE_RATE'.freeze
7
+ ENV_ENABLED = 'DD_TRACE_SUCKER_PUNCH_ENABLED'.freeze
8
+ ENV_ANALYTICS_ENABLED = 'DD_TRACE_SUCKER_PUNCH_ANALYTICS_ENABLED'.freeze
9
+ ENV_ANALYTICS_ENABLED_OLD = 'DD_SUCKER_PUNCH_ANALYTICS_ENABLED'.freeze
10
+ ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_SUCKER_PUNCH_ANALYTICS_SAMPLE_RATE'.freeze
11
+ ENV_ANALYTICS_SAMPLE_RATE_OLD = 'DD_SUCKER_PUNCH_ANALYTICS_SAMPLE_RATE'.freeze
9
12
  SERVICE_NAME = 'sucker_punch'.freeze
10
13
  SPAN_PERFORM = 'sucker_punch.perform'.freeze
11
14
  SPAN_PERFORM_ASYNC = 'sucker_punch.perform_async'.freeze
@@ -28,7 +28,7 @@ module Datadog
28
28
  private
29
29
 
30
30
  def log_environment!(line)
31
- Datadog.logger.warn("DATADOG TRACER CONFIGURATION - #{line}")
31
+ Datadog.logger.info("DATADOG TRACER CONFIGURATION - #{line}")
32
32
  end
33
33
 
34
34
  def log_error!(type, error)
@@ -6,24 +6,34 @@ module Datadog
6
6
  # Defines helper methods for environment
7
7
  module Helpers
8
8
  def env_to_bool(var, default = nil)
9
- ENV.key?(var) ? ENV[var].to_s.strip.downcase == 'true' : default
9
+ var = decode_array(var)
10
+ var && ENV.key?(var) ? ENV[var].to_s.strip.downcase == 'true' : default
10
11
  end
11
12
 
12
13
  def env_to_int(var, default = nil)
13
- ENV.key?(var) ? ENV[var].to_i : default
14
+ var = decode_array(var)
15
+ var && ENV.key?(var) ? ENV[var].to_i : default
14
16
  end
15
17
 
16
18
  def env_to_float(var, default = nil)
17
- ENV.key?(var) ? ENV[var].to_f : default
19
+ var = decode_array(var)
20
+ var && ENV.key?(var) ? ENV[var].to_f : default
18
21
  end
19
22
 
20
23
  def env_to_list(var, default = [])
21
- if ENV.key?(var)
24
+ var = decode_array(var)
25
+ if var && ENV.key?(var)
22
26
  ENV[var].split(',').map(&:strip)
23
27
  else
24
28
  default
25
29
  end
26
30
  end
31
+
32
+ private
33
+
34
+ def decode_array(var)
35
+ var.is_a?(Array) ? var.find { |env_var| ENV.key?(env_var) } : var
36
+ end
27
37
  end
28
38
 
29
39
  extend Helpers
@@ -2,7 +2,8 @@ module Datadog
2
2
  module Ext
3
3
  module Diagnostics
4
4
  DD_TRACE_STARTUP_LOGS = 'DD_TRACE_STARTUP_LOGS'.freeze
5
-
5
+ DD_TRACE_DEBUG = 'DD_TRACE_DEBUG'.freeze
6
+ DD_TRACE_ENABLED = 'DD_TRACE_ENABLED'.freeze
6
7
  # Health
7
8
  module Health
8
9
  # Metrics
@@ -6,6 +6,7 @@ module Datadog
6
6
  DEFAULT_PORT = 8126
7
7
  ENV_DEFAULT_HOST = 'DD_AGENT_HOST'.freeze
8
8
  ENV_DEFAULT_PORT = 'DD_TRACE_AGENT_PORT'.freeze
9
+ ENV_DEFAULT_URL = 'DD_TRACE_AGENT_URL'.freeze
9
10
  HEADER_CONTAINER_ID = 'Datadog-Container-ID'.freeze
10
11
  HEADER_META_LANG = 'Datadog-Meta-Lang'.freeze
11
12
  HEADER_META_LANG_VERSION = 'Datadog-Meta-Lang-Version'.freeze
@@ -10,7 +10,7 @@ module Datadog
10
10
  def initialize(*args, &block)
11
11
  super
12
12
  self.progname = PREFIX
13
- self.level = ::Logger::WARN
13
+ self.level = ::Logger::INFO
14
14
  end
15
15
 
16
16
  def add(severity, message = nil, progname = nil, &block)
@@ -55,10 +55,8 @@ module Datadog
55
55
 
56
56
  def gc_metrics
57
57
  Hash[
58
- GC.stat.map do |k, v|
59
- next if v.is_a?(Hash) # TODO: JRuby supports additional nested metrics
60
-
61
- ["#{Ext::Runtime::Metrics::METRIC_GC_PREFIX}.#{k}", v]
58
+ GC.stat.flat_map do |k, v|
59
+ nested_gc_metric(Ext::Runtime::Metrics::METRIC_GC_PREFIX, k, v)
62
60
  end
63
61
  ]
64
62
  end
@@ -91,6 +89,22 @@ module Datadog
91
89
  "#{Ext::Runtime::Metrics::TAG_SERVICE}:#{service}".freeze
92
90
  end
93
91
  end
92
+
93
+ def nested_gc_metric(prefix, k, v)
94
+ path = "#{prefix}.#{k}"
95
+
96
+ if v.is_a?(Hash)
97
+ v.flat_map do |key, value|
98
+ nested_gc_metric(path, key, value)
99
+ end
100
+ else
101
+ [[to_metric_name(path), v]]
102
+ end
103
+ end
104
+
105
+ def to_metric_name(str)
106
+ str.downcase.gsub(/[-\s]/, '_')
107
+ end
94
108
  end
95
109
  end
96
110
  end
@@ -10,6 +10,7 @@ require 'ddtrace/transport/http/api'
10
10
  require 'ddtrace/transport/http/adapters/net'
11
11
  require 'ddtrace/transport/http/adapters/test'
12
12
  require 'ddtrace/transport/http/adapters/unix_socket'
13
+ require 'uri'
13
14
 
14
15
  module Datadog
15
16
  module Transport
@@ -75,13 +76,27 @@ module Datadog
75
76
  end
76
77
 
77
78
  def default_hostname
79
+ return default_url.hostname if default_url
80
+
78
81
  ENV.fetch(Datadog::Ext::Transport::HTTP::ENV_DEFAULT_HOST, Datadog::Ext::Transport::HTTP::DEFAULT_HOST)
79
82
  end
80
83
 
81
84
  def default_port
85
+ return default_url.port if default_url
86
+
82
87
  ENV.fetch(Datadog::Ext::Transport::HTTP::ENV_DEFAULT_PORT, Datadog::Ext::Transport::HTTP::DEFAULT_PORT).to_i
83
88
  end
84
89
 
90
+ def default_url
91
+ url_env = ENV.fetch(Datadog::Ext::Transport::HTTP::ENV_DEFAULT_URL, nil)
92
+
93
+ if url_env
94
+ uri_parsed = URI.parse(url_env)
95
+
96
+ uri_parsed if %w[http https].include?(uri_parsed.scheme)
97
+ end
98
+ end
99
+
85
100
  # Add adapters to registry
86
101
  Builder::REGISTRY.set(Adapters::Net, :net_http)
87
102
  Builder::REGISTRY.set(Adapters::Test, :test)
@@ -33,6 +33,8 @@ module Datadog
33
33
  @status = status
34
34
  end
35
35
 
36
+ def url; end
37
+
36
38
  # Response for test adapter
37
39
  class Response
38
40
  include Datadog::Transport::Response
@@ -1,7 +1,7 @@
1
1
  module Datadog
2
2
  module VERSION
3
3
  MAJOR = 0
4
- MINOR = 38
4
+ MINOR = 39
5
5
  PATCH = 0
6
6
  PRE = nil
7
7
 
metadata CHANGED
@@ -1,22 +1,22 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddtrace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.38.0
4
+ version: 0.39.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-07-21 00:00:00.000000000 Z
11
+ date: 2020-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: msgpack
15
14
  requirement: !ruby/object:Gem::Requirement
16
15
  requirements:
17
16
  - - ">="
18
17
  - !ruby/object:Gem::Version
19
18
  version: '0'
19
+ name: msgpack
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
@@ -25,12 +25,12 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: dogstatsd-ruby
29
28
  requirement: !ruby/object:Gem::Requirement
30
29
  requirements:
31
30
  - - ">="
32
31
  - !ruby/object:Gem::Version
33
32
  version: 3.3.0
33
+ name: dogstatsd-ruby
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
@@ -39,12 +39,12 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: 3.3.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: opentracing
43
42
  requirement: !ruby/object:Gem::Requirement
44
43
  requirements:
45
44
  - - ">="
46
45
  - !ruby/object:Gem::Version
47
46
  version: 0.4.1
47
+ name: opentracing
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
@@ -53,12 +53,12 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: 0.4.1
55
55
  - !ruby/object:Gem::Dependency
56
- name: rake
57
56
  requirement: !ruby/object:Gem::Requirement
58
57
  requirements:
59
58
  - - ">="
60
59
  - !ruby/object:Gem::Version
61
60
  version: '10.5'
61
+ name: rake
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
@@ -67,12 +67,12 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '10.5'
69
69
  - !ruby/object:Gem::Dependency
70
- name: rubocop
71
70
  requirement: !ruby/object:Gem::Requirement
72
71
  requirements:
73
72
  - - '='
74
73
  - !ruby/object:Gem::Version
75
74
  version: 0.49.1
75
+ name: rubocop
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
@@ -81,12 +81,12 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: 0.49.1
83
83
  - !ruby/object:Gem::Dependency
84
- name: rspec
85
84
  requirement: !ruby/object:Gem::Requirement
86
85
  requirements:
87
86
  - - "~>"
88
87
  - !ruby/object:Gem::Version
89
88
  version: '3.0'
89
+ name: rspec
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
@@ -95,12 +95,12 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '3.0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: rspec-collection_matchers
99
98
  requirement: !ruby/object:Gem::Requirement
100
99
  requirements:
101
100
  - - "~>"
102
101
  - !ruby/object:Gem::Version
103
102
  version: '1.1'
103
+ name: rspec-collection_matchers
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
@@ -109,12 +109,12 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.1'
111
111
  - !ruby/object:Gem::Dependency
112
- name: minitest
113
112
  requirement: !ruby/object:Gem::Requirement
114
113
  requirements:
115
114
  - - '='
116
115
  - !ruby/object:Gem::Version
117
116
  version: 5.10.1
117
+ name: minitest
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
@@ -123,12 +123,12 @@ dependencies:
123
123
  - !ruby/object:Gem::Version
124
124
  version: 5.10.1
125
125
  - !ruby/object:Gem::Dependency
126
- name: minitest-around
127
126
  requirement: !ruby/object:Gem::Requirement
128
127
  requirements:
129
128
  - - '='
130
129
  - !ruby/object:Gem::Version
131
130
  version: 0.5.0
131
+ name: minitest-around
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
@@ -137,12 +137,12 @@ dependencies:
137
137
  - !ruby/object:Gem::Version
138
138
  version: 0.5.0
139
139
  - !ruby/object:Gem::Dependency
140
- name: minitest-stub_any_instance
141
140
  requirement: !ruby/object:Gem::Requirement
142
141
  requirements:
143
142
  - - '='
144
143
  - !ruby/object:Gem::Version
145
144
  version: 1.0.2
145
+ name: minitest-stub_any_instance
146
146
  type: :development
147
147
  prerelease: false
148
148
  version_requirements: !ruby/object:Gem::Requirement
@@ -151,12 +151,12 @@ dependencies:
151
151
  - !ruby/object:Gem::Version
152
152
  version: 1.0.2
153
153
  - !ruby/object:Gem::Dependency
154
- name: appraisal
155
154
  requirement: !ruby/object:Gem::Requirement
156
155
  requirements:
157
156
  - - "~>"
158
157
  - !ruby/object:Gem::Version
159
158
  version: '2.2'
159
+ name: appraisal
160
160
  type: :development
161
161
  prerelease: false
162
162
  version_requirements: !ruby/object:Gem::Requirement
@@ -165,12 +165,12 @@ dependencies:
165
165
  - !ruby/object:Gem::Version
166
166
  version: '2.2'
167
167
  - !ruby/object:Gem::Dependency
168
- name: yard
169
168
  requirement: !ruby/object:Gem::Requirement
170
169
  requirements:
171
170
  - - "~>"
172
171
  - !ruby/object:Gem::Version
173
172
  version: '0.9'
173
+ name: yard
174
174
  type: :development
175
175
  prerelease: false
176
176
  version_requirements: !ruby/object:Gem::Requirement
@@ -179,12 +179,12 @@ dependencies:
179
179
  - !ruby/object:Gem::Version
180
180
  version: '0.9'
181
181
  - !ruby/object:Gem::Dependency
182
- name: webmock
183
182
  requirement: !ruby/object:Gem::Requirement
184
183
  requirements:
185
184
  - - "~>"
186
185
  - !ruby/object:Gem::Version
187
186
  version: '2.0'
187
+ name: webmock
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
@@ -193,12 +193,12 @@ dependencies:
193
193
  - !ruby/object:Gem::Version
194
194
  version: '2.0'
195
195
  - !ruby/object:Gem::Dependency
196
- name: builder
197
196
  requirement: !ruby/object:Gem::Requirement
198
197
  requirements:
199
198
  - - ">="
200
199
  - !ruby/object:Gem::Version
201
200
  version: '0'
201
+ name: builder
202
202
  type: :development
203
203
  prerelease: false
204
204
  version_requirements: !ruby/object:Gem::Requirement
@@ -207,26 +207,26 @@ dependencies:
207
207
  - !ruby/object:Gem::Version
208
208
  version: '0'
209
209
  - !ruby/object:Gem::Dependency
210
- name: sqlite3
211
210
  requirement: !ruby/object:Gem::Requirement
212
211
  requirements:
213
212
  - - "~>"
214
213
  - !ruby/object:Gem::Version
215
- version: 1.3.6
214
+ version: '3'
215
+ name: jdbc-sqlite3
216
216
  type: :development
217
217
  prerelease: false
218
218
  version_requirements: !ruby/object:Gem::Requirement
219
219
  requirements:
220
220
  - - "~>"
221
221
  - !ruby/object:Gem::Version
222
- version: 1.3.6
222
+ version: '3'
223
223
  - !ruby/object:Gem::Dependency
224
- name: climate_control
225
224
  requirement: !ruby/object:Gem::Requirement
226
225
  requirements:
227
226
  - - "~>"
228
227
  - !ruby/object:Gem::Version
229
228
  version: 0.2.0
229
+ name: climate_control
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
@@ -235,12 +235,12 @@ dependencies:
235
235
  - !ruby/object:Gem::Version
236
236
  version: 0.2.0
237
237
  - !ruby/object:Gem::Dependency
238
- name: addressable
239
238
  requirement: !ruby/object:Gem::Requirement
240
239
  requirements:
241
240
  - - "~>"
242
241
  - !ruby/object:Gem::Version
243
242
  version: 2.4.0
243
+ name: addressable
244
244
  type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
@@ -249,12 +249,12 @@ dependencies:
249
249
  - !ruby/object:Gem::Version
250
250
  version: 2.4.0
251
251
  - !ruby/object:Gem::Dependency
252
- name: benchmark-ips
253
252
  requirement: !ruby/object:Gem::Requirement
254
253
  requirements:
255
254
  - - "~>"
256
255
  - !ruby/object:Gem::Version
257
256
  version: '2.8'
257
+ name: benchmark-ips
258
258
  type: :development
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
@@ -263,12 +263,12 @@ dependencies:
263
263
  - !ruby/object:Gem::Version
264
264
  version: '2.8'
265
265
  - !ruby/object:Gem::Dependency
266
- name: benchmark-memory
267
266
  requirement: !ruby/object:Gem::Requirement
268
267
  requirements:
269
268
  - - "~>"
270
269
  - !ruby/object:Gem::Version
271
270
  version: '0.1'
271
+ name: benchmark-memory
272
272
  type: :development
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
@@ -277,12 +277,12 @@ dependencies:
277
277
  - !ruby/object:Gem::Version
278
278
  version: '0.1'
279
279
  - !ruby/object:Gem::Dependency
280
- name: memory_profiler
281
280
  requirement: !ruby/object:Gem::Requirement
282
281
  requirements:
283
282
  - - "~>"
284
283
  - !ruby/object:Gem::Version
285
284
  version: '0.9'
285
+ name: memory_profiler
286
286
  type: :development
287
287
  prerelease: false
288
288
  version_requirements: !ruby/object:Gem::Requirement
@@ -291,26 +291,12 @@ dependencies:
291
291
  - !ruby/object:Gem::Version
292
292
  version: '0.9'
293
293
  - !ruby/object:Gem::Dependency
294
- name: redcarpet
295
- requirement: !ruby/object:Gem::Requirement
296
- requirements:
297
- - - "~>"
298
- - !ruby/object:Gem::Version
299
- version: '3.4'
300
- type: :development
301
- prerelease: false
302
- version_requirements: !ruby/object:Gem::Requirement
303
- requirements:
304
- - - "~>"
305
- - !ruby/object:Gem::Version
306
- version: '3.4'
307
- - !ruby/object:Gem::Dependency
308
- name: pry
309
294
  requirement: !ruby/object:Gem::Requirement
310
295
  requirements:
311
296
  - - "~>"
312
297
  - !ruby/object:Gem::Version
313
298
  version: 0.10.4
299
+ name: pry
314
300
  type: :development
315
301
  prerelease: false
316
302
  version_requirements: !ruby/object:Gem::Requirement
@@ -319,12 +305,12 @@ dependencies:
319
305
  - !ruby/object:Gem::Version
320
306
  version: 0.10.4
321
307
  - !ruby/object:Gem::Dependency
322
- name: pry-stack_explorer
323
308
  requirement: !ruby/object:Gem::Requirement
324
309
  requirements:
325
310
  - - "~>"
326
311
  - !ruby/object:Gem::Version
327
312
  version: 0.4.9.2
313
+ name: pry-stack_explorer
328
314
  type: :development
329
315
  prerelease: false
330
316
  version_requirements: !ruby/object:Gem::Requirement
@@ -333,12 +319,12 @@ dependencies:
333
319
  - !ruby/object:Gem::Version
334
320
  version: 0.4.9.2
335
321
  - !ruby/object:Gem::Dependency
336
- name: warning
337
322
  requirement: !ruby/object:Gem::Requirement
338
323
  requirements:
339
324
  - - "~>"
340
325
  - !ruby/object:Gem::Version
341
326
  version: '1'
327
+ name: warning
342
328
  type: :development
343
329
  prerelease: false
344
330
  version_requirements: !ruby/object:Gem::Requirement
@@ -662,6 +648,11 @@ files:
662
648
  - lib/ddtrace/contrib/sinatra/patcher.rb
663
649
  - lib/ddtrace/contrib/sinatra/tracer.rb
664
650
  - lib/ddtrace/contrib/sinatra/tracer_middleware.rb
651
+ - lib/ddtrace/contrib/sneakers/configuration/settings.rb
652
+ - lib/ddtrace/contrib/sneakers/ext.rb
653
+ - lib/ddtrace/contrib/sneakers/integration.rb
654
+ - lib/ddtrace/contrib/sneakers/patcher.rb
655
+ - lib/ddtrace/contrib/sneakers/tracer.rb
665
656
  - lib/ddtrace/contrib/sucker_punch/configuration/settings.rb
666
657
  - lib/ddtrace/contrib/sucker_punch/exception_handler.rb
667
658
  - lib/ddtrace/contrib/sucker_punch/ext.rb
@@ -792,7 +783,7 @@ licenses:
792
783
  - BSD-3-Clause
793
784
  metadata:
794
785
  allowed_push_host: https://rubygems.org
795
- post_install_message:
786
+ post_install_message:
796
787
  rdoc_options: []
797
788
  require_paths:
798
789
  - lib
@@ -807,9 +798,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
807
798
  - !ruby/object:Gem::Version
808
799
  version: 2.0.0
809
800
  requirements: []
810
- rubyforge_project:
811
- rubygems_version: 2.7.6.2
812
- signing_key:
801
+ rubygems_version: 3.0.6
802
+ signing_key:
813
803
  specification_version: 4
814
804
  summary: Datadog tracing code for your Ruby applications
815
805
  test_files: []