Sha256: 25c8175c1658deac9a73cd382a7a74e6d691a5c443b1b9395fc80cf98c2805b5

Contents?: true

Size: 700 Bytes

Versions: 12

Compression:

Stored size: 700 Bytes

Contents

require 'ddtrace/ext/manual_tracing'
require 'ddtrace/tracer'

module Datadog
  module Ext
    # Defines constants for forced tracing
    module ForcedTracing
      @deprecation_warning_shown = false

      def self.const_missing(name)
        super unless Ext::ManualTracing.const_defined?(name)

        # Only log each deprecation warning once (safeguard against log spam)
        unless @deprecation_warning_shown
          Datadog::Tracer.log.warn(
            'forced tracing: Datadog::Ext::ForcedTracing has been renamed to Datadog::Ext::ManualTracing'
          )
          @deprecation_warning_shown = true
        end

        Ext::ManualTracing.const_get(name)
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
ls-trace-0.1.2 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.30.1 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.30.0 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.29.1 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.26.1 lib/ddtrace/ext/forced_tracing.rb
ls-trace-0.1.1 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.29.0 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.28.0 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.27.0 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.26.0 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.25.1 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.25.0 lib/ddtrace/ext/forced_tracing.rb