module OpenTelemetry::Instrumentation::ActiveRecord::Patches::Persistence

Module to prepend to ActiveRecord::Base for instrumentation contains the ActiveRecord::Persistence methods to be patched

Public Instance Methods

becomes(klass) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 32
def becomes(klass)
  tracer.in_span("#{self.class}#becomes") do
    super
  end
end
becomes!(klass) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 38
def becomes!(klass)
  tracer.in_span("#{self.class}#becomes!") do
    super
  end
end
decrement(attribute, by = 1) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 86
def decrement(attribute, by = 1)
  tracer.in_span("#{self.class}#decrement") do
    super
  end
end
decrement!(attribute, by = 1, touch: nil) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 92
def decrement!(attribute, by = 1, touch: nil)
  tracer.in_span("#{self.class}#decrement!") do
    super
  end
end
delete() click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 14
def delete
  tracer.in_span("#{self.class}#delete") do
    super
  end
end
destroy() click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 20
def destroy
  tracer.in_span("#{self.class}#destroy") do
    super
  end
end
destroy!() click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 26
def destroy!
  tracer.in_span("#{self.class}#destroy!") do
    super
  end
end
increment(attribute, by = 1) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 74
def increment(attribute, by = 1)
  tracer.in_span("#{self.class}#increment") do
    super
  end
end
increment!(attribute, by = 1, touch: nil) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 80
def increment!(attribute, by = 1, touch: nil)
  tracer.in_span("#{self.class}#increment!") do
    super
  end
end
reload(options = nil) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 110
def reload(options = nil)
  tracer.in_span("#{self.class}#reload") do
    super
  end
end
toggle(attribute) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 98
def toggle(attribute)
  tracer.in_span("#{self.class}#toggle") do
    super
  end
end
toggle!(attribute) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 104
def toggle!(attribute)
  tracer.in_span("#{self.class}#toggle!") do
    super
  end
end
touch(*names, time: nil) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 116
def touch(*names, time: nil)
  tracer.in_span("#{self.class}#touch") do
    super
  end
end
update(attributes) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 50
def update(attributes)
  tracer.in_span("#{self.class}#update") do
    super
  end
end
update!(attributes) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 56
def update!(attributes)
  tracer.in_span("#{self.class}#update!") do
    super
  end
end
update_attribute(name, value) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 44
def update_attribute(name, value)
  tracer.in_span("#{self.class}#update_attribute") do
    super
  end
end
update_column(name, value) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 62
def update_column(name, value)
  tracer.in_span("#{self.class}#update_column") do
    super
  end
end
update_columns(attributes) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 68
def update_columns(attributes)
  tracer.in_span("#{self.class}#update_columns") do
    super
  end
end

Private Instance Methods

tracer() click to toggle source
# File lib/opentelemetry/instrumentation/active_record/patches/persistence.rb, line 124
def tracer
  ActiveRecord::Instrumentation.instance.tracer
end