ddtrace 0.23.1 → 0.23.2

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
  SHA1:
3
- metadata.gz: 3a55d9111f6df8c1b96e1d9b2288ee799ae2fe96
4
- data.tar.gz: 7547288c9686d6dcd1a8e6afecff023ab695c344
3
+ metadata.gz: 1cb46f6b5bd2a1afa544b71f5f485377bf81e433
4
+ data.tar.gz: 77989382c527193ed1bed436238bf93c2a014bce
5
5
  SHA512:
6
- metadata.gz: e5f11443a4586266c93228b17bab1ae6f2345b7d910e8c855fad1e9111be5468b545021228b15c016bb802d8d8a7506399b6a223c160e2dc4950b2b6456358e3
7
- data.tar.gz: 7d51cfa75716568d5bbe38c93ff0cbb58c1cb3a373741000951a85325e6a98266202409bb769dc2fe3ce7009ac998776f9ee66aefca8d80bbc031b5b284fd138
6
+ metadata.gz: '099e25c5c0ae90abe4e1984911b3162edf302c7744ebac5894baeb3f873bff3b7a7d807720d919f36c42941a22837dc9be523b8ca497713cf53052920a56e47c'
7
+ data.tar.gz: 7af881dc7831bd547fe1afb8c33f5ff70f6329e93e3803a1c84cafc00795f4bef16afbfc373edda9ef3587302cb54dcb097d409a4aedaaaf43ec3437c1d3c0fa
data/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@
4
4
 
5
5
  ## [Unreleased (beta)]
6
6
 
7
+ ## [0.23.2] - 2019-05-10
8
+
9
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.23.2
10
+
11
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.23.1...v0.23.2
12
+
13
+ ### Fixed
14
+
15
+ - Span types for HTTP, web, and some datastore integrations (#751)
16
+ - AWS integration not patching service-level gems (#707, #752) (@alksl, @tonypinder)
17
+ - Rails 6 warning for `parent_name` (#750) (@sinsoku)
18
+
7
19
  ## [0.23.1] - 2019-05-02
8
20
 
9
21
  Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.23.1
@@ -796,8 +808,9 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
796
808
 
797
809
  Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
798
810
 
799
- [Unreleased (stable)]: https://github.com/DataDog/dd-trace-rb/compare/v0.23.1...master
800
- [Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.23.1...0.24-dev
811
+ [Unreleased (stable)]: https://github.com/DataDog/dd-trace-rb/compare/v0.23.2...master
812
+ [Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.23.2...0.24-dev
813
+ [0.23.2]: https://github.com/DataDog/dd-trace-rb/compare/v0.23.1...v0.23.2
801
814
  [0.23.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.23.0...v0.23.1
802
815
  [0.23.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.22.0...v0.23.0
803
816
  [0.22.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.21.2...v0.22.0
@@ -12,7 +12,11 @@ module Datadog
12
12
  register_as :aws, auto_patch: true
13
13
 
14
14
  def self.version
15
- Gem.loaded_specs['aws-sdk'] && Gem.loaded_specs['aws-sdk'].version
15
+ if Gem.loaded_specs['aws-sdk']
16
+ Gem.loaded_specs['aws-sdk'].version
17
+ elsif Gem.loaded_specs['aws-sdk-core']
18
+ Gem.loaded_specs['aws-sdk-core'].version
19
+ end
16
20
  end
17
21
 
18
22
  def self.present?
@@ -9,6 +9,7 @@ module Datadog
9
9
  QUANTIZE_MAX_CMD_LENGTH = 100
10
10
  SERVICE_NAME = 'memcached'.freeze
11
11
  SPAN_COMMAND = 'memcached.command'.freeze
12
+ SPAN_TYPE_COMMAND = 'memcached'.freeze
12
13
  TAG_COMMAND = 'memcached.command'.freeze
13
14
  end
14
15
  end
@@ -1,6 +1,6 @@
1
- require 'ddtrace/ext/app_types'
2
1
  require 'ddtrace/ext/net'
3
2
  require 'ddtrace/contrib/analytics'
3
+ require 'ddtrace/contrib/dalli/ext'
4
4
  require 'ddtrace/contrib/dalli/quantize'
5
5
 
6
6
  module Datadog
@@ -35,7 +35,7 @@ module Datadog
35
35
  tracer.trace(Datadog::Contrib::Dalli::Ext::SPAN_COMMAND) do |span|
36
36
  span.resource = op.to_s.upcase
37
37
  span.service = datadog_configuration[:service_name]
38
- span.span_type = Datadog::Ext::AppTypes::CACHE
38
+ span.span_type = Datadog::Contrib::Dalli::Ext::SPAN_TYPE_COMMAND
39
39
 
40
40
  # Set analytics sample rate
41
41
  if Contrib::Analytics.enabled?(datadog_configuration[:analytics_enabled])
@@ -8,6 +8,7 @@ module Datadog
8
8
  ENV_ANALYTICS_SAMPLE_RATE = 'DD_ELASTICSEARCH_ANALYTICS_SAMPLE_RATE'.freeze
9
9
  SERVICE_NAME = 'elasticsearch'.freeze
10
10
  SPAN_QUERY = 'elasticsearch.query'.freeze
11
+ SPAN_TYPE_QUERY = 'elasticsearch'.freeze
11
12
  TAG_BODY = 'elasticsearch.body'.freeze
12
13
  TAG_METHOD = 'elasticsearch.method'.freeze
13
14
  TAG_PARAMS = 'elasticsearch.params'.freeze
@@ -78,7 +78,7 @@ module Datadog
78
78
  port = connection.host[:port] if connection
79
79
 
80
80
  span.service = pin.service
81
- span.span_type = Datadog::Ext::AppTypes::DB
81
+ span.span_type = Datadog::Contrib::Elasticsearch::Ext::SPAN_TYPE_QUERY
82
82
 
83
83
  # load JSON for the following fields unless they're already strings
84
84
  params = JSON.generate(params) if params && !params.is_a?(String)
@@ -106,7 +106,7 @@ module Datadog
106
106
  def annotate!(span, datum)
107
107
  span.resource = datum[:method].to_s.upcase
108
108
  span.service = service_name(datum)
109
- span.span_type = Datadog::Ext::HTTP::TYPE
109
+ span.span_type = Datadog::Ext::HTTP::TYPE_OUTBOUND
110
110
 
111
111
  # Set analytics sample rate
112
112
  if analytics_enabled?
@@ -33,7 +33,7 @@ module Datadog
33
33
  def annotate!(span, env)
34
34
  span.resource = env[:method].to_s.upcase
35
35
  span.service = service_name(env)
36
- span.span_type = Datadog::Ext::HTTP::TYPE
36
+ span.span_type = Datadog::Ext::HTTP::TYPE_OUTBOUND
37
37
 
38
38
  # Set analytics sample rate
39
39
  if analytics_enabled?
@@ -41,7 +41,7 @@ module Datadog
41
41
  tracer.trace(
42
42
  Ext::SPAN_ENDPOINT_RUN,
43
43
  service: service_name,
44
- span_type: Datadog::Ext::HTTP::TYPE
44
+ span_type: Datadog::Ext::HTTP::TYPE_INBOUND
45
45
  )
46
46
 
47
47
  Thread.current[KEY_RUN] = true
@@ -107,7 +107,7 @@ module Datadog
107
107
  tracer.trace(
108
108
  Ext::SPAN_ENDPOINT_RENDER,
109
109
  service: service_name,
110
- span_type: Datadog::Ext::HTTP::TYPE
110
+ span_type: Datadog::Ext::HTTP::TEMPLATE
111
111
  )
112
112
 
113
113
  Thread.current[KEY_RENDER] = true
@@ -147,7 +147,7 @@ module Datadog
147
147
  span = tracer.trace(
148
148
  Ext::SPAN_ENDPOINT_RUN_FILTERS,
149
149
  service: service_name,
150
- span_type: Datadog::Ext::HTTP::TYPE
150
+ span_type: Datadog::Ext::HTTP::TYPE_INBOUND
151
151
  )
152
152
 
153
153
  begin
@@ -15,7 +15,7 @@ module Datadog
15
15
  keywords[:metadata] ||= {}
16
16
 
17
17
  options = {
18
- span_type: Datadog::Ext::HTTP::TYPE,
18
+ span_type: Datadog::Ext::HTTP::TYPE_OUTBOUND,
19
19
  service: service_name,
20
20
  resource: format_resource(keywords[:method])
21
21
  }
@@ -14,7 +14,7 @@ module Datadog
14
14
  class Server < Base
15
15
  def trace(keywords)
16
16
  options = {
17
- span_type: Datadog::Ext::HTTP::TYPE,
17
+ span_type: Datadog::Ext::HTTP::TYPE_INBOUND,
18
18
  service: service_name,
19
19
  resource: format_resource(keywords[:method])
20
20
  }
@@ -63,7 +63,7 @@ module Datadog
63
63
  pin.tracer.trace(Ext::SPAN_REQUEST) do |span|
64
64
  begin
65
65
  span.service = pin.service
66
- span.span_type = Datadog::Ext::HTTP::TYPE
66
+ span.span_type = Datadog::Ext::HTTP::TYPE_OUTBOUND
67
67
  span.resource = req.method
68
68
 
69
69
  if pin.tracer.enabled && !Datadog::Contrib::HTTP.should_skip_distributed_tracing?(pin)
@@ -34,6 +34,7 @@ module Datadog
34
34
 
35
35
  tracer.trace(
36
36
  Ext::SPAN_HTTP_SERVER_QUEUE,
37
+ span_type: Datadog::Ext::HTTP::TYPE_PROXY,
37
38
  start_time: request_start,
38
39
  service: configuration[:web_service_name]
39
40
  )
@@ -57,7 +58,7 @@ module Datadog
57
58
  trace_options = {
58
59
  service: configuration[:service_name],
59
60
  resource: nil,
60
- span_type: Datadog::Ext::HTTP::TYPE
61
+ span_type: Datadog::Ext::HTTP::TYPE_INBOUND
61
62
  }
62
63
 
63
64
  # start a new request span and attach it to the current Rack environment;
@@ -21,7 +21,7 @@ module Datadog
21
21
  # trace the execution
22
22
  tracer = Datadog.configuration[:rails][:tracer]
23
23
  service = Datadog.configuration[:rails][:controller_service]
24
- type = Datadog::Ext::HTTP::TYPE
24
+ type = Datadog::Ext::HTTP::TYPE_INBOUND
25
25
  span = tracer.trace(Ext::SPAN_ACTION_CONTROLLER, service: service, span_type: type)
26
26
 
27
27
  # attach the current span to the tracing context
@@ -26,7 +26,9 @@ module Datadog
26
26
  end
27
27
 
28
28
  def self.app_name
29
- if ::Rails::VERSION::MAJOR >= 4
29
+ if ::Rails::VERSION::MAJOR >= 6
30
+ ::Rails.application.class.module_parent_name.underscore
31
+ elsif ::Rails::VERSION::MAJOR >= 4
30
32
  ::Rails.application.class.parent_name.underscore
31
33
  else
32
34
  ::Rails.application.class.to_s.underscore
@@ -60,7 +60,7 @@ module Datadog
60
60
  def datadog_trace_request(uri)
61
61
  span = datadog_configuration[:tracer].trace(Ext::SPAN_REQUEST,
62
62
  service: datadog_configuration[:service_name],
63
- span_type: Datadog::Ext::AppTypes::WEB)
63
+ span_type: Datadog::Ext::HTTP::TYPE_OUTBOUND)
64
64
 
65
65
  datadog_tag_request(uri, span)
66
66
 
@@ -23,7 +23,7 @@ module Datadog
23
23
  tracer.trace(
24
24
  Ext::SPAN_REQUEST,
25
25
  service: configuration[:service_name],
26
- span_type: Datadog::Ext::HTTP::TYPE
26
+ span_type: Datadog::Ext::HTTP::TYPE_INBOUND
27
27
  ) do |span|
28
28
  Sinatra::Env.set_datadog_span(env, span)
29
29
 
@@ -6,7 +6,9 @@ module Datadog
6
6
  METHOD = 'http.method'.freeze
7
7
  STATUS_CODE = 'http.status_code'.freeze
8
8
  TEMPLATE = 'template'.freeze
9
- TYPE = 'http'.freeze
9
+ TYPE_INBOUND = 'web'.freeze
10
+ TYPE_OUTBOUND = 'http'.freeze
11
+ TYPE_PROXY = 'proxy'.freeze
10
12
  URL = 'http.url'.freeze
11
13
 
12
14
  # General header functionality
@@ -2,7 +2,7 @@ module Datadog
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 23
5
- PATCH = 1
5
+ PATCH = 2
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddtrace
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.1
4
+ version: 0.23.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Datadog, Inc.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-02 00:00:00.000000000 Z
11
+ date: 2019-05-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack