ddtrace 0.30.1 → 0.31.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.circleci/config.yml +28 -0
- data/.circleci/images/primary/Dockerfile-2.7.0 +73 -0
- data/Appraisals +111 -2
- data/CHANGELOG.md +33 -1
- data/Rakefile +69 -1
- data/ddtrace.gemspec +1 -0
- data/docker-compose.yml +30 -0
- data/docs/GettingStarted.md +28 -3
- data/lib/ddtrace.rb +6 -0
- data/lib/ddtrace/buffer.rb +3 -3
- data/lib/ddtrace/configuration/base.rb +2 -1
- data/lib/ddtrace/configuration/settings.rb +15 -2
- data/lib/ddtrace/context.rb +62 -57
- data/lib/ddtrace/context_flush.rb +51 -114
- data/lib/ddtrace/context_provider.rb +45 -0
- data/lib/ddtrace/contrib/action_cable/configuration/settings.rb +25 -0
- data/lib/ddtrace/contrib/action_cable/event.rb +65 -0
- data/lib/ddtrace/contrib/action_cable/events.rb +33 -0
- data/lib/ddtrace/contrib/action_cable/events/broadcast.rb +49 -0
- data/lib/ddtrace/contrib/action_cable/events/perform_action.rb +52 -0
- data/lib/ddtrace/contrib/action_cable/events/transmit.rb +50 -0
- data/lib/ddtrace/contrib/action_cable/ext.rb +23 -0
- data/lib/ddtrace/contrib/action_cable/instrumentation.rb +31 -0
- data/lib/ddtrace/contrib/action_cable/integration.rb +36 -0
- data/lib/ddtrace/contrib/action_cable/patcher.rb +27 -0
- data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +2 -2
- data/lib/ddtrace/contrib/action_view/events/render_partial.rb +5 -3
- data/lib/ddtrace/contrib/action_view/events/render_template.rb +5 -3
- data/lib/ddtrace/contrib/action_view/instrumentation/partial_renderer.rb +2 -1
- data/lib/ddtrace/contrib/action_view/instrumentation/template_renderer.rb +4 -2
- data/lib/ddtrace/contrib/action_view/patcher.rb +1 -1
- data/lib/ddtrace/contrib/active_record/events/instantiation.rb +1 -1
- data/lib/ddtrace/contrib/active_record/events/sql.rb +1 -1
- data/lib/ddtrace/contrib/active_support/cache/instrumentation.rb +2 -2
- data/lib/ddtrace/contrib/active_support/notifications/subscription.rb +2 -2
- data/lib/ddtrace/contrib/dalli/patcher.rb +1 -1
- data/lib/ddtrace/contrib/dalli/quantize.rb +1 -1
- data/lib/ddtrace/contrib/elasticsearch/patcher.rb +1 -1
- data/lib/ddtrace/contrib/excon/middleware.rb +3 -3
- data/lib/ddtrace/contrib/faraday/connection.rb +18 -0
- data/lib/ddtrace/contrib/faraday/integration.rb +1 -1
- data/lib/ddtrace/contrib/faraday/patcher.rb +3 -3
- data/lib/ddtrace/contrib/grape/endpoint.rb +5 -5
- data/lib/ddtrace/contrib/grape/patcher.rb +1 -1
- data/lib/ddtrace/contrib/grpc/datadog_interceptor/client.rb +1 -1
- data/lib/ddtrace/contrib/grpc/datadog_interceptor/server.rb +2 -2
- data/lib/ddtrace/contrib/grpc/patcher.rb +1 -1
- data/lib/ddtrace/contrib/http/instrumentation.rb +1 -1
- data/lib/ddtrace/contrib/mongodb/subscribers.rb +2 -2
- data/lib/ddtrace/contrib/patchable.rb +1 -1
- data/lib/ddtrace/contrib/patcher.rb +1 -1
- data/lib/ddtrace/contrib/rack/middlewares.rb +2 -2
- data/lib/ddtrace/contrib/rack/patcher.rb +2 -2
- data/lib/ddtrace/contrib/rack/request_queue.rb +1 -1
- data/lib/ddtrace/contrib/rails/configuration/settings.rb +1 -0
- data/lib/ddtrace/contrib/rails/framework.rb +12 -0
- data/lib/ddtrace/contrib/rake/instrumentation.rb +2 -2
- data/lib/ddtrace/contrib/redis/quantize.rb +1 -1
- data/lib/ddtrace/contrib/sinatra/tracer.rb +1 -1
- data/lib/ddtrace/ext/forced_tracing.rb +1 -1
- data/lib/ddtrace/ext/sampling.rb +3 -0
- data/lib/ddtrace/logger.rb +42 -0
- data/lib/ddtrace/metrics.rb +5 -5
- data/lib/ddtrace/monkey.rb +1 -1
- data/lib/ddtrace/pin.rb +1 -1
- data/lib/ddtrace/pipeline.rb +1 -1
- data/lib/ddtrace/propagation/http_propagator.rb +2 -2
- data/lib/ddtrace/runtime/cgroup.rb +1 -1
- data/lib/ddtrace/runtime/container.rb +1 -1
- data/lib/ddtrace/runtime/metrics.rb +1 -1
- data/lib/ddtrace/sampler.rb +1 -1
- data/lib/ddtrace/sampling/rule.rb +1 -1
- data/lib/ddtrace/sampling/rule_sampler.rb +4 -4
- data/lib/ddtrace/span.rb +24 -6
- data/lib/ddtrace/sync_writer.rb +4 -3
- data/lib/ddtrace/tracer.rb +37 -77
- data/lib/ddtrace/transport/http/client.rb +2 -2
- data/lib/ddtrace/utils.rb +1 -1
- data/lib/ddtrace/version.rb +2 -2
- data/lib/ddtrace/workers.rb +3 -3
- data/lib/ddtrace/writer.rb +3 -2
- metadata +44 -6
- data/lib/ddtrace/contrib/faraday/rack_builder.rb +0 -18
- data/lib/ddtrace/provider.rb +0 -21
@@ -23,7 +23,7 @@ module Datadog
|
|
23
23
|
tracing_context = payload.fetch(:tracing_context)
|
24
24
|
tracing_context[:dd_request_span] = span
|
25
25
|
rescue StandardError => e
|
26
|
-
Datadog::
|
26
|
+
Datadog::Logger.log.error(e.message)
|
27
27
|
end
|
28
28
|
|
29
29
|
def finish_processing(payload)
|
@@ -67,7 +67,7 @@ module Datadog
|
|
67
67
|
span.finish
|
68
68
|
end
|
69
69
|
rescue StandardError => e
|
70
|
-
Datadog::
|
70
|
+
Datadog::Logger.log.error(e.message)
|
71
71
|
end
|
72
72
|
|
73
73
|
def exception_controller?(payload)
|
@@ -26,12 +26,14 @@ module Datadog
|
|
26
26
|
def process(span, _event, _id, payload)
|
27
27
|
span.span_type = Datadog::Ext::HTTP::TEMPLATE
|
28
28
|
|
29
|
-
template_name = Utils.normalize_template_name(payload[:identifier])
|
30
|
-
|
29
|
+
if (template_name = Utils.normalize_template_name(payload[:identifier]))
|
30
|
+
span.resource = template_name
|
31
|
+
span.set_tag(Ext::TAG_TEMPLATE_NAME, template_name)
|
32
|
+
end
|
31
33
|
|
32
34
|
record_exception(span, payload)
|
33
35
|
rescue StandardError => e
|
34
|
-
Datadog::
|
36
|
+
Datadog::Logger.log.debug(e.message)
|
35
37
|
end
|
36
38
|
end
|
37
39
|
end
|
@@ -26,15 +26,17 @@ module Datadog
|
|
26
26
|
def process(span, _event, _id, payload)
|
27
27
|
span.span_type = Datadog::Ext::HTTP::TEMPLATE
|
28
28
|
|
29
|
-
template_name = Utils.normalize_template_name(payload[:identifier])
|
30
|
-
|
29
|
+
if (template_name = Utils.normalize_template_name(payload[:identifier]))
|
30
|
+
span.resource = template_name
|
31
|
+
span.set_tag(Ext::TAG_TEMPLATE_NAME, template_name)
|
32
|
+
end
|
31
33
|
|
32
34
|
layout = payload[:layout]
|
33
35
|
span.set_tag(Ext::TAG_LAYOUT, layout) if layout
|
34
36
|
|
35
37
|
record_exception(span, payload)
|
36
38
|
rescue StandardError => e
|
37
|
-
Datadog::
|
39
|
+
Datadog::Logger.log.debug(e.message)
|
38
40
|
end
|
39
41
|
end
|
40
42
|
end
|
@@ -21,7 +21,7 @@ module Datadog
|
|
21
21
|
|
22
22
|
datadog_render_partial(template)
|
23
23
|
rescue StandardError => e
|
24
|
-
Datadog::
|
24
|
+
Datadog::Logger.log.debug(e.message)
|
25
25
|
end
|
26
26
|
|
27
27
|
# execute the original function anyway
|
@@ -32,6 +32,7 @@ module Datadog
|
|
32
32
|
template_name = Utils.normalize_template_name(template.try('identifier'))
|
33
33
|
|
34
34
|
if template_name
|
35
|
+
active_datadog_span.resource = template_name
|
35
36
|
active_datadog_span.set_tag(
|
36
37
|
Ext::TAG_TEMPLATE_NAME,
|
37
38
|
template_name
|
@@ -37,6 +37,7 @@ module Datadog
|
|
37
37
|
template_name = Utils.normalize_template_name(template_name)
|
38
38
|
|
39
39
|
if template_name
|
40
|
+
active_datadog_span.resource = template_name
|
40
41
|
active_datadog_span.set_tag(
|
41
42
|
Ext::TAG_TEMPLATE_NAME,
|
42
43
|
template_name
|
@@ -50,7 +51,7 @@ module Datadog
|
|
50
51
|
)
|
51
52
|
end
|
52
53
|
rescue StandardError => e
|
53
|
-
Datadog::
|
54
|
+
Datadog::Logger.log.debug(e.message)
|
54
55
|
end
|
55
56
|
|
56
57
|
# execute the original function anyway
|
@@ -99,7 +100,7 @@ module Datadog
|
|
99
100
|
|
100
101
|
datadog_render_template(template, layout_name)
|
101
102
|
rescue StandardError => e
|
102
|
-
Datadog::
|
103
|
+
Datadog::Logger.log.debug(e.message)
|
103
104
|
end
|
104
105
|
|
105
106
|
# execute the original function anyway
|
@@ -113,6 +114,7 @@ module Datadog
|
|
113
114
|
layout = layout_name.try(:[], 'virtual_path') # Proc can be called without parameters since Rails 6
|
114
115
|
|
115
116
|
if template_name
|
117
|
+
active_datadog_span.resource = template_name
|
116
118
|
active_datadog_span.set_tag(
|
117
119
|
Ext::TAG_TEMPLATE_NAME,
|
118
120
|
template_name
|
@@ -38,7 +38,7 @@ module Datadog
|
|
38
38
|
::ActionView::Rendering.send(:prepend, Instrumentation::TemplateRenderer::Rails30)
|
39
39
|
::ActionView::Partials::PartialRenderer.send(:prepend, Instrumentation::PartialRenderer::RailsLessThan4)
|
40
40
|
else
|
41
|
-
Datadog::
|
41
|
+
Datadog::Logger.log.debug('Expected Template/Partial classes not found; template rendering disabled')
|
42
42
|
end
|
43
43
|
end
|
44
44
|
end
|
@@ -48,7 +48,7 @@ module Datadog
|
|
48
48
|
span.set_tag(Ext::TAG_INSTANTIATION_CLASS_NAME, payload.fetch(:class_name))
|
49
49
|
span.set_tag(Ext::TAG_INSTANTIATION_RECORD_COUNT, payload.fetch(:record_count))
|
50
50
|
rescue StandardError => e
|
51
|
-
Datadog::
|
51
|
+
Datadog::Logger.log.debug(e.message)
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|
@@ -55,7 +55,7 @@ module Datadog
|
|
55
55
|
span.set_tag(Datadog::Ext::NET::TARGET_HOST, config[:host]) if config[:host]
|
56
56
|
span.set_tag(Datadog::Ext::NET::TARGET_PORT, config[:port]) if config[:port]
|
57
57
|
rescue StandardError => e
|
58
|
-
Datadog::
|
58
|
+
Datadog::Logger.log.debug(e.message)
|
59
59
|
end
|
60
60
|
end
|
61
61
|
end
|
@@ -31,7 +31,7 @@ module Datadog
|
|
31
31
|
span.resource = payload.fetch(:action)
|
32
32
|
tracing_context[:dd_cache_span] = span
|
33
33
|
rescue StandardError => e
|
34
|
-
Datadog::
|
34
|
+
Datadog::Logger.log.debug(e.message)
|
35
35
|
end
|
36
36
|
|
37
37
|
def finish_trace_cache(payload)
|
@@ -56,7 +56,7 @@ module Datadog
|
|
56
56
|
span.finish
|
57
57
|
end
|
58
58
|
rescue StandardError => e
|
59
|
-
Datadog::
|
59
|
+
Datadog::Logger.log.debug(e.message)
|
60
60
|
end
|
61
61
|
|
62
62
|
# Defines instrumentation for ActiveSupport cache reading
|
@@ -114,7 +114,7 @@ module Datadog
|
|
114
114
|
def run(span, name, id, payload)
|
115
115
|
run!(span, name, id, payload)
|
116
116
|
rescue StandardError => e
|
117
|
-
Datadog::
|
117
|
+
Datadog::Logger.log.debug("ActiveSupport::Notifications handler for '#{name}' failed: #{e.message}")
|
118
118
|
end
|
119
119
|
|
120
120
|
def run!(*args)
|
@@ -139,7 +139,7 @@ module Datadog
|
|
139
139
|
begin
|
140
140
|
callback.call(event, key, *args)
|
141
141
|
rescue StandardError => e
|
142
|
-
Datadog::
|
142
|
+
Datadog::Logger.log.debug(
|
143
143
|
"ActiveSupport::Notifications '#{key}' callback for '#{event}' failed: #{e.message}"
|
144
144
|
)
|
145
145
|
end
|
@@ -13,7 +13,7 @@ module Datadog
|
|
13
13
|
command = Utils.utf8_encode(command, binary: true, placeholder: placeholder)
|
14
14
|
Utils.truncate(command, Ext::QUANTIZE_MAX_CMD_LENGTH)
|
15
15
|
rescue => e
|
16
|
-
|
16
|
+
Logger.log.debug("Error sanitizing Dalli operation: #{e}")
|
17
17
|
placeholder
|
18
18
|
end
|
19
19
|
end
|
@@ -97,7 +97,7 @@ module Datadog
|
|
97
97
|
quantized_url = Datadog::Contrib::Elasticsearch::Quantize.format_url(url)
|
98
98
|
span.resource = "#{method} #{quantized_url}"
|
99
99
|
rescue StandardError => e
|
100
|
-
Datadog::
|
100
|
+
Datadog::Logger.log.error(e.message)
|
101
101
|
ensure
|
102
102
|
# the call is still executed
|
103
103
|
response = perform_request_without_datadog(*args)
|
@@ -30,7 +30,7 @@ module Datadog
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
rescue StandardError => e
|
33
|
-
Datadog::
|
33
|
+
Datadog::Logger.log.debug(e.message)
|
34
34
|
end
|
35
35
|
|
36
36
|
@stack.request_call(datum)
|
@@ -116,7 +116,7 @@ module Datadog
|
|
116
116
|
span.set_tag(Datadog::Ext::HTTP::URL, datum[:path])
|
117
117
|
span.set_tag(Datadog::Ext::HTTP::METHOD, datum[:method].to_s.upcase)
|
118
118
|
span.set_tag(Datadog::Ext::NET::TARGET_HOST, datum[:host])
|
119
|
-
span.set_tag(Datadog::Ext::NET::TARGET_PORT, datum[:port]
|
119
|
+
span.set_tag(Datadog::Ext::NET::TARGET_PORT, datum[:port])
|
120
120
|
end
|
121
121
|
|
122
122
|
def handle_response(datum)
|
@@ -137,7 +137,7 @@ module Datadog
|
|
137
137
|
end
|
138
138
|
end
|
139
139
|
rescue StandardError => e
|
140
|
-
Datadog::
|
140
|
+
Datadog::Logger.log.debug(e.message)
|
141
141
|
end
|
142
142
|
|
143
143
|
def propagate!(span, datum)
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module Datadog
|
2
|
+
module Contrib
|
3
|
+
module Faraday
|
4
|
+
# Handles installation of our middleware if the user has *not*
|
5
|
+
# already explicitly configured our middleware for this correction.
|
6
|
+
#
|
7
|
+
# Wraps Faraday::Connection#initialize:
|
8
|
+
# https://github.com/lostisland/faraday/blob/ff9dc1d1219a1bbdba95a9a4cf5d135b97247ee2/lib/faraday/connection.rb#L62-L92
|
9
|
+
module Connection
|
10
|
+
def initialize(*args, &block)
|
11
|
+
super.tap do
|
12
|
+
use(:ddtrace) unless builder.handlers.any? { |h| h.klass == Middleware }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'ddtrace/contrib/patcher'
|
2
2
|
require 'ddtrace/ext/app_types'
|
3
3
|
require 'ddtrace/contrib/faraday/ext'
|
4
|
-
require 'ddtrace/contrib/faraday/
|
4
|
+
require 'ddtrace/contrib/faraday/connection'
|
5
5
|
|
6
6
|
module Datadog
|
7
7
|
module Contrib
|
@@ -39,7 +39,7 @@ module Datadog
|
|
39
39
|
end
|
40
40
|
|
41
41
|
def add_default_middleware!
|
42
|
-
::Faraday::
|
42
|
+
::Faraday::Connection.send(:prepend, Connection)
|
43
43
|
end
|
44
44
|
|
45
45
|
def get_option(option)
|
@@ -66,7 +66,7 @@ module Datadog
|
|
66
66
|
|
67
67
|
def log_deprecation_warning(method_name)
|
68
68
|
do_once(method_name) do
|
69
|
-
Datadog::
|
69
|
+
Datadog::Logger.log.warn("#{method_name}:#{DEPRECATION_WARNING}")
|
70
70
|
end
|
71
71
|
end
|
72
72
|
end
|
@@ -46,7 +46,7 @@ module Datadog
|
|
46
46
|
|
47
47
|
Thread.current[KEY_RUN] = true
|
48
48
|
rescue StandardError => e
|
49
|
-
Datadog::
|
49
|
+
Datadog::Logger.log.error(e.message)
|
50
50
|
end
|
51
51
|
|
52
52
|
def endpoint_run(name, start, finish, id, payload)
|
@@ -96,7 +96,7 @@ module Datadog
|
|
96
96
|
span.finish(finish)
|
97
97
|
end
|
98
98
|
rescue StandardError => e
|
99
|
-
Datadog::
|
99
|
+
Datadog::Logger.log.error(e.message)
|
100
100
|
end
|
101
101
|
|
102
102
|
def endpoint_start_render(*)
|
@@ -112,7 +112,7 @@ module Datadog
|
|
112
112
|
|
113
113
|
Thread.current[KEY_RENDER] = true
|
114
114
|
rescue StandardError => e
|
115
|
-
Datadog::
|
115
|
+
Datadog::Logger.log.error(e.message)
|
116
116
|
end
|
117
117
|
|
118
118
|
def endpoint_render(name, start, finish, id, payload)
|
@@ -132,7 +132,7 @@ module Datadog
|
|
132
132
|
span.finish(finish)
|
133
133
|
end
|
134
134
|
rescue StandardError => e
|
135
|
-
Datadog::
|
135
|
+
Datadog::Logger.log.error(e.message)
|
136
136
|
end
|
137
137
|
|
138
138
|
def endpoint_run_filters(name, start, finish, id, payload)
|
@@ -164,7 +164,7 @@ module Datadog
|
|
164
164
|
span.finish(finish)
|
165
165
|
end
|
166
166
|
rescue StandardError => e
|
167
|
-
Datadog::
|
167
|
+
Datadog::Logger.log.error(e.message)
|
168
168
|
end
|
169
169
|
|
170
170
|
private
|
@@ -40,7 +40,7 @@ module Datadog
|
|
40
40
|
Datadog::GRPCPropagator
|
41
41
|
.inject!(span.context, metadata)
|
42
42
|
rescue StandardError => e
|
43
|
-
Datadog::
|
43
|
+
Datadog::Logger.log.debug("GRPC client trace failed: #{e}")
|
44
44
|
end
|
45
45
|
|
46
46
|
def format_resource(proto_method)
|
@@ -35,7 +35,7 @@ module Datadog
|
|
35
35
|
tracer.provider.context = Datadog::GRPCPropagator
|
36
36
|
.extract(metadata)
|
37
37
|
rescue StandardError => e
|
38
|
-
Datadog::
|
38
|
+
Datadog::Logger.log.debug(
|
39
39
|
"unable to propagate GRPC metadata to context: #{e}"
|
40
40
|
)
|
41
41
|
end
|
@@ -49,7 +49,7 @@ module Datadog
|
|
49
49
|
# Set analytics sample rate
|
50
50
|
Contrib::Analytics.set_sample_rate(span, analytics_sample_rate) if analytics_enabled?
|
51
51
|
rescue StandardError => e
|
52
|
-
Datadog::
|
52
|
+
Datadog::Logger.log.debug("GRPC client trace failed: #{e}")
|
53
53
|
end
|
54
54
|
|
55
55
|
def reserved_headers
|
@@ -46,7 +46,7 @@ module Datadog
|
|
46
46
|
Datadog::HTTPPropagator.inject!(span.context, req)
|
47
47
|
end
|
48
48
|
rescue StandardError => e
|
49
|
-
Datadog::
|
49
|
+
Datadog::Logger.log.error("error preparing span for http request: #{e}")
|
50
50
|
ensure
|
51
51
|
response = super(req, body, &block)
|
52
52
|
end
|
@@ -50,7 +50,7 @@ module Datadog
|
|
50
50
|
# the framework itself, so we set only the error and the message
|
51
51
|
span.set_error(event)
|
52
52
|
rescue StandardError => e
|
53
|
-
Datadog::
|
53
|
+
Datadog::Logger.log.debug("error when handling MongoDB 'failed' event: #{e}")
|
54
54
|
ensure
|
55
55
|
# whatever happens, the Span must be removed from the local storage and
|
56
56
|
# it must be finished to prevent any leak
|
@@ -66,7 +66,7 @@ module Datadog
|
|
66
66
|
rows = event.reply.fetch('n', nil)
|
67
67
|
span.set_tag(Ext::TAG_ROWS, rows) unless rows.nil?
|
68
68
|
rescue StandardError => e
|
69
|
-
Datadog::
|
69
|
+
Datadog::Logger.log.debug("error when handling MongoDB 'succeeded' event: #{e}")
|
70
70
|
ensure
|
71
71
|
# whatever happens, the Span must be removed from the local storage and
|
72
72
|
# it must be finished to prevent any leak
|
@@ -32,7 +32,7 @@ module Datadog
|
|
32
32
|
end
|
33
33
|
rescue StandardError => e
|
34
34
|
# Log the error
|
35
|
-
Datadog::
|
35
|
+
Datadog::Logger.log.error("Failed to apply #{patch_name} patch. Cause: #{e} Location: #{e.backtrace.first}")
|
36
36
|
|
37
37
|
# Emit a metric
|
38
38
|
tags = default_tags
|
@@ -218,7 +218,7 @@ module Datadog
|
|
218
218
|
if key == :datadog_rack_request_span \
|
219
219
|
&& @datadog_span_warning \
|
220
220
|
&& @datadog_deprecation_warnings
|
221
|
-
Datadog::
|
221
|
+
Datadog::Logger.log.warn(REQUEST_SPAN_DEPRECATION_WARNING)
|
222
222
|
@datadog_span_warning = true
|
223
223
|
end
|
224
224
|
super
|
@@ -228,7 +228,7 @@ module Datadog
|
|
228
228
|
if key == :datadog_rack_request_span \
|
229
229
|
&& @datadog_span_warning \
|
230
230
|
&& @datadog_deprecation_warnings
|
231
|
-
Datadog::
|
231
|
+
Datadog::Logger.log.warn(REQUEST_SPAN_DEPRECATION_WARNING)
|
232
232
|
@datadog_span_warning = true
|
233
233
|
end
|
234
234
|
super
|
@@ -38,7 +38,7 @@ module Datadog
|
|
38
38
|
# context of middleware patching outside a Rails server process (eg. a
|
39
39
|
# process that doesn't serve HTTP requests but has Rails environment
|
40
40
|
# loaded such as a Resque master process)
|
41
|
-
|
41
|
+
Logger.log.debug("Error patching middleware stack: #{e}")
|
42
42
|
end
|
43
43
|
|
44
44
|
def retain_middleware_name(middleware)
|
@@ -90,7 +90,7 @@ module Datadog
|
|
90
90
|
if get_option(:application)
|
91
91
|
MiddlewareNamePatcher.patch
|
92
92
|
else
|
93
|
-
Datadog::
|
93
|
+
Datadog::Logger.log.warn(%(
|
94
94
|
Rack :middleware_names requires you to also pass :application.
|
95
95
|
Middleware names have NOT been patched; please provide :application.
|
96
96
|
e.g. use: :rack, middleware_names: true, application: my_rack_app).freeze)
|