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