ddtrace 0.14.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -2
- data/lib/ddtrace.rb +13 -13
- data/lib/ddtrace/transport.rb +17 -5
- data/lib/ddtrace/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd428e0433f158ee8b3a353082112f464f16e6f614c099c8bbe208540b736d63
|
4
|
+
data.tar.gz: 1cf0a646378f1d39ea248eca52e856116fef3aaab8bd8911560150b859ca8b58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd019f7bc2e5eea75da991b6fe13ac4e914ba53fa7ed993364d53d57bb60ae2ac2003746fcd9389e1b376938ab1e889cfa68ce3887bafd06d16b12750676140a
|
7
|
+
data.tar.gz: 1db4b25d3366fd810459764760147005de0d2dd4370263d84d77bc00d2515c530794c5d5a9d2f8e816b751d960e6b70f265ee6f568da4c9ab4016df7b5a44e02
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,20 @@
|
|
4
4
|
|
5
5
|
## [Unreleased (beta)]
|
6
6
|
|
7
|
+
## [0.14.1] - 2018-08-21
|
8
|
+
|
9
|
+
Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.14.1
|
10
|
+
|
11
|
+
Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.14.0...v0.14.1
|
12
|
+
|
13
|
+
### Changed
|
14
|
+
|
15
|
+
- Reduce verbosity of connection errors in log (#515)
|
16
|
+
|
17
|
+
### Fixed
|
18
|
+
|
19
|
+
- Sequel 'not a valid integration' error (#514, #516) (@steveh)
|
20
|
+
|
7
21
|
## [0.14.0] - 2018-08-14
|
8
22
|
|
9
23
|
Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.14.0
|
@@ -460,8 +474,9 @@ Release notes: https://github.com/DataDog/dd-trace-rb/releases/tag/v0.3.1
|
|
460
474
|
|
461
475
|
Git diff: https://github.com/DataDog/dd-trace-rb/compare/v0.3.0...v0.3.1
|
462
476
|
|
463
|
-
[Unreleased (stable)]: https://github.com/DataDog/dd-trace-rb/compare/v0.14.
|
464
|
-
[Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.14.
|
477
|
+
[Unreleased (stable)]: https://github.com/DataDog/dd-trace-rb/compare/v0.14.1...master
|
478
|
+
[Unreleased (beta)]: https://github.com/DataDog/dd-trace-rb/compare/v0.14.1...0.15-dev
|
479
|
+
[0.14.1]: https://github.com/DataDog/dd-trace-rb/compare/v0.14.0...v0.14.1
|
465
480
|
[0.14.0]: https://github.com/DataDog/dd-trace-rb/compare/v0.13.2...v0.14.0
|
466
481
|
[0.14.0.rc1]: https://github.com/DataDog/dd-trace-rb/compare/v0.14.0.beta2...v0.14.0.rc1
|
467
482
|
[0.14.0.beta2]: https://github.com/DataDog/dd-trace-rb/compare/v0.14.0.beta1...v0.14.0.beta2
|
data/lib/ddtrace.rb
CHANGED
@@ -44,29 +44,29 @@ module Datadog
|
|
44
44
|
end
|
45
45
|
|
46
46
|
require 'ddtrace/contrib/base'
|
47
|
-
require 'ddtrace/contrib/integration'
|
48
|
-
require 'ddtrace/contrib/rack/patcher'
|
49
|
-
require 'ddtrace/contrib/rails/patcher'
|
50
47
|
require 'ddtrace/contrib/active_model_serializers/patcher'
|
51
48
|
require 'ddtrace/contrib/active_record/integration'
|
52
|
-
require 'ddtrace/contrib/
|
49
|
+
require 'ddtrace/contrib/aws/patcher'
|
50
|
+
require 'ddtrace/contrib/dalli/patcher'
|
51
|
+
require 'ddtrace/contrib/delayed_job/patcher'
|
53
52
|
require 'ddtrace/contrib/elasticsearch/patcher'
|
53
|
+
require 'ddtrace/contrib/excon/patcher'
|
54
54
|
require 'ddtrace/contrib/faraday/patcher'
|
55
55
|
require 'ddtrace/contrib/grape/patcher'
|
56
56
|
require 'ddtrace/contrib/graphql/patcher'
|
57
57
|
require 'ddtrace/contrib/grpc/patcher'
|
58
|
-
require 'ddtrace/contrib/redis/patcher'
|
59
58
|
require 'ddtrace/contrib/http/patcher'
|
60
|
-
require 'ddtrace/contrib/
|
61
|
-
require 'ddtrace/contrib/sucker_punch/patcher'
|
62
|
-
require 'ddtrace/contrib/rest_client/integration'
|
59
|
+
require 'ddtrace/contrib/integration'
|
63
60
|
require 'ddtrace/contrib/mongodb/patcher'
|
64
|
-
require 'ddtrace/contrib/
|
61
|
+
require 'ddtrace/contrib/mysql2/patcher'
|
62
|
+
require 'ddtrace/contrib/racecar/patcher'
|
63
|
+
require 'ddtrace/contrib/rack/patcher'
|
64
|
+
require 'ddtrace/contrib/rails/patcher'
|
65
65
|
require 'ddtrace/contrib/rake/patcher'
|
66
|
+
require 'ddtrace/contrib/redis/patcher'
|
66
67
|
require 'ddtrace/contrib/resque/patcher'
|
67
|
-
require 'ddtrace/contrib/
|
68
|
-
require 'ddtrace/contrib/
|
68
|
+
require 'ddtrace/contrib/rest_client/integration'
|
69
|
+
require 'ddtrace/contrib/sequel/integration'
|
69
70
|
require 'ddtrace/contrib/sidekiq/patcher'
|
70
|
-
require 'ddtrace/contrib/
|
71
|
-
require 'ddtrace/contrib/mysql2/patcher'
|
71
|
+
require 'ddtrace/contrib/sucker_punch/patcher'
|
72
72
|
require 'ddtrace/monkey'
|
data/lib/ddtrace/transport.rb
CHANGED
@@ -68,6 +68,7 @@ module Datadog
|
|
68
68
|
@count_client_error = 0
|
69
69
|
@count_server_error = 0
|
70
70
|
@count_internal_error = 0
|
71
|
+
@count_consecutive_errors = 0
|
71
72
|
end
|
72
73
|
|
73
74
|
# route the send to the right endpoint
|
@@ -109,7 +110,7 @@ module Datadog
|
|
109
110
|
response = Net::HTTP.start(@hostname, @port, read_timeout: TIMEOUT) { |http| http.request(request) }
|
110
111
|
handle_response(response)
|
111
112
|
rescue StandardError => e
|
112
|
-
|
113
|
+
log_error_once(e.message)
|
113
114
|
500
|
114
115
|
end.tap do
|
115
116
|
yield(response) if block_given?
|
@@ -170,21 +171,22 @@ module Datadog
|
|
170
171
|
|
171
172
|
if success?(status_code)
|
172
173
|
Datadog::Tracer.log.debug('Payload correctly sent to the trace agent.')
|
174
|
+
@mutex.synchronize { @count_consecutive_errors = 0 }
|
173
175
|
@mutex.synchronize { @count_success += 1 }
|
174
176
|
elsif downgrade?(status_code)
|
175
177
|
Datadog::Tracer.log.debug("calling the endpoint but received #{status_code}; downgrading the API")
|
176
178
|
elsif client_error?(status_code)
|
177
|
-
|
179
|
+
log_error_once("Client error: #{response.message}")
|
178
180
|
@mutex.synchronize { @count_client_error += 1 }
|
179
181
|
elsif server_error?(status_code)
|
180
|
-
|
181
|
-
@mutex.synchronize { @count_server_error += 1 }
|
182
|
+
log_error_once("Server error: #{response.message}")
|
182
183
|
end
|
183
184
|
|
184
185
|
status_code
|
185
186
|
rescue StandardError => e
|
186
|
-
|
187
|
+
log_error_once(e.message)
|
187
188
|
@mutex.synchronize { @count_internal_error += 1 }
|
189
|
+
|
188
190
|
500
|
189
191
|
end
|
190
192
|
|
@@ -201,6 +203,16 @@ module Datadog
|
|
201
203
|
|
202
204
|
private
|
203
205
|
|
206
|
+
def log_error_once(*args)
|
207
|
+
if @count_consecutive_errors > 0
|
208
|
+
Datadog::Tracer.log.debug(*args)
|
209
|
+
else
|
210
|
+
Datadog::Tracer.log.error(*args)
|
211
|
+
end
|
212
|
+
|
213
|
+
@mutex.synchronize { @count_consecutive_errors += 1 }
|
214
|
+
end
|
215
|
+
|
204
216
|
def process_callback(action, response)
|
205
217
|
return unless @response_callback && @response_callback.respond_to?(:call)
|
206
218
|
|
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.14.
|
4
|
+
version: 0.14.1
|
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-08-
|
11
|
+
date: 2018-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|