datadog 2.31.0 → 2.32.0

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.
Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/ext/datadog_profiling_native_extension/collectors_cpu_and_wall_time_worker.c +17 -7
  3. data/ext/datadog_profiling_native_extension/collectors_thread_context.c +11 -4
  4. data/ext/datadog_profiling_native_extension/collectors_thread_context.h +6 -0
  5. data/ext/datadog_profiling_native_extension/extconf.rb +5 -4
  6. data/ext/datadog_profiling_native_extension/http_transport.c +10 -5
  7. data/ext/libdatadog_api/di.c +48 -0
  8. data/ext/libdatadog_api/extconf.rb +7 -4
  9. data/ext/libdatadog_extconf_helpers.rb +37 -0
  10. data/lib/datadog/ai_guard/configuration.rb +105 -2
  11. data/lib/datadog/ai_guard/evaluation.rb +1 -0
  12. data/lib/datadog/ai_guard/ext.rb +1 -0
  13. data/lib/datadog/appsec/autoload.rb +1 -1
  14. data/lib/datadog/appsec/component.rb +1 -1
  15. data/lib/datadog/appsec/configuration.rb +414 -1
  16. data/lib/datadog/appsec/contrib/devise/patches/signin_tracking_patch.rb +2 -1
  17. data/lib/datadog/appsec/contrib/rack/gateway/request.rb +1 -1
  18. data/lib/datadog/appsec/contrib/rails/patcher.rb +2 -2
  19. data/lib/datadog/appsec/metrics/telemetry.rb +13 -1
  20. data/lib/datadog/appsec/security_engine/runner.rb +1 -1
  21. data/lib/datadog/appsec/trace_keeper.rb +18 -6
  22. data/lib/datadog/appsec/utils/http/url_encoded.rb +2 -2
  23. data/lib/datadog/core/configuration/components.rb +1 -1
  24. data/lib/datadog/core/configuration/settings.rb +3 -0
  25. data/lib/datadog/core/configuration/supported_configurations.rb +2 -0
  26. data/lib/datadog/core/configuration.rb +1 -1
  27. data/lib/datadog/core/contrib/rails/utils.rb +1 -1
  28. data/lib/datadog/core/crashtracking/component.rb +3 -3
  29. data/lib/datadog/core/diagnostics/environment_logger.rb +3 -1
  30. data/lib/datadog/core/environment/container.rb +2 -2
  31. data/lib/datadog/core/feature_flags.rb +1 -1
  32. data/lib/datadog/core/metrics/client.rb +5 -5
  33. data/lib/datadog/core/remote/client.rb +1 -1
  34. data/lib/datadog/core/remote/component.rb +2 -2
  35. data/lib/datadog/core/runtime/metrics.rb +1 -1
  36. data/lib/datadog/core/telemetry/emitter.rb +1 -1
  37. data/lib/datadog/core/telemetry/event/app_started.rb +2 -2
  38. data/lib/datadog/core/transport/http.rb +2 -0
  39. data/lib/datadog/core/utils.rb +1 -1
  40. data/lib/datadog/core/workers/async.rb +1 -1
  41. data/lib/datadog/core.rb +1 -1
  42. data/lib/datadog/data_streams/configuration.rb +40 -1
  43. data/lib/datadog/data_streams/pathway_context.rb +1 -1
  44. data/lib/datadog/data_streams/processor.rb +1 -1
  45. data/lib/datadog/data_streams.rb +1 -1
  46. data/lib/datadog/di/base.rb +8 -5
  47. data/lib/datadog/di/code_tracker.rb +179 -1
  48. data/lib/datadog/di/component.rb +1 -1
  49. data/lib/datadog/di/configuration.rb +235 -2
  50. data/lib/datadog/di/instrumenter.rb +46 -26
  51. data/lib/datadog/di/probe_builder.rb +1 -1
  52. data/lib/datadog/di/probe_file_loader.rb +2 -2
  53. data/lib/datadog/di/probe_manager.rb +6 -6
  54. data/lib/datadog/di/probe_notification_builder.rb +1 -1
  55. data/lib/datadog/di/probe_notifier_worker.rb +2 -2
  56. data/lib/datadog/di/remote.rb +6 -6
  57. data/lib/datadog/di/serializer.rb +1 -1
  58. data/lib/datadog/di/transport/input.rb +3 -3
  59. data/lib/datadog/error_tracking/configuration.rb +55 -2
  60. data/lib/datadog/kit/enable_core_dumps.rb +1 -1
  61. data/lib/datadog/open_feature/component.rb +18 -1
  62. data/lib/datadog/open_feature/evaluation_engine.rb +3 -3
  63. data/lib/datadog/open_feature/exposures/reporter.rb +1 -1
  64. data/lib/datadog/open_feature/exposures/worker.rb +1 -1
  65. data/lib/datadog/open_feature/hooks/flag_eval_hook.rb +49 -0
  66. data/lib/datadog/open_feature/metrics/flag_eval_metrics.rb +149 -0
  67. data/lib/datadog/open_feature/provider.rb +19 -1
  68. data/lib/datadog/open_feature/remote.rb +1 -1
  69. data/lib/datadog/open_feature/transport.rb +1 -1
  70. data/lib/datadog/opentelemetry/metrics.rb +3 -3
  71. data/lib/datadog/opentelemetry/sdk/configurator.rb +1 -1
  72. data/lib/datadog/opentelemetry/sdk/metrics_exporter.rb +1 -1
  73. data/lib/datadog/profiling/collectors/code_provenance.rb +35 -9
  74. data/lib/datadog/profiling/collectors/cpu_and_wall_time_worker.rb +31 -2
  75. data/lib/datadog/profiling/collectors/idle_sampling_helper.rb +8 -2
  76. data/lib/datadog/profiling/collectors/info.rb +16 -3
  77. data/lib/datadog/profiling/component.rb +3 -5
  78. data/lib/datadog/profiling/exporter.rb +37 -12
  79. data/lib/datadog/profiling/ext.rb +0 -2
  80. data/lib/datadog/profiling/flush.rb +21 -12
  81. data/lib/datadog/profiling/http_transport.rb +12 -1
  82. data/lib/datadog/profiling/load_native_extension.rb +1 -1
  83. data/lib/datadog/profiling/profiler.rb +13 -1
  84. data/lib/datadog/profiling/scheduler.rb +2 -2
  85. data/lib/datadog/profiling/tasks/exec.rb +8 -3
  86. data/lib/datadog/profiling/tasks/help.rb +1 -0
  87. data/lib/datadog/profiling/tasks/setup.rb +2 -2
  88. data/lib/datadog/single_step_instrument.rb +1 -1
  89. data/lib/datadog/symbol_database/configuration.rb +65 -0
  90. data/lib/datadog/symbol_database/extractor.rb +915 -0
  91. data/lib/datadog/symbol_database/file_hash.rb +46 -0
  92. data/lib/datadog/symbol_database/logger.rb +43 -0
  93. data/lib/datadog/symbol_database/scope.rb +98 -0
  94. data/lib/datadog/symbol_database/service_version.rb +57 -0
  95. data/lib/datadog/symbol_database/symbol.rb +66 -0
  96. data/lib/datadog/symbol_database/transport/http/endpoint.rb +28 -0
  97. data/lib/datadog/symbol_database/transport/http.rb +45 -0
  98. data/lib/datadog/symbol_database/transport.rb +54 -0
  99. data/lib/datadog/symbol_database/uploader.rb +166 -0
  100. data/lib/datadog/symbol_database.rb +49 -0
  101. data/lib/datadog/tracing/buffer.rb +3 -3
  102. data/lib/datadog/tracing/configuration/settings.rb +1 -1
  103. data/lib/datadog/tracing/contrib/action_pack/action_controller/instrumentation.rb +5 -3
  104. data/lib/datadog/tracing/contrib/action_view/events/render_template.rb +1 -1
  105. data/lib/datadog/tracing/contrib/active_job/events/discard.rb +1 -1
  106. data/lib/datadog/tracing/contrib/active_job/events/enqueue.rb +1 -1
  107. data/lib/datadog/tracing/contrib/active_job/events/enqueue_at.rb +1 -1
  108. data/lib/datadog/tracing/contrib/active_job/events/enqueue_retry.rb +1 -1
  109. data/lib/datadog/tracing/contrib/active_job/events/perform.rb +1 -1
  110. data/lib/datadog/tracing/contrib/active_job/events/retry_stopped.rb +1 -1
  111. data/lib/datadog/tracing/contrib/active_model_serializers/events/render.rb +1 -1
  112. data/lib/datadog/tracing/contrib/active_model_serializers/events/serialize.rb +1 -1
  113. data/lib/datadog/tracing/contrib/active_record/configuration/resolver.rb +2 -2
  114. data/lib/datadog/tracing/contrib/active_record/events/instantiation.rb +1 -1
  115. data/lib/datadog/tracing/contrib/active_record/events/sql.rb +1 -1
  116. data/lib/datadog/tracing/contrib/active_record/utils.rb +1 -1
  117. data/lib/datadog/tracing/contrib/active_support/cache/events/cache.rb +1 -1
  118. data/lib/datadog/tracing/contrib/active_support/notifications/subscription.rb +2 -2
  119. data/lib/datadog/tracing/contrib/aws/instrumentation.rb +1 -1
  120. data/lib/datadog/tracing/contrib/component.rb +1 -1
  121. data/lib/datadog/tracing/contrib/configuration/resolver.rb +7 -4
  122. data/lib/datadog/tracing/contrib/dalli/quantize.rb +1 -1
  123. data/lib/datadog/tracing/contrib/elasticsearch/patcher.rb +1 -1
  124. data/lib/datadog/tracing/contrib/excon/middleware.rb +2 -2
  125. data/lib/datadog/tracing/contrib/extensions.rb +9 -0
  126. data/lib/datadog/tracing/contrib/faraday/middleware.rb +2 -2
  127. data/lib/datadog/tracing/contrib/grape/endpoint.rb +5 -5
  128. data/lib/datadog/tracing/contrib/grpc/datadog_interceptor/client.rb +2 -2
  129. data/lib/datadog/tracing/contrib/grpc/datadog_interceptor/server.rb +2 -2
  130. data/lib/datadog/tracing/contrib/http/instrumentation.rb +2 -2
  131. data/lib/datadog/tracing/contrib/httpclient/instrumentation.rb +6 -2
  132. data/lib/datadog/tracing/contrib/httprb/instrumentation.rb +2 -2
  133. data/lib/datadog/tracing/contrib/kafka/instrumentation/consumer.rb +2 -2
  134. data/lib/datadog/tracing/contrib/kafka/instrumentation/producer.rb +2 -2
  135. data/lib/datadog/tracing/contrib/karafka/patcher.rb +1 -1
  136. data/lib/datadog/tracing/contrib/mongodb/subscribers.rb +3 -3
  137. data/lib/datadog/tracing/contrib/opensearch/patcher.rb +1 -1
  138. data/lib/datadog/tracing/contrib/presto/instrumentation.rb +3 -3
  139. data/lib/datadog/tracing/contrib/rack/patcher.rb +1 -1
  140. data/lib/datadog/tracing/contrib/rack/request_queue.rb +1 -1
  141. data/lib/datadog/tracing/contrib/rails/log_injection.rb +1 -1
  142. data/lib/datadog/tracing/contrib/rails/runner.rb +1 -1
  143. data/lib/datadog/tracing/contrib/rake/instrumentation.rb +2 -2
  144. data/lib/datadog/tracing/contrib/redis/quantize.rb +1 -1
  145. data/lib/datadog/tracing/contrib/redis/tags.rb +1 -1
  146. data/lib/datadog/tracing/contrib/sidekiq/utils.rb +1 -1
  147. data/lib/datadog/tracing/contrib/stripe/request.rb +1 -1
  148. data/lib/datadog/tracing/contrib.rb +8 -0
  149. data/lib/datadog/tracing/diagnostics/environment_logger.rb +3 -1
  150. data/lib/datadog/tracing/distributed/baggage.rb +59 -5
  151. data/lib/datadog/tracing/distributed/datadog.rb +11 -11
  152. data/lib/datadog/tracing/distributed/datadog_tags_codec.rb +1 -1
  153. data/lib/datadog/tracing/distributed/propagation.rb +2 -2
  154. data/lib/datadog/tracing/distributed/trace_context.rb +74 -32
  155. data/lib/datadog/tracing/event.rb +1 -1
  156. data/lib/datadog/tracing/metadata/tagging.rb +2 -2
  157. data/lib/datadog/tracing/pipeline.rb +1 -1
  158. data/lib/datadog/tracing/remote.rb +1 -1
  159. data/lib/datadog/tracing/sampling/rule.rb +1 -1
  160. data/lib/datadog/tracing/sampling/rule_sampler.rb +2 -2
  161. data/lib/datadog/tracing/sampling/span/rule_parser.rb +2 -2
  162. data/lib/datadog/tracing/span_operation.rb +3 -3
  163. data/lib/datadog/tracing/trace_operation.rb +4 -4
  164. data/lib/datadog/tracing/tracer.rb +5 -5
  165. data/lib/datadog/tracing/transport/io/client.rb +1 -1
  166. data/lib/datadog/tracing/workers.rb +2 -1
  167. data/lib/datadog/version.rb +1 -1
  168. metadata +18 -9
  169. data/lib/datadog/ai_guard/configuration/settings.rb +0 -113
  170. data/lib/datadog/appsec/configuration/settings.rb +0 -423
  171. data/lib/datadog/data_streams/configuration/settings.rb +0 -49
  172. data/lib/datadog/di/configuration/settings.rb +0 -243
  173. data/lib/datadog/error_tracking/configuration/settings.rb +0 -63
@@ -1,49 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../../core/environment/variable_helpers'
4
- require_relative '../ext'
5
-
6
- module Datadog
7
- module DataStreams
8
- module Configuration
9
- # Configuration settings for Data Streams Monitoring.
10
- module Settings
11
- def self.extended(base)
12
- base = base.singleton_class unless base.is_a?(Class)
13
- add_settings!(base)
14
- end
15
-
16
- def self.add_settings!(base)
17
- base.class_eval do
18
- # Data Streams Monitoring configuration
19
- # @public_api
20
- settings :data_streams do
21
- # Whether Data Streams Monitoring is enabled. When enabled, the library will
22
- # collect and report data lineage information for messaging systems.
23
- #
24
- # @default `DD_DATA_STREAMS_ENABLED` environment variable, otherwise `false`.
25
- # @return [Boolean]
26
- option :enabled do |o|
27
- o.type :bool
28
- o.env Ext::ENV_ENABLED
29
- o.default false
30
- end
31
-
32
- # The interval (in seconds) at which Data Streams Monitoring stats are flushed.
33
- #
34
- # @default 10.0
35
- # @env '_DD_TRACE_STATS_WRITER_INTERVAL'
36
- # @return [Float]
37
- # @!visibility private
38
- option :interval do |o|
39
- o.type :float
40
- o.env '_DD_TRACE_STATS_WRITER_INTERVAL'
41
- o.default 10.0
42
- end
43
- end
44
- end
45
- end
46
- end
47
- end
48
- end
49
- end
@@ -1,243 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Datadog
4
- module DI
5
- module Configuration
6
- # Settings
7
- module Settings
8
- def self.extended(base)
9
- base = base.singleton_class unless base.is_a?(Class)
10
- add_settings!(base)
11
- end
12
-
13
- def self.add_settings!(base)
14
- base.class_eval do
15
- settings :dynamic_instrumentation do
16
- option :enabled do |o|
17
- o.type :bool
18
- # The environment variable has an "internal" prefix so that
19
- # any customers that have the "proper" environment variable
20
- # turned on (i.e. DD_DYNAMIC_INSTRUMENTATION_ENABLED)
21
- # do not enable Ruby DI until the latter is ready for
22
- # customer testing.
23
- o.env "DD_DYNAMIC_INSTRUMENTATION_ENABLED"
24
- o.default false
25
- end
26
-
27
- # An array of variable and key names to redact in addition to
28
- # the built-in list of identifiers.
29
- #
30
- # The names will be normalized by removing the following
31
- # symbols: _, -, @, $, and then matched to the complete
32
- # variable or key name while ignoring the case.
33
- # For example, specifying pass_word will match password and
34
- # PASSWORD, and specifying PASSWORD will match pass_word.
35
- # Note that, while the at sign (@) is used in Ruby to refer
36
- # to instance variables, it does not have any significance
37
- # for this setting (and is removed before matching identifiers).
38
- option :redacted_identifiers do |o|
39
- o.env "DD_DYNAMIC_INSTRUMENTATION_REDACTED_IDENTIFIERS"
40
- o.env_parser do |value|
41
- value&.split(",")&.map(&:strip)
42
- end
43
-
44
- o.type :array
45
- o.default []
46
- end
47
-
48
- # An array of variable and key names to exclude from the
49
- # built-in redaction list.
50
- #
51
- # This allows users to capture values of variables that would
52
- # otherwise be redacted by the default identifier list.
53
- # For example, if an application has a "session" variable
54
- # that does not contain sensitive data, "session" can be added
55
- # to this list to exclude it from redaction.
56
- #
57
- # The names will be normalized the same way as redacted_identifiers,
58
- # by removing the following symbols: _, -, @, $, and then matched
59
- # against the complete variable or key name while ignoring the case.
60
- option :redaction_excluded_identifiers do |o|
61
- o.env "DD_DYNAMIC_INSTRUMENTATION_REDACTION_EXCLUDED_IDENTIFIERS"
62
- o.env_parser do |value|
63
- value&.split(",")&.map(&:strip)
64
- end
65
-
66
- o.type :array
67
- o.default []
68
- end
69
-
70
- # An array of class names, values of which will be redacted from
71
- # dynamic instrumentation snapshots. Example: FooClass.
72
- # If a name is suffixed by '*', it becomes a wildcard and
73
- # instances of any class whose name begins with the specified
74
- # prefix will be redacted (example: Foo*).
75
- #
76
- # The names must all be fully-qualified, if any prefix of a
77
- # class name is configured to be redacted, the value will be
78
- # subject to redaction. For example, if Foo* is in the
79
- # redacted class name list, instances of Foo, FooBar,
80
- # Foo::Bar are all subject to redaction, but Bar::Foo will
81
- # not be subject to redaction.
82
- #
83
- # Leading double-colon is permitted but has no effect,
84
- # because the names are always considered to be fully-qualified.
85
- # For example, adding ::Foo to the list will redact instances
86
- # of Foo.
87
- #
88
- # Trailing colons should not be used because they will trigger
89
- # exact match behavior but Ruby class names do not have
90
- # trailing colons. For example, Foo:: will not cause anything
91
- # to be redacted. Use Foo::* to redact all classes under
92
- # the Foo module.
93
- option :redacted_type_names do |o|
94
- o.env "DD_DYNAMIC_INSTRUMENTATION_REDACTED_TYPES"
95
- o.env_parser do |value|
96
- value&.split(",")&.map(&:strip)
97
- end
98
-
99
- o.type :array
100
- o.default []
101
- end
102
-
103
- # Maximum number of object or collection traversals that
104
- # will be permitted when serializing captured values.
105
- option :max_capture_depth do |o|
106
- o.type :int
107
- o.default 3
108
- end
109
-
110
- # Maximum number of collection (Array and Hash) elements
111
- # that will be captured. Arrays and hashes that have more
112
- # elements will be truncated to this many elements.
113
- option :max_capture_collection_size do |o|
114
- o.type :int
115
- o.default 100
116
- end
117
-
118
- # Strings longer than this length will be truncated to this
119
- # length in dynamic instrumentation snapshots.
120
- #
121
- # Note that while all values are stringified during
122
- # serialization, only values which are originally instances
123
- # of the String class are subject to this length limit.
124
- option :max_capture_string_length do |o|
125
- o.type :int
126
- o.default 255
127
- end
128
-
129
- # Maximim number of attributes that will be captured for
130
- # a single non-primitive value.
131
- option :max_capture_attribute_count do |o|
132
- o.type :int
133
- o.default 20
134
- end
135
-
136
- # Settings in the 'internal' group are for internal Datadog
137
- # use only, and are needed to test dynamic instrumentation or
138
- # experiment with features not released to customers.
139
- settings :internal do
140
- # This option instructs dynamic instrumentation to use
141
- # untargeted trace points when installing line probes and
142
- # code tracking is not active.
143
- # WARNING: untargeted trace points carry a massive performance
144
- # penalty for the entire file in which a line probe is placed.
145
- #
146
- # If this option is set to false, which is the default,
147
- # dynamic instrumentation will add probes that reference
148
- # unknown files to the list of pending probes, and when
149
- # the respective files are loaded, the line probes will be
150
- # installed using targeted trace points. If the file in
151
- # question is already loaded when the probe is received
152
- # (for example, it is in a third-party library loaded during
153
- # application boot), and code tracking was not active when
154
- # the file was loaded, such files will not be instrumentable
155
- # via line probes.
156
- #
157
- # If this option is set to true, dynamic instrumentation will
158
- # install untargeted trace points for all line probes,
159
- # regardless of whether the referenced file is loaded.
160
- # This permits instrumenting code which was loaded prior to
161
- # code tracking being activated and instrumenting lines when
162
- # code tracking is not activated at all. However, untargeted
163
- # trace points are extremely slow and will greatly degrade
164
- # performance of *all* code executed while they are installed,
165
- # not just the instrumentation target.
166
- option :untargeted_trace_points do |o|
167
- o.type :bool
168
- o.default false
169
- end
170
-
171
- # If true, all of the catch-all rescue blocks in DI
172
- # will propagate the exceptions onward.
173
- # WARNING: for internal Datadog use only - this will break
174
- # the DI product and potentially the library in general in
175
- # a multitude of ways, cause resource leakage, permanent
176
- # performance decreases, etc.
177
- option :propagate_all_exceptions do |o|
178
- o.type :bool
179
- o.default false
180
- end
181
-
182
- # Minimum interval, in seconds, between probe status and
183
- # snapshot submissions to the agent. Probe notifier worker will
184
- # batch together payloads submitted during each interval.
185
- # A longer interval reduces the overhead imposed by dynamic
186
- # instrumentation on the application, but also increases the
187
- # time when application code cannot run (when the batches are
188
- # being sent out by the probe notifier worker) and creates a
189
- # possibility of dropping payloads if the queue gets too long.
190
- option :min_send_interval do |o|
191
- o.type :float
192
- o.default 3
193
- end
194
-
195
- # Number of snapshots that can be stored in the probe
196
- # notifier worker queue. Larger capacity runs the risk of
197
- # creating snapshots that exceed the agent's request size
198
- # limit. Smaller capacity increases the risk of dropping
199
- # snapshots.
200
- option :snapshot_queue_capacity do |o|
201
- o.type :int
202
- o.default 100
203
- end
204
-
205
- # Enable dynamic instrumentation in development environments.
206
- # Currently DI does not fully implement support for code
207
- # unloading and reloading, and is not supported in
208
- # non-production environments.
209
- option :development do |o|
210
- o.type :bool
211
- o.default false
212
- end
213
-
214
- # Enable logging of dynamic instrumentation activity.
215
- # This is quite verbose.
216
- option :trace_logging do |o|
217
- o.type :bool
218
- o.default false
219
-
220
- # Use the same environment variable as the rest of
221
- # dd-trace-rb logging for now. Could change to a
222
- # dedicated environment variable in the future but
223
- # will likely need a way to turn on remote config
224
- # debugging (since DI uses RC for configuration).
225
- o.env 'DD_TRACE_DEBUG'
226
- end
227
-
228
- # If the CPU time consumed by the thread performing instrumentation
229
- # exceeds this amount, the offending probe will be automatically disabled.
230
- # Set to nil to disable the circuit breaker.
231
- # Set to zero to disable every probe after it executes once.
232
- option :max_processing_time do |o|
233
- o.type :float
234
- o.default 0.5
235
- end
236
- end
237
- end
238
- end
239
- end
240
- end
241
- end
242
- end
243
- end
@@ -1,63 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative '../ext'
4
-
5
- module Datadog
6
- module ErrorTracking
7
- module Configuration
8
- # Settings
9
- module Settings
10
- def self.extended(base)
11
- base = base.singleton_class unless base.is_a?(Class)
12
- add_settings!(base)
13
- end
14
-
15
- def self.add_settings!(base)
16
- base.class_eval do
17
- # Error Tracking specific configurations.
18
- # @public_api
19
- settings :error_tracking do
20
- # Enable automatic reporting of handled errors and defines the scope
21
- # for which to report errors: user code, gems, or both. Possible
22
- # values are: all | user | third_party.
23
- #
24
- # @default 'DD_ERROR_TRACKING_HANDLED_ERRORS' environment variable, otherwise `nil`
25
- # @return [String, nil]
26
- option :handled_errors do |o|
27
- o.type :string, nilable: true
28
- o.default Ext::DEFAULT_HANDLED_ERRORS
29
- o.env Ext::ENV_HANDLED_ERRORS
30
- o.setter do |value|
31
- next value if Ext::VALID_HANDLED_ERRORS.include?(value)
32
-
33
- unless value.nil?
34
- Datadog.logger.warn(
35
- "Invalid handled errors scope: #{value}. " \
36
- "Supported values are: #{Ext::VALID_HANDLED_ERRORS.join(" | ")}. " \
37
- 'Deactivating the feature.'
38
- )
39
- end
40
-
41
- Ext::DEFAULT_HANDLED_ERRORS
42
- end
43
- end
44
-
45
- # Enable automatic reporting of handled errors and specify what files should be
46
- # instrumented. The value is a list of comma separated paths, filenames or gem names.
47
- # The paths can be absolute, starting with '/' or relative to directory in which the program
48
- # is launched, starting with './'.
49
- #
50
- # @default 'DD_ERROR_TRACKING_HANDLED_ERRORS_MODULES' environment variable, otherwise `nil`
51
- # @return [String, nil]
52
- option :handled_errors_include do |o|
53
- o.type :array
54
- o.default []
55
- o.env Ext::ENV_HANDLED_ERRORS_INCLUDE
56
- end
57
- end
58
- end
59
- end
60
- end
61
- end
62
- end
63
- end