ddtrace 0.38.0 → 0.39.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Appraisals +29 -5
- data/CHANGELOG.md +31 -1
- data/Rakefile +69 -66
- data/docs/GettingStarted.md +85 -50
- data/lib/ddtrace.rb +1 -0
- data/lib/ddtrace/configuration/settings.rb +9 -3
- data/lib/ddtrace/contrib/action_cable/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/action_cable/ext.rb +5 -2
- data/lib/ddtrace/contrib/action_pack/action_controller/instrumentation.rb +7 -0
- data/lib/ddtrace/contrib/action_pack/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/action_pack/ext.rb +5 -2
- data/lib/ddtrace/contrib/action_view/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/action_view/ext.rb +5 -2
- data/lib/ddtrace/contrib/active_model_serializers/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/active_model_serializers/ext.rb +5 -2
- data/lib/ddtrace/contrib/active_record/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/active_record/ext.rb +5 -2
- data/lib/ddtrace/contrib/active_support/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/active_support/ext.rb +5 -2
- data/lib/ddtrace/contrib/aws/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/aws/ext.rb +5 -2
- data/lib/ddtrace/contrib/concurrent_ruby/configuration/settings.rb +5 -0
- data/lib/ddtrace/contrib/concurrent_ruby/ext.rb +1 -0
- data/lib/ddtrace/contrib/configuration/settings.rb +1 -0
- data/lib/ddtrace/contrib/dalli/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/dalli/ext.rb +5 -2
- data/lib/ddtrace/contrib/delayed_job/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/delayed_job/ext.rb +5 -2
- data/lib/ddtrace/contrib/elasticsearch/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/elasticsearch/ext.rb +5 -2
- data/lib/ddtrace/contrib/ethon/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/ethon/ext.rb +5 -2
- data/lib/ddtrace/contrib/excon/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/excon/ext.rb +5 -2
- data/lib/ddtrace/contrib/extensions.rb +1 -1
- data/lib/ddtrace/contrib/faraday/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/faraday/ext.rb +5 -2
- data/lib/ddtrace/contrib/faraday/patcher.rb +12 -3
- data/lib/ddtrace/contrib/grape/configuration/settings.rb +7 -3
- data/lib/ddtrace/contrib/grape/ext.rb +5 -2
- data/lib/ddtrace/contrib/graphql/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/graphql/ext.rb +5 -2
- data/lib/ddtrace/contrib/grpc/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/grpc/ext.rb +5 -2
- data/lib/ddtrace/contrib/http/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/http/ext.rb +5 -2
- data/lib/ddtrace/contrib/httprb/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/httprb/ext.rb +5 -2
- data/lib/ddtrace/contrib/httprb/instrumentation.rb +3 -6
- data/lib/ddtrace/contrib/kafka/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/kafka/ext.rb +5 -2
- data/lib/ddtrace/contrib/mongodb/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/mongodb/ext.rb +5 -2
- data/lib/ddtrace/contrib/mysql2/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/mysql2/ext.rb +5 -2
- data/lib/ddtrace/contrib/presto/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/presto/ext.rb +5 -2
- data/lib/ddtrace/contrib/racecar/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/racecar/ext.rb +5 -2
- data/lib/ddtrace/contrib/rack/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/rack/ext.rb +5 -2
- data/lib/ddtrace/contrib/rails/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/rails/ext.rb +5 -2
- data/lib/ddtrace/contrib/rake/configuration/settings.rb +7 -3
- data/lib/ddtrace/contrib/rake/ext.rb +5 -2
- data/lib/ddtrace/contrib/redis/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/redis/ext.rb +5 -2
- data/lib/ddtrace/contrib/resque/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/resque/ext.rb +5 -2
- data/lib/ddtrace/contrib/rest_client/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/rest_client/ext.rb +5 -2
- data/lib/ddtrace/contrib/sequel/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/sequel/ext.rb +5 -2
- data/lib/ddtrace/contrib/sequel/utils.rb +19 -1
- data/lib/ddtrace/contrib/shoryuken/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/shoryuken/ext.rb +5 -2
- data/lib/ddtrace/contrib/sidekiq/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/sidekiq/ext.rb +5 -2
- data/lib/ddtrace/contrib/sinatra/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/sinatra/ext.rb +5 -2
- data/lib/ddtrace/contrib/sneakers/configuration/settings.rb +32 -0
- data/lib/ddtrace/contrib/sneakers/ext.rb +22 -0
- data/lib/ddtrace/contrib/sneakers/integration.rb +41 -0
- data/lib/ddtrace/contrib/sneakers/patcher.rb +24 -0
- data/lib/ddtrace/contrib/sneakers/tracer.rb +58 -0
- data/lib/ddtrace/contrib/sucker_punch/configuration/settings.rb +7 -2
- data/lib/ddtrace/contrib/sucker_punch/ext.rb +5 -2
- data/lib/ddtrace/diagnostics/environment_logger.rb +1 -1
- data/lib/ddtrace/environment.rb +14 -4
- data/lib/ddtrace/ext/diagnostics.rb +2 -1
- data/lib/ddtrace/ext/transport.rb +1 -0
- data/lib/ddtrace/logger.rb +1 -1
- data/lib/ddtrace/runtime/metrics.rb +18 -4
- data/lib/ddtrace/transport/http.rb +15 -0
- data/lib/ddtrace/transport/http/adapters/test.rb +2 -0
- data/lib/ddtrace/version.rb +1 -1
- metadata +36 -46
data/lib/ddtrace.rb
CHANGED
@@ -72,5 +72,6 @@ require 'ddtrace/contrib/sequel/integration'
|
|
72
72
|
require 'ddtrace/contrib/shoryuken/integration'
|
73
73
|
require 'ddtrace/contrib/sidekiq/integration'
|
74
74
|
require 'ddtrace/contrib/sinatra/integration'
|
75
|
+
require 'ddtrace/contrib/sneakers/integration'
|
75
76
|
require 'ddtrace/contrib/sucker_punch/integration'
|
76
77
|
require 'ddtrace/monkey'
|
@@ -37,7 +37,10 @@ module Datadog
|
|
37
37
|
end
|
38
38
|
|
39
39
|
settings :diagnostics do
|
40
|
-
option :debug
|
40
|
+
option :debug do |o|
|
41
|
+
o.default { env_to_bool(Datadog::Ext::Diagnostics::DD_TRACE_DEBUG, false) }
|
42
|
+
o.lazy
|
43
|
+
end
|
41
44
|
|
42
45
|
settings :health_metrics do
|
43
46
|
option :enabled do |o|
|
@@ -92,7 +95,7 @@ module Datadog
|
|
92
95
|
o.on_set { |value| set_option(:level, value.level) unless value.nil? }
|
93
96
|
end
|
94
97
|
|
95
|
-
option :level, default: ::Logger::
|
98
|
+
option :level, default: ::Logger::INFO
|
96
99
|
end
|
97
100
|
|
98
101
|
def logger=(logger)
|
@@ -198,7 +201,10 @@ module Datadog
|
|
198
201
|
end
|
199
202
|
|
200
203
|
settings :tracer do
|
201
|
-
option :enabled
|
204
|
+
option :enabled do |o|
|
205
|
+
o.default { env_to_bool(Datadog::Ext::Diagnostics::DD_TRACE_ENABLED, true) }
|
206
|
+
o.lazy
|
207
|
+
end
|
202
208
|
option :hostname # TODO: Deprecate
|
203
209
|
option :instance
|
204
210
|
|
@@ -7,13 +7,18 @@ module Datadog
|
|
7
7
|
module Configuration
|
8
8
|
# Custom settings for the ActionCable integration
|
9
9
|
class Settings < Contrib::Configuration::Settings
|
10
|
+
option :enabled do |o|
|
11
|
+
o.default { env_to_bool(Ext::ENV_ENABLED, true) }
|
12
|
+
o.lazy
|
13
|
+
end
|
14
|
+
|
10
15
|
option :analytics_enabled do |o|
|
11
|
-
o.default { env_to_bool(Ext::ENV_ANALYTICS_ENABLED, false) }
|
16
|
+
o.default { env_to_bool([Ext::ENV_ANALYTICS_ENABLED, Ext::ENV_ANALYTICS_ENABLED_OLD], false) }
|
12
17
|
o.lazy
|
13
18
|
end
|
14
19
|
|
15
20
|
option :analytics_sample_rate do |o|
|
16
|
-
o.default { env_to_float(Ext::ENV_ANALYTICS_SAMPLE_RATE, 1.0) }
|
21
|
+
o.default { env_to_float([Ext::ENV_ANALYTICS_SAMPLE_RATE, Ext::ENV_ANALYTICS_SAMPLE_RATE_OLD], 1.0) }
|
17
22
|
o.lazy
|
18
23
|
end
|
19
24
|
|
@@ -4,8 +4,11 @@ module Datadog
|
|
4
4
|
# ActionCable integration constants
|
5
5
|
module Ext
|
6
6
|
APP = 'action_cable'.freeze
|
7
|
-
|
8
|
-
|
7
|
+
ENV_ENABLED = 'DD_TRACE_ACTION_CABLE_ENABLED'.freeze
|
8
|
+
ENV_ANALYTICS_ENABLED = 'DD_TRACE_ACTION_CABLE_ANALYTICS_ENABLED'.freeze
|
9
|
+
ENV_ANALYTICS_ENABLED_OLD = 'DD_ACTION_CABLE_ANALYTICS_ENABLED'.freeze
|
10
|
+
ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_ACTION_CABLE_ANALYTICS_SAMPLE_RATE'.freeze
|
11
|
+
ENV_ANALYTICS_SAMPLE_RATE_OLD = 'DD_ACTION_CABLE_ANALYTICS_SAMPLE_RATE'.freeze
|
9
12
|
SERVICE_NAME = 'action_cable'.freeze
|
10
13
|
SPAN_ACTION = 'action_cable.action'.freeze
|
11
14
|
SPAN_BROADCAST = 'action_cable.broadcast'.freeze
|
@@ -66,6 +66,13 @@ module Datadog
|
|
66
66
|
span.status = 1 if status.starts_with?('5')
|
67
67
|
elsif Utils.exception_is_error?(exception)
|
68
68
|
span.set_error(exception)
|
69
|
+
|
70
|
+
# Some exception gets handled by Rails middleware before it can be set on Rack middleware
|
71
|
+
# The rack span is the root span of the request and should make sure it has the full exception
|
72
|
+
# set on it.
|
73
|
+
if env[:datadog_rack_request_span]
|
74
|
+
env[:datadog_rack_request_span].set_error(exception)
|
75
|
+
end
|
69
76
|
end
|
70
77
|
ensure
|
71
78
|
span.finish
|
@@ -7,13 +7,18 @@ module Datadog
|
|
7
7
|
module Configuration
|
8
8
|
# Custom settings for the ActionPack integration
|
9
9
|
class Settings < Contrib::Configuration::Settings
|
10
|
+
option :enabled do |o|
|
11
|
+
o.default { env_to_bool(Ext::ENV_ENABLED, true) }
|
12
|
+
o.lazy
|
13
|
+
end
|
14
|
+
|
10
15
|
option :analytics_enabled do |o|
|
11
|
-
o.default { env_to_bool(Ext::ENV_ANALYTICS_ENABLED, nil) }
|
16
|
+
o.default { env_to_bool([Ext::ENV_ANALYTICS_ENABLED, Ext::ENV_ANALYTICS_ENABLED_OLD], nil) }
|
12
17
|
o.lazy
|
13
18
|
end
|
14
19
|
|
15
20
|
option :analytics_sample_rate do |o|
|
16
|
-
o.default { env_to_float(Ext::ENV_ANALYTICS_SAMPLE_RATE, 1.0) }
|
21
|
+
o.default { env_to_float([Ext::ENV_ANALYTICS_SAMPLE_RATE, Ext::ENV_ANALYTICS_SAMPLE_RATE_OLD], 1.0) }
|
17
22
|
o.lazy
|
18
23
|
end
|
19
24
|
|
@@ -4,8 +4,11 @@ module Datadog
|
|
4
4
|
# ActionPack integration constants
|
5
5
|
module Ext
|
6
6
|
APP = 'action_pack'.freeze
|
7
|
-
|
8
|
-
|
7
|
+
ENV_ENABLED = 'DD_TRACE_ACTION_PACK_ENABLED'.freeze
|
8
|
+
ENV_ANALYTICS_ENABLED = 'DD_TRACE_ACTION_PACK_ANALYTICS_ENABLED'.freeze
|
9
|
+
ENV_ANALYTICS_ENABLED_OLD = 'DD_ACTION_PACK_ANALYTICS_ENABLED'.freeze
|
10
|
+
ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_ACTION_PACK_ANALYTICS_SAMPLE_RATE'.freeze
|
11
|
+
ENV_ANALYTICS_SAMPLE_RATE_OLD = 'DD_ACTION_PACK_ANALYTICS_SAMPLE_RATE'.freeze
|
9
12
|
SERVICE_NAME = 'action_pack'.freeze
|
10
13
|
SPAN_ACTION_CONTROLLER = 'rails.action_controller'.freeze
|
11
14
|
TAG_ROUTE_ACTION = 'rails.route.action'.freeze
|
@@ -7,13 +7,18 @@ module Datadog
|
|
7
7
|
module Configuration
|
8
8
|
# Custom settings for the ActionView integration
|
9
9
|
class Settings < Contrib::Configuration::Settings
|
10
|
+
option :enabled do |o|
|
11
|
+
o.default { env_to_bool(Ext::ENV_ENABLED, true) }
|
12
|
+
o.lazy
|
13
|
+
end
|
14
|
+
|
10
15
|
option :analytics_enabled do |o|
|
11
|
-
o.default { env_to_bool(Ext::ENV_ANALYTICS_ENABLED, false) }
|
16
|
+
o.default { env_to_bool([Ext::ENV_ANALYTICS_ENABLED, Ext::ENV_ANALYTICS_ENABLED_OLD], false) }
|
12
17
|
o.lazy
|
13
18
|
end
|
14
19
|
|
15
20
|
option :analytics_sample_rate do |o|
|
16
|
-
o.default { env_to_float(Ext::ENV_ANALYTICS_SAMPLE_RATE, 1.0) }
|
21
|
+
o.default { env_to_float([Ext::ENV_ANALYTICS_SAMPLE_RATE, Ext::ENV_ANALYTICS_SAMPLE_RATE_OLD], 1.0) }
|
17
22
|
o.lazy
|
18
23
|
end
|
19
24
|
|
@@ -4,8 +4,11 @@ module Datadog
|
|
4
4
|
# ActionView integration constants
|
5
5
|
module Ext
|
6
6
|
APP = 'action_view'.freeze
|
7
|
-
|
8
|
-
|
7
|
+
ENV_ENABLED = 'DD_TRACE_ACTION_VIEW_ENABLED'.freeze
|
8
|
+
ENV_ANALYTICS_ENABLED = 'DD_TRACE_ACTION_VIEW_ANALYTICS_ENABLED'.freeze
|
9
|
+
ENV_ANALYTICS_ENABLED_OLD = 'DD_ACTION_VIEW_ANALYTICS_ENABLED'.freeze
|
10
|
+
ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_ACTION_VIEW_ANALYTICS_SAMPLE_RATE'.freeze
|
11
|
+
ENV_ANALYTICS_SAMPLE_RATE_OLD = 'DD_ACTION_VIEW_ANALYTICS_SAMPLE_RATE'.freeze
|
9
12
|
SERVICE_NAME = 'action_view'.freeze
|
10
13
|
SPAN_RENDER_PARTIAL = 'rails.render_partial'.freeze
|
11
14
|
SPAN_RENDER_TEMPLATE = 'rails.render_template'.freeze
|
@@ -7,13 +7,18 @@ module Datadog
|
|
7
7
|
module Configuration
|
8
8
|
# Custom settings for the ActiveModelSerializers integration
|
9
9
|
class Settings < Contrib::Configuration::Settings
|
10
|
+
option :enabled do |o|
|
11
|
+
o.default { env_to_bool(Ext::ENV_ENABLED, true) }
|
12
|
+
o.lazy
|
13
|
+
end
|
14
|
+
|
10
15
|
option :analytics_enabled do |o|
|
11
|
-
o.default { env_to_bool(Ext::ENV_ANALYTICS_ENABLED, false) }
|
16
|
+
o.default { env_to_bool([Ext::ENV_ANALYTICS_ENABLED, Ext::ENV_ANALYTICS_ENABLED_OLD], false) }
|
12
17
|
o.lazy
|
13
18
|
end
|
14
19
|
|
15
20
|
option :analytics_sample_rate do |o|
|
16
|
-
o.default { env_to_float(Ext::ENV_ANALYTICS_SAMPLE_RATE, 1.0) }
|
21
|
+
o.default { env_to_float([Ext::ENV_ANALYTICS_SAMPLE_RATE, Ext::ENV_ANALYTICS_SAMPLE_RATE_OLD], 1.0) }
|
17
22
|
o.lazy
|
18
23
|
end
|
19
24
|
|
@@ -4,8 +4,11 @@ module Datadog
|
|
4
4
|
# ActiveModelSerializers integration constants
|
5
5
|
module Ext
|
6
6
|
APP = 'active_model_serializers'.freeze
|
7
|
-
|
8
|
-
|
7
|
+
ENV_ENABLED = 'DD_TRACE_ACTIVE_MODEL_SERIALIZERS_ENABLED'.freeze
|
8
|
+
ENV_ANALYTICS_ENABLED = 'DD_TRACE_ACTIVE_MODEL_SERIALIZERS_ANALYTICS_ENABLED'.freeze
|
9
|
+
ENV_ANALYTICS_ENABLED_OLD = 'DD_ACTIVE_MODEL_SERIALIZERS_ANALYTICS_ENABLED'.freeze
|
10
|
+
ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_ACTIVE_MODEL_SERIALIZERS_ANALYTICS_SAMPLE_RATE'.freeze
|
11
|
+
ENV_ANALYTICS_SAMPLE_RATE_OLD = 'DD_ACTIVE_MODEL_SERIALIZERS_ANALYTICS_SAMPLE_RATE'.freeze
|
9
12
|
SERVICE_NAME = 'active_model_serializers'.freeze
|
10
13
|
SPAN_RENDER = 'active_model_serializers.render'.freeze
|
11
14
|
SPAN_SERIALIZE = 'active_model_serializers.serialize'.freeze
|
@@ -8,13 +8,18 @@ module Datadog
|
|
8
8
|
module Configuration
|
9
9
|
# Custom settings for the ActiveRecord integration
|
10
10
|
class Settings < Contrib::Configuration::Settings
|
11
|
+
option :enabled do |o|
|
12
|
+
o.default { env_to_bool(Ext::ENV_ENABLED, true) }
|
13
|
+
o.lazy
|
14
|
+
end
|
15
|
+
|
11
16
|
option :analytics_enabled do |o|
|
12
|
-
o.default { env_to_bool(Ext::ENV_ANALYTICS_ENABLED, false) }
|
17
|
+
o.default { env_to_bool([Ext::ENV_ANALYTICS_ENABLED, Ext::ENV_ANALYTICS_ENABLED_OLD], false) }
|
13
18
|
o.lazy
|
14
19
|
end
|
15
20
|
|
16
21
|
option :analytics_sample_rate do |o|
|
17
|
-
o.default { env_to_float(Ext::ENV_ANALYTICS_SAMPLE_RATE, 1.0) }
|
22
|
+
o.default { env_to_float([Ext::ENV_ANALYTICS_SAMPLE_RATE, Ext::ENV_ANALYTICS_SAMPLE_RATE_OLD], 1.0) }
|
18
23
|
o.lazy
|
19
24
|
end
|
20
25
|
|
@@ -4,8 +4,11 @@ module Datadog
|
|
4
4
|
# ActiveRecord integration constants
|
5
5
|
module Ext
|
6
6
|
APP = 'active_record'.freeze
|
7
|
-
|
8
|
-
|
7
|
+
ENV_ENABLED = 'DD_TRACE_ACTIVE_RECORD_ENABLED'.freeze
|
8
|
+
ENV_ANALYTICS_ENABLED = 'DD_TRACE_ACTIVE_RECORD_ANALYTICS_ENABLED'.freeze
|
9
|
+
ENV_ANALYTICS_ENABLED_OLD = 'DD_ACTIVE_RECORD_ANALYTICS_ENABLED'.freeze
|
10
|
+
ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_ACTIVE_RECORD_ANALYTICS_SAMPLE_RATE'.freeze
|
11
|
+
ENV_ANALYTICS_SAMPLE_RATE_OLD = 'DD_ACTIVE_RECORD_ANALYTICS_SAMPLE_RATE'.freeze
|
9
12
|
SERVICE_NAME = 'active_record'.freeze
|
10
13
|
SPAN_INSTANTIATION = 'active_record.instantiation'.freeze
|
11
14
|
SPAN_SQL = 'active_record.sql'.freeze
|
@@ -7,13 +7,18 @@ module Datadog
|
|
7
7
|
module Configuration
|
8
8
|
# Custom settings for the ActiveSupport integration
|
9
9
|
class Settings < Contrib::Configuration::Settings
|
10
|
+
option :enabled do |o|
|
11
|
+
o.default { env_to_bool(Ext::ENV_ENABLED, true) }
|
12
|
+
o.lazy
|
13
|
+
end
|
14
|
+
|
10
15
|
option :analytics_enabled do |o|
|
11
|
-
o.default { env_to_bool(Ext::ENV_ANALYTICS_ENABLED, false) }
|
16
|
+
o.default { env_to_bool([Ext::ENV_ANALYTICS_ENABLED, Ext::ENV_ANALYTICS_ENABLED_OLD], false) }
|
12
17
|
o.lazy
|
13
18
|
end
|
14
19
|
|
15
20
|
option :analytics_sample_rate do |o|
|
16
|
-
o.default { env_to_float(Ext::ENV_ANALYTICS_SAMPLE_RATE, 1.0) }
|
21
|
+
o.default { env_to_float([Ext::ENV_ANALYTICS_SAMPLE_RATE, Ext::ENV_ANALYTICS_SAMPLE_RATE_OLD], 1.0) }
|
17
22
|
o.lazy
|
18
23
|
end
|
19
24
|
|
@@ -4,8 +4,11 @@ module Datadog
|
|
4
4
|
# ActiveSupport integration constants
|
5
5
|
module Ext
|
6
6
|
APP = 'active_support'.freeze
|
7
|
-
|
8
|
-
|
7
|
+
ENV_ENABLED = 'DD_TRACE_ACTIVE_SUPPORT_ENABLED'.freeze
|
8
|
+
ENV_ANALYTICS_ENABLED = 'DD_TRACE_ACTIVE_SUPPORT_ANALYTICS_ENABLED'.freeze
|
9
|
+
ENV_ANALYTICS_ENABLED_OLD = 'DD_ACTIVE_SUPPORT_ANALYTICS_ENABLED'.freeze
|
10
|
+
ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_ACTIVE_SUPPORT_ANALYTICS_SAMPLE_RATE'.freeze
|
11
|
+
ENV_ANALYTICS_SAMPLE_RATE_OLD = 'DD_ACTIVE_SUPPORT_ANALYTICS_SAMPLE_RATE'.freeze
|
9
12
|
QUANTIZE_CACHE_MAX_KEY_SIZE = 300
|
10
13
|
RESOURCE_CACHE_DELETE = 'DELETE'.freeze
|
11
14
|
RESOURCE_CACHE_GET = 'GET'.freeze
|
@@ -7,13 +7,18 @@ module Datadog
|
|
7
7
|
module Configuration
|
8
8
|
# Custom settings for the AWS integration
|
9
9
|
class Settings < Contrib::Configuration::Settings
|
10
|
+
option :enabled do |o|
|
11
|
+
o.default { env_to_bool(Ext::ENV_ENABLED, true) }
|
12
|
+
o.lazy
|
13
|
+
end
|
14
|
+
|
10
15
|
option :analytics_enabled do |o|
|
11
|
-
o.default { env_to_bool(Ext::ENV_ANALYTICS_ENABLED, false) }
|
16
|
+
o.default { env_to_bool([Ext::ENV_ANALYTICS_ENABLED, Ext::ENV_ANALYTICS_ENABLED_OLD], false) }
|
12
17
|
o.lazy
|
13
18
|
end
|
14
19
|
|
15
20
|
option :analytics_sample_rate do |o|
|
16
|
-
o.default { env_to_float(Ext::ENV_ANALYTICS_SAMPLE_RATE, 1.0) }
|
21
|
+
o.default { env_to_float([Ext::ENV_ANALYTICS_SAMPLE_RATE, Ext::ENV_ANALYTICS_SAMPLE_RATE_OLD], 1.0) }
|
17
22
|
o.lazy
|
18
23
|
end
|
19
24
|
|
@@ -4,8 +4,11 @@ module Datadog
|
|
4
4
|
# AWS integration constants
|
5
5
|
module Ext
|
6
6
|
APP = 'aws'.freeze
|
7
|
-
|
8
|
-
|
7
|
+
ENV_ENABLED = 'DD_TRACE_AWS_ENABLED'.freeze
|
8
|
+
ENV_ANALYTICS_ENABLED = 'DD_TRACE_AWS_ANALYTICS_ENABLED'.freeze
|
9
|
+
ENV_ANALYTICS_ENABLED_OLD = 'DD_AWS_ANALYTICS_ENABLED'.freeze
|
10
|
+
ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_AWS_ANALYTICS_SAMPLE_RATE'.freeze
|
11
|
+
ENV_ANALYTICS_SAMPLE_RATE_OLD = 'DD_AWS_ANALYTICS_SAMPLE_RATE'.freeze
|
9
12
|
SERVICE_NAME = 'aws'.freeze
|
10
13
|
SPAN_COMMAND = 'aws.command'.freeze
|
11
14
|
TAG_AGENT = 'aws.agent'.freeze
|
@@ -7,6 +7,11 @@ module Datadog
|
|
7
7
|
module Configuration
|
8
8
|
# Custom settings for the ConcurrentRuby integration
|
9
9
|
class Settings < Contrib::Configuration::Settings
|
10
|
+
option :enabled do |o|
|
11
|
+
o.default { env_to_bool(Ext::ENV_ENABLED, true) }
|
12
|
+
o.lazy
|
13
|
+
end
|
14
|
+
|
10
15
|
option :service_name, default: Ext::SERVICE_NAME
|
11
16
|
end
|
12
17
|
end
|
@@ -7,13 +7,18 @@ module Datadog
|
|
7
7
|
module Configuration
|
8
8
|
# Custom settings for the Dalli integration
|
9
9
|
class Settings < Contrib::Configuration::Settings
|
10
|
+
option :enabled do |o|
|
11
|
+
o.default { env_to_bool(Ext::ENV_ENABLED, true) }
|
12
|
+
o.lazy
|
13
|
+
end
|
14
|
+
|
10
15
|
option :analytics_enabled do |o|
|
11
|
-
o.default { env_to_bool(Ext::ENV_ANALYTICS_ENABLED, false) }
|
16
|
+
o.default { env_to_bool([Ext::ENV_ANALYTICS_ENABLED, Ext::ENV_ANALYTICS_ENABLED_OLD], false) }
|
12
17
|
o.lazy
|
13
18
|
end
|
14
19
|
|
15
20
|
option :analytics_sample_rate do |o|
|
16
|
-
o.default { env_to_float(Ext::ENV_ANALYTICS_SAMPLE_RATE, 1.0) }
|
21
|
+
o.default { env_to_float([Ext::ENV_ANALYTICS_SAMPLE_RATE, Ext::ENV_ANALYTICS_SAMPLE_RATE_OLD], 1.0) }
|
17
22
|
o.lazy
|
18
23
|
end
|
19
24
|
|
@@ -4,8 +4,11 @@ module Datadog
|
|
4
4
|
# Dalli integration constants
|
5
5
|
module Ext
|
6
6
|
APP = 'dalli'.freeze
|
7
|
-
|
8
|
-
|
7
|
+
ENV_ENABLED = 'DD_TRACE_DALLI_ENABLED'.freeze
|
8
|
+
ENV_ANALYTICS_ENABLED = 'DD_TRACE_DALLI_ANALYTICS_ENABLED'.freeze
|
9
|
+
ENV_ANALYTICS_ENABLED_OLD = 'DD_DALLI_ANALYTICS_ENABLED'.freeze
|
10
|
+
ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_DALLI_ANALYTICS_SAMPLE_RATE'.freeze
|
11
|
+
ENV_ANALYTICS_SAMPLE_RATE_OLD = 'DD_DALLI_ANALYTICS_SAMPLE_RATE'.freeze
|
9
12
|
QUANTIZE_MAX_CMD_LENGTH = 100
|
10
13
|
SERVICE_NAME = 'memcached'.freeze
|
11
14
|
SPAN_COMMAND = 'memcached.command'.freeze
|
@@ -7,13 +7,18 @@ module Datadog
|
|
7
7
|
module Configuration
|
8
8
|
# Custom settings for the DelayedJob integration
|
9
9
|
class Settings < Contrib::Configuration::Settings
|
10
|
+
option :enabled do |o|
|
11
|
+
o.default { env_to_bool(Ext::ENV_ENABLED, true) }
|
12
|
+
o.lazy
|
13
|
+
end
|
14
|
+
|
10
15
|
option :analytics_enabled do |o|
|
11
|
-
o.default { env_to_bool(Ext::ENV_ANALYTICS_ENABLED, false) }
|
16
|
+
o.default { env_to_bool([Ext::ENV_ANALYTICS_ENABLED, Ext::ENV_ANALYTICS_ENABLED_OLD], false) }
|
12
17
|
o.lazy
|
13
18
|
end
|
14
19
|
|
15
20
|
option :analytics_sample_rate do |o|
|
16
|
-
o.default { env_to_float(Ext::ENV_ANALYTICS_SAMPLE_RATE, 1.0) }
|
21
|
+
o.default { env_to_float([Ext::ENV_ANALYTICS_SAMPLE_RATE, Ext::ENV_ANALYTICS_SAMPLE_RATE_OLD], 1.0) }
|
17
22
|
o.lazy
|
18
23
|
end
|
19
24
|
|
@@ -4,8 +4,11 @@ module Datadog
|
|
4
4
|
# DelayedJob integration constants
|
5
5
|
module Ext
|
6
6
|
APP = 'delayed_job'.freeze
|
7
|
-
|
8
|
-
|
7
|
+
ENV_ENABLED = 'DD_TRACE_DELAYED_JOB_ENABLED'.freeze
|
8
|
+
ENV_ANALYTICS_ENABLED = 'DD_TRACE_DELAYED_JOB_ANALYTICS_ENABLED'.freeze
|
9
|
+
ENV_ANALYTICS_ENABLED_OLD = 'DD_DELAYED_JOB_ANALYTICS_ENABLED'.freeze
|
10
|
+
ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_DELAYED_JOB_ANALYTICS_SAMPLE_RATE'.freeze
|
11
|
+
ENV_ANALYTICS_SAMPLE_RATE_OLD = 'DD_DELAYED_JOB_ANALYTICS_SAMPLE_RATE'.freeze
|
9
12
|
SERVICE_NAME = 'delayed_job'.freeze
|
10
13
|
SPAN_JOB = 'delayed_job'.freeze
|
11
14
|
TAG_ATTEMPTS = 'delayed_job.attempts'.freeze
|
@@ -7,13 +7,18 @@ module Datadog
|
|
7
7
|
module Configuration
|
8
8
|
# Custom settings for the Elasticsearch integration
|
9
9
|
class Settings < Contrib::Configuration::Settings
|
10
|
+
option :enabled do |o|
|
11
|
+
o.default { env_to_bool(Ext::ENV_ENABLED, true) }
|
12
|
+
o.lazy
|
13
|
+
end
|
14
|
+
|
10
15
|
option :analytics_enabled do |o|
|
11
|
-
o.default { env_to_bool(Ext::ENV_ANALYTICS_ENABLED, false) }
|
16
|
+
o.default { env_to_bool([Ext::ENV_ANALYTICS_ENABLED, Ext::ENV_ANALYTICS_ENABLED_OLD], false) }
|
12
17
|
o.lazy
|
13
18
|
end
|
14
19
|
|
15
20
|
option :analytics_sample_rate do |o|
|
16
|
-
o.default { env_to_float(Ext::ENV_ANALYTICS_SAMPLE_RATE, 1.0) }
|
21
|
+
o.default { env_to_float([Ext::ENV_ANALYTICS_SAMPLE_RATE, Ext::ENV_ANALYTICS_SAMPLE_RATE_OLD], 1.0) }
|
17
22
|
o.lazy
|
18
23
|
end
|
19
24
|
|
@@ -4,8 +4,11 @@ module Datadog
|
|
4
4
|
# Elasticsearch integration constants
|
5
5
|
module Ext
|
6
6
|
APP = 'elasticsearch'.freeze
|
7
|
-
|
8
|
-
|
7
|
+
ENV_ENABLED = 'DD_TRACE_ELASTICSEARCH_ENABLED'.freeze
|
8
|
+
ENV_ANALYTICS_ENABLED = 'DD_TRACE_ELASTICSEARCH_ANALYTICS_ENABLED'.freeze
|
9
|
+
ENV_ANALYTICS_ENABLED_OLD = 'DD_ELASTICSEARCH_ANALYTICS_ENABLED'.freeze
|
10
|
+
ENV_ANALYTICS_SAMPLE_RATE = 'DD_TRACE_ELASTICSEARCH_ANALYTICS_SAMPLE_RATE'.freeze
|
11
|
+
ENV_ANALYTICS_SAMPLE_RATE_OLD = 'DD_ELASTICSEARCH_ANALYTICS_SAMPLE_RATE'.freeze
|
9
12
|
SERVICE_NAME = 'elasticsearch'.freeze
|
10
13
|
SPAN_QUERY = 'elasticsearch.query'.freeze
|
11
14
|
SPAN_TYPE_QUERY = 'elasticsearch'.freeze
|