ddtrace 0.14.0.beta1 → 0.14.0.beta2

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: 92f58d3f94ff927d412151da041ce48c3c808c3aa8b4c7a2f320c2206daad363
4
- data.tar.gz: f0f9308f6e1eaba46afc42f7237faea5587cd4d4071410547d798c79f8988602
3
+ metadata.gz: 22136c7de76c04edc8e73f76d84eece381a9a9f8a62a4b1a320978c75038a4c3
4
+ data.tar.gz: 50bbe8adea037b572e177a0a7813baa74c4c0735f36ad0f4f14f4b9c78c7a35c
5
5
  SHA512:
6
- metadata.gz: 06d6974ee82c2e0f1c72edbb86b0ba03a6fefe4d383b704f93ff2d2f9416bab39b520a4a9cd8458c2977be878b32d69743ae77c4170583d1a2615d1aaca070a3
7
- data.tar.gz: d54d30913137f1892adb625faaa39b4c1c49b4f70c7d1750a477df3e532a34559e4731a27a7faadfad7a50793584862bde3acf801e2ab059533bf2a6b17af468
6
+ metadata.gz: '0358db43f6e2f66ebc77b46b4a8e4e1a2721ba23fc96c5b55c05eea1c05a92f6b14a01fb080133f70d7ae1b806c9ffd9c7feb7b39a90838a63511591b5e2d9c2'
7
+ data.tar.gz: 96f741fa4c727858d0d82e2f52c058639243c17cda0460fc3e5614571578a4c896d4e11134626a7d8fa41f98e1481e2a3ab6a934acf5390ad716d588c87003ab
data/CHANGELOG.md CHANGED
@@ -4,6 +4,16 @@
4
4
 
5
5
  ## [Unreleased (beta)]
6
6
 
7
+ ## [0.14.0.beta2] - 2018-07-25
8
+
9
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.14.0.beta2
10
+
11
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.14.0.beta1...v0.14.0.beta2
12
+
13
+ ### Fixed
14
+
15
+ - Rake shutdown tracer after execution (#487) @kissrobber
16
+
7
17
  ## [0.14.0.beta1] - 2018-07-24
8
18
 
9
19
  Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.14.0.beta1
@@ -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 = Datadog.configuration[:rake][:quantize][:args]
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
@@ -3,7 +3,7 @@ module Datadog
3
3
  MAJOR = 0
4
4
  MINOR = 14
5
5
  PATCH = 0
6
- PRE = 'beta1'.freeze
6
+ PRE = 'beta2'.freeze
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.')
9
9
  end
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.14.0.beta1
4
+ version: 0.14.0.beta2
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-24 00:00:00.000000000 Z
11
+ date: 2018-07-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack