ddtrace 0.4.2 → 0.4.3
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9dc26d3b7ce6a1750bd273655bfb068604249878
|
4
|
+
data.tar.gz: 9c431f39db93b20c1d3c854e8efa1cb3b8d030b4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 044bc1ebc2a9e74f66754fbe3514563a8f8ad735e3547bcdc7ca61e508cbd3fac52a7f16d451d719c5402f05272a5f3ea7951b57a7c155fcc27b897cae063a62
|
7
|
+
data.tar.gz: 29ce52bf23933396a5d45b2467d43c0a9b1642769f6119fe22c8f38b544b2c796cf309366de063498f3ad07e4026dd48d18ac03179f24952cf31d96fb5b7597c
|
data/.rubocop.yml
CHANGED
@@ -36,20 +36,28 @@ module Datadog
|
|
36
36
|
url = full_url.path
|
37
37
|
response = nil
|
38
38
|
pin.tracer.trace('elasticsearch.query') do |span|
|
39
|
-
|
40
|
-
|
39
|
+
begin
|
40
|
+
span.service = pin.service
|
41
|
+
span.span_type = SPAN_TYPE
|
41
42
|
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
span.set_tag(BODY, JSON.generate(body)) if body
|
43
|
+
# load JSON for the following fields unless they're already strings
|
44
|
+
params = JSON.generate(params) if params && !params.is_a?(String)
|
45
|
+
body = JSON.generate(body) if body && !body.is_a?(String)
|
46
46
|
|
47
|
-
|
48
|
-
|
47
|
+
span.set_tag(METHOD, method)
|
48
|
+
span.set_tag(URL, url)
|
49
|
+
span.set_tag(PARAMS, params) if params
|
50
|
+
span.set_tag(BODY, body) if body
|
49
51
|
|
50
|
-
|
52
|
+
quantized_url = Datadog::Contrib::Elasticsearch::Quantize.format_url(url)
|
53
|
+
span.resource = "#{method} #{quantized_url}"
|
54
|
+
rescue StandardError => e
|
55
|
+
Datadog::Tracer.log.error(e.message)
|
56
|
+
ensure
|
57
|
+
# the call is still executed
|
58
|
+
response = super(*args)
|
59
|
+
end
|
51
60
|
end
|
52
|
-
|
53
61
|
response
|
54
62
|
end
|
55
63
|
end
|
@@ -14,8 +14,6 @@ module Datadog
|
|
14
14
|
|
15
15
|
module_function
|
16
16
|
|
17
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
18
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
19
17
|
def should_skip_tracing?(req, address, port, transport, pin)
|
20
18
|
# we don't want to trace our own call to the API (they use net/http)
|
21
19
|
# when we know the host & port (from the URI) we use it, else (most-likely
|
@@ -93,7 +93,9 @@ module Datadog
|
|
93
93
|
begin
|
94
94
|
# finish the tracing and update the execution time
|
95
95
|
span.resource = resource
|
96
|
-
|
96
|
+
# discard parameters from the cache_store configuration
|
97
|
+
store, = *Array.wrap(::Rails.configuration.cache_store).flatten
|
98
|
+
span.set_tag('rails.cache.backend', store)
|
97
99
|
span.set_tag('rails.cache.key', payload.fetch(:key))
|
98
100
|
|
99
101
|
if payload[:exception]
|
@@ -85,9 +85,7 @@ module Datadog
|
|
85
85
|
end
|
86
86
|
|
87
87
|
# rubocop:disable Metrics/AbcSize
|
88
|
-
# rubocop:disable Metrics/CyclomaticComplexity
|
89
88
|
# rubocop:disable Metrics/MethodLength
|
90
|
-
# rubocop:disable Metrics/PerceivedComplexity
|
91
89
|
def self.registered(app)
|
92
90
|
::Sinatra::Base.module_eval do
|
93
91
|
def render(engine, data, *)
|
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.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Datadog, Inc.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: msgpack
|