Sha256: 41633ab1c10996ff33c89b72717a6ac04e4c4debb94413b1f4ff6b1466c760d4
Contents?: true
Size: 749 Bytes
Versions: 2
Compression:
Stored size: 749 Bytes
Contents
require_relative '../analytics' module Datadog module Tracing module Contrib # Defines analytics behavior for integrations # @public_api module Analytics module_function # Checks whether analytics should be enabled. # `flag` is a truthy/falsey value that represents a setting on the integration. def enabled?(flag = nil) (Datadog.configuration.tracing.analytics.enabled && flag != false) || flag == true end def set_sample_rate(span, sample_rate) Tracing::Analytics.set_sample_rate(span, sample_rate) end def set_measured(span, value = true) Tracing::Analytics.set_measured(span, value) end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ddtrace-1.10.1 | lib/datadog/tracing/contrib/analytics.rb |
ddtrace-1.10.0 | lib/datadog/tracing/contrib/analytics.rb |