Module: Datadog::Tracing::Contrib::Analytics

Defined in:
lib/datadog/tracing/contrib/analytics.rb

Overview

Defines analytics behavior for integrations

Class Method Summary collapse

Class Method Details

.enabled?(flag = nil) ⇒ Object

Checks whether analytics should be enabled. flag is a truthy/falsey value that represents a setting on the integration.



15
16
17
# File 'lib/datadog/tracing/contrib/analytics.rb', line 15

def enabled?(flag = nil)
  (Datadog.configuration.tracing.analytics.enabled && flag != false) || flag == true
end

.set_measured(span, value = true) ⇒ Object



23
24
25
# File 'lib/datadog/tracing/contrib/analytics.rb', line 23

def set_measured(span, value = true)
  Tracing::Analytics.set_measured(span, value)
end

.set_sample_rate(span, sample_rate) ⇒ Object



19
20
21
# File 'lib/datadog/tracing/contrib/analytics.rb', line 19

def set_sample_rate(span, sample_rate)
  Tracing::Analytics.set_sample_rate(span, sample_rate)
end