ddtrace 0.13.1 → 0.13.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/Appraisals +6 -0
- data/CHANGELOG.md +11 -0
- data/lib/ddtrace/contrib/rack/middlewares.rb +1 -1
- data/lib/ddtrace/contrib/rake/instrumentation.rb +15 -3
- data/lib/ddtrace/monkey.rb +0 -7
- data/lib/ddtrace/pin.rb +1 -1
- data/lib/ddtrace/propagation/http_propagator.rb +6 -0
- data/lib/ddtrace/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 780f2b1b9ec649cb4e27b271edc2ce8649c73b06ce07e7554c5ef0813fef45c2
|
|
4
|
+
data.tar.gz: 3d96d572d0d7c6cf22009e7dd4f85e363fc1c7c0e931cb87e0e39023a3d3f6c8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 96d472beda982529903363014e586c2fcd7381044ffb1dae859d4f5f55cd1fdba59390a129bf936ab62b1090c3cf0074a0cff0e175d686566dc95d9f7852731d
|
|
7
|
+
data.tar.gz: fb3c01d6f49061c45f6f86d3e3fe5c2858775970a572d464f836ebfd25c13dfc437e1da1e9e9809f34da60c6db1e555cbd1759cc5a5aa09547029710378cf8bf
|
data/Appraisals
CHANGED
|
@@ -9,6 +9,7 @@ elsif Gem::Version.new('1.9.3') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
9
9
|
gem 'pg', '0.15.1', platform: :ruby
|
|
10
10
|
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
|
|
11
11
|
gem 'rack-cache', '1.7.1'
|
|
12
|
+
gem 'rake', '< 12.3'
|
|
12
13
|
end
|
|
13
14
|
|
|
14
15
|
appraise 'rails30-postgres-sidekiq' do
|
|
@@ -18,6 +19,7 @@ elsif Gem::Version.new('1.9.3') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
18
19
|
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
|
|
19
20
|
gem 'sidekiq', '4.0.0'
|
|
20
21
|
gem 'rack-cache', '1.7.1'
|
|
22
|
+
gem 'rake', '< 12.3'
|
|
21
23
|
end
|
|
22
24
|
|
|
23
25
|
appraise 'rails32-mysql2' do
|
|
@@ -27,6 +29,7 @@ elsif Gem::Version.new('1.9.3') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
27
29
|
gem 'activerecord-mysql-adapter', platform: :ruby
|
|
28
30
|
gem 'activerecord-jdbcmysql-adapter', platform: :jruby
|
|
29
31
|
gem 'rack-cache', '1.7.1'
|
|
32
|
+
gem 'rake', '< 12.3'
|
|
30
33
|
end
|
|
31
34
|
|
|
32
35
|
appraise 'rails32-postgres' do
|
|
@@ -35,6 +38,7 @@ elsif Gem::Version.new('1.9.3') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
35
38
|
gem 'pg', '0.15.1', platform: :ruby
|
|
36
39
|
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
|
|
37
40
|
gem 'rack-cache', '1.7.1'
|
|
41
|
+
gem 'rake', '< 12.3'
|
|
38
42
|
end
|
|
39
43
|
|
|
40
44
|
appraise 'rails32-postgres-redis' do
|
|
@@ -45,6 +49,7 @@ elsif Gem::Version.new('1.9.3') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
45
49
|
gem 'redis-rails'
|
|
46
50
|
gem 'redis', '< 4.0'
|
|
47
51
|
gem 'rack-cache', '1.7.1'
|
|
52
|
+
gem 'rake', '< 12.3'
|
|
48
53
|
end
|
|
49
54
|
|
|
50
55
|
appraise 'rails32-postgres-sidekiq' do
|
|
@@ -54,6 +59,7 @@ elsif Gem::Version.new('1.9.3') <= Gem::Version.new(RUBY_VERSION) \
|
|
|
54
59
|
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
|
|
55
60
|
gem 'sidekiq', '4.0.0'
|
|
56
61
|
gem 'rack-cache', '1.7.1'
|
|
62
|
+
gem 'rake', '< 12.3'
|
|
57
63
|
end
|
|
58
64
|
|
|
59
65
|
appraise 'contrib-old' do
|
data/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,16 @@
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased (beta)]
|
|
6
6
|
|
|
7
|
+
## [0.13.2] - 2018-08-07
|
|
8
|
+
|
|
9
|
+
Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.13.2
|
|
10
|
+
|
|
11
|
+
Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.13.1...v0.13.2
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Context propagation for distributed traces when context is full (#502)
|
|
16
|
+
|
|
7
17
|
## [0.13.1] - 2018-07-17
|
|
8
18
|
|
|
9
19
|
Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.13.1
|
|
@@ -380,6 +390,7 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
|
|
380
390
|
|
|
381
391
|
[Unreleased (stable)]: https://github.com/DataDog/dd-trace-rb/compare/v0.13.0...master
|
|
382
392
|
[Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.13.0...0.14-dev
|
|
393
|
+
[0.13.2]: https://github.com/DataDog/dd-trace-rb/compare/v0.13.1...v0.13.2
|
|
383
394
|
[0.13.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.13.0...v0.13.1
|
|
384
395
|
[0.13.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.12.1...v0.13.0
|
|
385
396
|
[0.13.0.beta1]: https://github.com/DataDog/dd-trace-rb/compare/v0.12.0...v0.13.0.beta1
|
|
@@ -175,7 +175,7 @@ module Datadog
|
|
|
175
175
|
:datadog_rack_request_span is considered an internal symbol in the Rack env,
|
|
176
176
|
and has been been DEPRECATED. Public support for its usage is discontinued.
|
|
177
177
|
If you need the Rack request span, try using `Datadog.tracer.active_span`.
|
|
178
|
-
This key will be removed in version
|
|
178
|
+
This key will be removed in version 1.0).freeze
|
|
179
179
|
|
|
180
180
|
def add_deprecation_warnings(env)
|
|
181
181
|
env.instance_eval do
|
|
@@ -15,23 +15,31 @@ module Datadog
|
|
|
15
15
|
def invoke(*args)
|
|
16
16
|
return super unless enabled?
|
|
17
17
|
|
|
18
|
-
tracer.trace(SPAN_NAME_INVOKE) do |span|
|
|
18
|
+
tracer.trace(SPAN_NAME_INVOKE, span_options) do |span|
|
|
19
19
|
super
|
|
20
20
|
annotate_invoke!(span, args)
|
|
21
21
|
end
|
|
22
|
+
ensure
|
|
23
|
+
shutdown_tracer!
|
|
22
24
|
end
|
|
23
25
|
|
|
24
26
|
def execute(args = nil)
|
|
25
27
|
return super unless enabled?
|
|
26
28
|
|
|
27
|
-
tracer.trace(SPAN_NAME_EXECUTE) do |span|
|
|
29
|
+
tracer.trace(SPAN_NAME_EXECUTE, span_options) do |span|
|
|
28
30
|
super
|
|
29
31
|
annotate_execute!(span, args)
|
|
30
32
|
end
|
|
33
|
+
ensure
|
|
34
|
+
shutdown_tracer!
|
|
31
35
|
end
|
|
32
36
|
|
|
33
37
|
private
|
|
34
38
|
|
|
39
|
+
def shutdown_tracer!
|
|
40
|
+
tracer.shutdown! if tracer.active_span.nil? && ::Rake.application.top_level_tasks.include?(name)
|
|
41
|
+
end
|
|
42
|
+
|
|
35
43
|
def annotate_invoke!(span, args)
|
|
36
44
|
span.resource = name
|
|
37
45
|
span.set_tag('rake.task.arg_names', arg_names)
|
|
@@ -48,7 +56,7 @@ module Datadog
|
|
|
48
56
|
end
|
|
49
57
|
|
|
50
58
|
def quantize_args(args)
|
|
51
|
-
quantize_options =
|
|
59
|
+
quantize_options = configuration[:quantize][:args]
|
|
52
60
|
Datadog::Quantization::Hash.format(args, quantize_options)
|
|
53
61
|
end
|
|
54
62
|
|
|
@@ -60,6 +68,10 @@ module Datadog
|
|
|
60
68
|
configuration[:tracer]
|
|
61
69
|
end
|
|
62
70
|
|
|
71
|
+
def span_options
|
|
72
|
+
{ service: configuration[:service_name] }
|
|
73
|
+
end
|
|
74
|
+
|
|
63
75
|
def configuration
|
|
64
76
|
Datadog.configuration[:rake]
|
|
65
77
|
end
|
data/lib/ddtrace/monkey.rb
CHANGED
|
@@ -15,8 +15,6 @@ module Datadog
|
|
|
15
15
|
|
|
16
16
|
module_function
|
|
17
17
|
|
|
18
|
-
attr_writer :registry
|
|
19
|
-
|
|
20
18
|
def registry
|
|
21
19
|
log_deprecation_warning('Monkey#registry')
|
|
22
20
|
@registry
|
|
@@ -54,11 +52,6 @@ module Datadog
|
|
|
54
52
|
end
|
|
55
53
|
|
|
56
54
|
class << self
|
|
57
|
-
def registry
|
|
58
|
-
log_deprecation_warning('Monkey#registry')
|
|
59
|
-
@registry
|
|
60
|
-
end
|
|
61
|
-
|
|
62
55
|
attr_writer :registry
|
|
63
56
|
end
|
|
64
57
|
end
|
data/lib/ddtrace/pin.rb
CHANGED
|
@@ -9,6 +9,12 @@ module Datadog
|
|
|
9
9
|
|
|
10
10
|
# inject! popolates the env with span ID, trace ID and sampling priority
|
|
11
11
|
def self.inject!(context, env)
|
|
12
|
+
# Prevent propagation from being attempted if context provided is nil.
|
|
13
|
+
if context.nil?
|
|
14
|
+
Datadog::Tracer.log.debug('Cannot inject context into env to propagate over HTTP: context is nil.'.freeze)
|
|
15
|
+
return
|
|
16
|
+
end
|
|
17
|
+
|
|
12
18
|
env[HTTP_HEADER_TRACE_ID] = context.trace_id.to_s
|
|
13
19
|
env[HTTP_HEADER_PARENT_ID] = context.span_id.to_s
|
|
14
20
|
env[HTTP_HEADER_SAMPLING_PRIORITY] = context.sampling_priority.to_s
|
data/lib/ddtrace/version.rb
CHANGED
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.13.
|
|
4
|
+
version: 0.13.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: 2018-07
|
|
11
|
+
date: 2018-08-07 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: msgpack
|
|
@@ -416,7 +416,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
416
416
|
version: '0'
|
|
417
417
|
requirements: []
|
|
418
418
|
rubyforge_project:
|
|
419
|
-
rubygems_version: 2.
|
|
419
|
+
rubygems_version: 2.7.7
|
|
420
420
|
signing_key:
|
|
421
421
|
specification_version: 4
|
|
422
422
|
summary: Datadog tracing code for your Ruby applications
|