ddtrace 0.18.1 → 0.18.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: 40d91156b9aa968ec8412ffaea02b727deb47660
4
- data.tar.gz: f45dd35b50a8f8b9db17a0421d88ae5b50e4fbd5
3
+ metadata.gz: 583094c453fd00bbe1415cbda7ca72c14e455c71
4
+ data.tar.gz: 52c5f11dc8eda8f027f4a7b0837a6b112939db31
5
5
  SHA512:
6
- metadata.gz: f122ec820458d5fd1f0fe4502846a9ce84f725a24d749118e63d67f16aae5a0408c2101eab79c5f30e97850e7530a15fd4af384c4ebcdd170704a501fd24ac09
7
- data.tar.gz: a5e0d439791bca6b6c48caeb54db0bc113875e97dc3a2c7c4c9ee3e05041578b204cc0fae21b4e8ea7cc71ca117d9b877417d9f4d732d8fa265b23f26437e9a8
6
+ metadata.gz: 33d2fb397612dd3e61e36306b55d10c3eb6d8700a36874ae99b09657ab2f701195faf257896b219a7d7f8b3a2baee8612aa1f15f88778b16687f07dfb04296dc
7
+ data.tar.gz: 7a2adbd4fb324bd2ce46b584bacaf21437defc36f893f5c285e1c94f3cc3f6d0c67317ed42b44a87fe0e762966c54b8e55cf52a133c6fd5cde57964daa6376f3
data/CHANGELOG.md CHANGED
@@ -4,6 +4,17 @@
4
4
 
5
5
  ## [Unreleased (beta)]
6
6
 
7
+ ## [0.18.2] - 2019-01-03
8
+
9
+ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.18.2
10
+
11
+ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.18.1...v0.18.2
12
+
13
+ ### Fixed
14
+
15
+ - Unfinished Mongo spans when SASL configured (#658) (@zachmccormick)
16
+ - Possible performance issue with unexpanded Rails cache keys (#630, #635) (@gingerlime)
17
+
7
18
  ## [0.18.1] - 2018-12-20
8
19
 
9
20
  Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.18.1
@@ -12,7 +23,7 @@ Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.18.0...v0.18.1
12
23
 
13
24
  ### Fixed
14
25
 
15
- - ActiveRecord `SystemStackError` with some 3rd party libraries. (@EpiFouloux, @tjgrathwell, @guizmaii)
26
+ - ActiveRecord `SystemStackError` with some 3rd party libraries (#661, #662) (@EpiFouloux, @tjgrathwell, @guizmaii)
16
27
 
17
28
  ## [0.18.0] - 2018-12-18
18
29
 
@@ -604,8 +615,9 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
604
615
 
605
616
  Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
606
617
 
607
- [Unreleased (stable)]: https://github.com/DataDog/dd-trace-rb/compare/v0.18.1...master
608
- [Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.18.1...0.19-dev
618
+ [Unreleased (stable)]: https://github.com/DataDog/dd-trace-rb/compare/v0.18.2...master
619
+ [Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.18.2...0.19-dev
620
+ [0.18.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.18.1...v0.18.2
609
621
  [0.18.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.18.0...v0.18.1
610
622
  [0.18.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.17.3...v0.18.0
611
623
  [0.17.3]: https://github.com/DataDog/dd-trace-rb/compare/v0.17.2...v0.17.3
@@ -17,7 +17,8 @@ module Datadog
17
17
  # https://github.com/mongodb/mongo-ruby-driver/blob/master/lib/mongo/monitoring.rb#L70
18
18
  # https://github.com/mongodb/mongo-ruby-driver/blob/master/lib/mongo/monitoring/publishable.rb#L38-L56
19
19
  span = pin.tracer.trace(Ext::SPAN_COMMAND, service: pin.service, span_type: Ext::SPAN_TYPE_COMMAND)
20
- Thread.current[:datadog_mongo_span] = span
20
+ Thread.current[:datadog_mongo_span] ||= {}
21
+ Thread.current[:datadog_mongo_span][event.request_id] = span
21
22
 
22
23
  # build a quantized Query using the Parser module
23
24
  query = MongoDB.query_builder(event.command_name, event.database_name, event.command)
@@ -37,7 +38,7 @@ module Datadog
37
38
  end
38
39
 
39
40
  def failed(event)
40
- span = Thread.current[:datadog_mongo_span]
41
+ span = Thread.current[:datadog_mongo_span][event.request_id]
41
42
  return unless span
42
43
 
43
44
  # the failure is not a real exception because it's handled by
@@ -49,11 +50,11 @@ module Datadog
49
50
  # whatever happens, the Span must be removed from the local storage and
50
51
  # it must be finished to prevent any leak
51
52
  span.finish unless span.nil?
52
- Thread.current[:datadog_mongo_span] = nil
53
+ Thread.current[:datadog_mongo_span].delete(event.request_id)
53
54
  end
54
55
 
55
56
  def succeeded(event)
56
- span = Thread.current[:datadog_mongo_span]
57
+ span = Thread.current[:datadog_mongo_span][event.request_id]
57
58
  return unless span
58
59
 
59
60
  # add fields that are available only after executing the query
@@ -65,7 +66,7 @@ module Datadog
65
66
  # whatever happens, the Span must be removed from the local storage and
66
67
  # it must be finished to prevent any leak
67
68
  span.finish unless span.nil?
68
- Thread.current[:datadog_mongo_span] = nil
69
+ Thread.current[:datadog_mongo_span].delete(event.request_id)
69
70
  end
70
71
  end
71
72
  end
@@ -50,7 +50,8 @@ module Datadog
50
50
  # discard parameters from the cache_store configuration
51
51
  store, = *Array.wrap(::Rails.configuration.cache_store).flatten
52
52
  span.set_tag(Ext::TAG_CACHE_BACKEND, store)
53
- cache_key = Datadog::Utils.truncate(payload.fetch(:key), Ext::QUANTIZE_CACHE_MAX_KEY_SIZE)
53
+ normalized_key = ::ActiveSupport::Cache.expand_cache_key(payload.fetch(:key))
54
+ cache_key = Datadog::Utils.truncate(normalized_key, Ext::QUANTIZE_CACHE_MAX_KEY_SIZE)
54
55
  span.set_tag(Ext::TAG_CACHE_KEY, cache_key)
55
56
  span.set_error(payload[:exception]) if payload[:exception]
56
57
  ensure
@@ -2,7 +2,7 @@ module Datadog
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 18
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.18.1
4
+ version: 0.18.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-12-20 00:00:00.000000000 Z
11
+ date: 2019-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: msgpack