Class: Datadog::Core::Configuration::Settings::DSL::Profiling::Advanced
- Inherits:
-
Object
- Object
- Datadog::Core::Configuration::Settings::DSL::Profiling::Advanced
- Defined in:
- lib/datadog/core/configuration/settings.rb
Defined Under Namespace
Classes: Endpoint
Instance Attribute Summary collapse
-
#allocation_counting_enabled ⇒ Object
deprecated
Deprecated.
Use :allocation_enabled (outside of advanced section) instead.
-
#code_provenance_enabled ⇒ Object
Can be used to disable the gathering of names and versions of gems in use by the service, used to power grouping and categorization of stack traces.
-
#experimental_allocation_enabled ⇒ Object
deprecated
Deprecated.
Use :allocation_enabled (outside of advanced section) instead.
-
#experimental_allocation_sample_rate ⇒ Object
Can be used to configure the allocation sampling rate: a sample will be collected every x allocations.
-
#experimental_heap_enabled ⇒ Object
Can be used to enable/disable the collection of heap profiles.
-
#experimental_heap_sample_rate ⇒ Object
Can be used to configure the heap sampling rate: a heap sample will be collected for every x allocation samples.
-
#experimental_heap_size_enabled ⇒ Object
Can be used to enable/disable the collection of heap size profiles.
-
#experimental_timeline_enabled ⇒ Object
Enables data collection for the timeline feature.
-
#force_enable_gc_profiling ⇒ Object
deprecated
Deprecated.
No longer does anything, and will be removed on dd-trace-rb 2.0.
-
#force_enable_legacy_profiler ⇒ Object
deprecated
Deprecated.
No longer does anything, and will be removed on dd-trace-rb 2.0.
-
#force_enable_new_profiler ⇒ Object
deprecated
Deprecated.
No longer does anything, and will be removed on dd-trace-rb 2.0.
-
#gc_enabled ⇒ Object
Can be used to enable/disable garbage collection profiling.
-
#legacy_transport_enabled ⇒ Object
deprecated
Deprecated.
No longer does anything, and will be removed on dd-trace-rb 2.0.
-
#max_events ⇒ Object
deprecated
Deprecated.
No longer does anything, and will be removed on dd-trace-rb 2.0.
-
#max_frames ⇒ Object
Controls the maximum number of frames for each thread sampled.
-
#no_signals_workaround_enabled ⇒ Object
The profiler gathers data by sending
SIGPROF
unix signals to Ruby application threads. -
#overhead_target_percentage ⇒ Object
Configures how much wall-time overhead the profiler targets.
-
#skip_mysql2_check ⇒ Object
Can be used to disable checking which version of
libmysqlclient
is being used by themysql2
gem. -
#timeline_enabled ⇒ Object
Controls data collection for the timeline feature.
-
#upload_period_seconds ⇒ Object
Controls how often the profiler reports data, in seconds.
Instance Method Summary collapse
-
#endpoint ⇒ Datadog::Core::Configuration::Settings::DSL::Profiling::Advanced::Endpoint
A configuration object.
Instance Attribute Details
#allocation_counting_enabled ⇒ Object
Use :allocation_enabled (outside of advanced section) instead.
Can be used to enable/disable the Datadog::Profiling.allocation_count feature.
353 354 355 |
# File 'lib/datadog/core/configuration/settings.rb', line 353 def allocation_counting_enabled @allocation_counting_enabled end |
#code_provenance_enabled ⇒ Object
Can be used to disable the gathering of names and versions of gems in use by the service, used to power grouping and categorization of stack traces.
269 270 271 |
# File 'lib/datadog/core/configuration/settings.rb', line 269 def code_provenance_enabled @code_provenance_enabled end |
#experimental_allocation_enabled ⇒ Object
Use :allocation_enabled (outside of advanced section) instead.
366 367 368 |
# File 'lib/datadog/core/configuration/settings.rb', line 366 def experimental_allocation_enabled @experimental_allocation_enabled end |
#experimental_allocation_sample_rate ⇒ Object
Can be used to configure the allocation sampling rate: a sample will be collected every x allocations.
This feature is now controlled via :overhead_target_percentage
410 411 412 |
# File 'lib/datadog/core/configuration/settings.rb', line 410 def experimental_allocation_sample_rate @experimental_allocation_sample_rate end |
#experimental_heap_enabled ⇒ Object
Can be used to enable/disable the collection of heap profiles.
This feature is alpha and disabled by default
387 388 389 |
# File 'lib/datadog/core/configuration/settings.rb', line 387 def experimental_heap_enabled @experimental_heap_enabled end |
#experimental_heap_sample_rate ⇒ Object
Can be used to configure the heap sampling rate: a heap sample will be collected for every x allocation samples.
The lower the value, the more accuracy in heap tracking but the bigger the overhead. In particular, a value of 1 will track ALL allocations samples for heap profiles.
The effective heap sampling rate in terms of allocations (not allocation samples) can be calculated via effective_heap_sample_rate = allocation_sample_rate * heap_sample_rate.
433 434 435 |
# File 'lib/datadog/core/configuration/settings.rb', line 433 def experimental_heap_sample_rate @experimental_heap_sample_rate end |
#experimental_heap_size_enabled ⇒ Object
Can be used to enable/disable the collection of heap size profiles.
This feature is alpha and enabled by default when heap profiling is enabled.
whatever the value of DD_PROFILING_EXPERIMENTAL_HEAP_ENABLED is.
401 402 403 |
# File 'lib/datadog/core/configuration/settings.rb', line 401 def experimental_heap_size_enabled @experimental_heap_size_enabled end |
#experimental_timeline_enabled ⇒ Object
Enables data collection for the timeline feature. This is still experimental and not recommended yet.
453 454 455 |
# File 'lib/datadog/core/configuration/settings.rb', line 453 def experimental_timeline_enabled @experimental_timeline_enabled end |
#force_enable_gc_profiling ⇒ Object
No longer does anything, and will be removed on dd-trace-rb 2.0.
GC profiling is now on by default and controlled by :gc_enabled.
322 323 324 |
# File 'lib/datadog/core/configuration/settings.rb', line 322 def force_enable_gc_profiling @force_enable_gc_profiling end |
#force_enable_legacy_profiler ⇒ Object
No longer does anything, and will be removed on dd-trace-rb 2.0.
This was used prior to the GA of the new CPU Profiling 2.0 profiler. Using CPU Profiling 2.0 is now the default and this doesn't do anything.
308 309 310 |
# File 'lib/datadog/core/configuration/settings.rb', line 308 def force_enable_legacy_profiler @force_enable_legacy_profiler end |
#force_enable_new_profiler ⇒ Object
No longer does anything, and will be removed on dd-trace-rb 2.0.
This was used prior to the GA of the new CPU Profiling 2.0 profiler. Using CPU Profiling 2.0 is now the default and this doesn't do anything.
293 294 295 |
# File 'lib/datadog/core/configuration/settings.rb', line 293 def force_enable_new_profiler @force_enable_new_profiler end |
#gc_enabled ⇒ Object
Can be used to enable/disable garbage collection profiling.
344 345 346 |
# File 'lib/datadog/core/configuration/settings.rb', line 344 def gc_enabled @gc_enabled end |
#legacy_transport_enabled ⇒ Object
No longer does anything, and will be removed on dd-trace-rb 2.0.
This was added as a temporary support option in case of issues with the new Profiling::HttpTransport
class
but we're now confident it's working nicely so we've removed the old code path.
278 279 280 |
# File 'lib/datadog/core/configuration/settings.rb', line 278 def legacy_transport_enabled @legacy_transport_enabled end |
#max_events ⇒ Object
No longer does anything, and will be removed on dd-trace-rb 2.0.
This was used prior to the GA of the new CPU Profiling 2.0 profiler. The CPU Profiling 2.0 profiler does not use or need this setting and thus it doesn't do anything.
230 231 232 |
# File 'lib/datadog/core/configuration/settings.rb', line 230 def max_events @max_events end |
#max_frames ⇒ Object
Controls the maximum number of frames for each thread sampled. Can be tuned to avoid omitted frames in the produced profiles. Increasing this may increase the overhead of profiling.
245 246 247 |
# File 'lib/datadog/core/configuration/settings.rb', line 245 def max_frames @max_frames end |
#no_signals_workaround_enabled ⇒ Object
The profiler gathers data by sending SIGPROF
unix signals to Ruby application threads.
Sending SIGPROF
is a common profiling approach, and may cause system calls from native
extensions/libraries to be interrupted with a system
EINTR error code.
Rarely, native extensions or libraries called by them may have missing or incorrect error handling for the
EINTR
error code.
The "no signals" workaround, when enabled, enables an alternative mode for the profiler where it does not
send SIGPROF
unix signals. The downside of this approach is that the profiler data will have lower
quality.
This workaround is automatically enabled when gems that are known to have issues handling
EINTR
error codes are detected. If you suspect you may be seeing an issue due to the profiler's use of
signals, you can try manually enabling this mode as a fallback.
Please also report these issues to us on https://github.com/DataDog/dd-trace-rb/issues/new, so we can
work with the gem authors to fix them!
496 497 498 |
# File 'lib/datadog/core/configuration/settings.rb', line 496 def no_signals_workaround_enabled @no_signals_workaround_enabled end |
#overhead_target_percentage ⇒ Object
Configures how much wall-time overhead the profiler targets. The profiler will dynamically adjust the interval between samples it takes so as to try and maintain the property that it spends no longer than this amount of wall-clock time profiling. For example, with the default value of 2%, the profiler will try and cause no more than 1.2 seconds per minute of overhead. Decreasing this value will reduce the accuracy of the data collected. Increasing will impact the application.
We do not recommend tweaking this value.
This value should be a percentage i.e. a number between 0 and 100, not 0 and 1.
518 519 520 |
# File 'lib/datadog/core/configuration/settings.rb', line 518 def overhead_target_percentage @overhead_target_percentage end |
#skip_mysql2_check ⇒ Object
Can be used to disable checking which version of libmysqlclient
is being used by the mysql2
gem.
This setting is only used when the mysql2
gem is installed.
444 445 446 |
# File 'lib/datadog/core/configuration/settings.rb', line 444 def skip_mysql2_check @skip_mysql2_check end |
#timeline_enabled ⇒ Object
Controls data collection for the timeline feature.
If you needed to disable this, please tell us why on https://github.com/DataDog/dd-trace-rb/issues/new, so we can fix it!
471 472 473 |
# File 'lib/datadog/core/configuration/settings.rb', line 471 def timeline_enabled @timeline_enabled end |
#upload_period_seconds ⇒ Object
Controls how often the profiler reports data, in seconds. Cannot be lower than 60 seconds.
We do not recommend tweaking this value.
529 530 531 |
# File 'lib/datadog/core/configuration/settings.rb', line 529 def upload_period_seconds @upload_period_seconds end |
Instance Method Details
#endpoint ⇒ Datadog::Core::Configuration::Settings::DSL::Profiling::Advanced::Endpoint
Returns a configuration object.
252 253 254 255 256 257 258 259 260 261 262 263 264 265 |
# File 'lib/datadog/core/configuration/settings.rb', line 252 settings :endpoint do settings :collection do # When using profiling together with tracing, this controls if endpoint names # are gathered and reported together with profiles. # # @default `DD_PROFILING_ENDPOINT_COLLECTION_ENABLED` environment variable, otherwise `true` # @return [Boolean] option :enabled do |o| o.env Profiling::Ext::ENV_ENDPOINT_COLLECTION_ENABLED o.default true o.type :bool end end end |