Sha256: 867d2bd04d18cd997b3c6e61af3327a76539a4cfba785229de2cc756d2c30793

Contents?: true

Size: 700 Bytes

Versions: 8

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::Logger.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

8 entries across 8 versions & 1 rubygems

Version Path
ddtrace-0.34.2 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.34.1 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.34.0 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.33.1 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.33.0 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.32.0 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.31.1 lib/ddtrace/ext/forced_tracing.rb
ddtrace-0.31.0 lib/ddtrace/ext/forced_tracing.rb