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 +4 -4
- data/CHANGELOG.md +15 -3
- data/lib/ddtrace/contrib/mongodb/subscribers.rb +6 -5
- data/lib/ddtrace/contrib/rails/active_support.rb +2 -1
- data/lib/ddtrace/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 583094c453fd00bbe1415cbda7ca72c14e455c71
|
4
|
+
data.tar.gz: 52c5f11dc8eda8f027f4a7b0837a6b112939db31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
608
|
-
[Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.18.
|
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]
|
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]
|
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]
|
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
|
-
|
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
|
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.18.
|
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:
|
11
|
+
date: 2019-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|