Sha256: 3f21faa6b5ce46aae79fbbee297450e9a3369d9721df5dfcfd993e1008b5836e
Contents?: true
Size: 760 Bytes
Versions: 11
Compression:
Stored size: 760 Bytes
Contents
# frozen_string_literal: true require_relative '../analytics' module Datadog module Tracing module Contrib # Defines analytics behavior for integrations 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
11 entries across 11 versions & 2 rubygems