Class: Datadog::Tracing::Configuration::Dynamic::TracingSamplingRate
- Inherits:
-
SimpleOption
- Object
- Option
- SimpleOption
- Datadog::Tracing::Configuration::Dynamic::TracingSamplingRate
- Defined in:
- lib/datadog/tracing/configuration/dynamic.rb
Overview
Dynamic configuration for ‘DD_TRACE_SAMPLE_RATE`.
Instance Attribute Summary
Attributes inherited from Option
Instance Method Summary collapse
-
#call(tracing_sampling_rate) ⇒ Object
Ensures sampler is rebuilt and new configuration is applied.
-
#initialize ⇒ TracingSamplingRate
constructor
A new instance of TracingSamplingRate.
Constructor Details
#initialize ⇒ TracingSamplingRate
Returns a new instance of TracingSamplingRate.
39 40 41 |
# File 'lib/datadog/tracing/configuration/dynamic.rb', line 39 def initialize super('tracing_sampling_rate', 'DD_TRACE_SAMPLE_RATE', :default_rate) end |
Instance Method Details
#call(tracing_sampling_rate) ⇒ Object
Ensures sampler is rebuilt and new configuration is applied
44 45 46 47 |
# File 'lib/datadog/tracing/configuration/dynamic.rb', line 44 def call(tracing_sampling_rate) super Datadog.send(:components).reconfigure_live_sampler end |