Module: Datadog::Analytics::Span::InstanceMethodsCompatibility

Defined in:
lib/ddtrace/analytics.rb

Overview

Compatibility shim for Rubies not supporting .prepend

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(base) ⇒ Object



29
30
31
32
33
34
35
# File 'lib/ddtrace/analytics.rb', line 29

def self.included(base)
  base.class_eval do
    alias_method :set_tag_without_analytics, :set_tag
    # DEV: When we stack multiple extensions the method might already be removed
    remove_method :set_tag if method_defined?(:set_tag)
  end
end

Instance Method Details

#set_tag(*args, &block) ⇒ Object



37
38
39
# File 'lib/ddtrace/analytics.rb', line 37

def set_tag(*args, &block)
  set_tag_without_analytics(*args, &block)
end