Module: Datadog::Tracing::Analytics
- Defined in:
- lib/datadog/tracing/analytics.rb
Overview
Defines analytics behavior
Class Method Summary collapse
Class Method Details
.set_measured(span_op, value = true) ⇒ Object
16 17 18 19 20 21 |
# File 'lib/datadog/tracing/analytics.rb', line 16 def set_measured(span_op, value = true) return if span_op.nil? value = value == true || value == 1 ? 1 : 0 # rubocop:disable Style/MultipleComparison span_op.set_metric(Metadata::Ext::Analytics::TAG_MEASURED, value) end |
.set_sample_rate(span_op, sample_rate) ⇒ Object
10 11 12 13 14 |
# File 'lib/datadog/tracing/analytics.rb', line 10 def set_sample_rate(span_op, sample_rate) return if span_op.nil? || !sample_rate.is_a?(Numeric) span_op.set_metric(Metadata::Ext::Analytics::TAG_SAMPLE_RATE, sample_rate) end |