module OpenTelemetry::Instrumentation::ActiveRecord::Patches::PersistenceInsertClassMethods::ClassMethods

Contains ActiveRecord::Persistence::ClassMethods to be patched

Public Instance Methods

insert(attributes, returning: nil, unique_by: nil) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence_insert_class_methods.rb, line 22
def insert(attributes, returning: nil, unique_by: nil)
  tracer.in_span("#{self}.insert") do
    super
  end
end
insert!(attributes, returning: nil) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence_insert_class_methods.rb, line 34
def insert!(attributes, returning: nil)
  tracer.in_span("#{self}.insert!") do
    super
  end
end
insert_all(attributes, returning: nil, unique_by: nil) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence_insert_class_methods.rb, line 28
def insert_all(attributes, returning: nil, unique_by: nil)
  tracer.in_span("#{self}.insert_all") do
    super
  end
end
insert_all!(attributes, returning: nil) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence_insert_class_methods.rb, line 40
def insert_all!(attributes, returning: nil)
  tracer.in_span("#{self}.insert_all!") do
    super
  end
end
upsert(attributes, returning: nil, unique_by: nil) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence_insert_class_methods.rb, line 46
def upsert(attributes, returning: nil, unique_by: nil)
  tracer.in_span("#{self}.upsert") do
    super
  end
end
upsert_all(attributes, returning: nil, unique_by: nil) click to toggle source
Calls superclass method
# File lib/opentelemetry/instrumentation/active_record/patches/persistence_insert_class_methods.rb, line 52
def upsert_all(attributes, returning: nil, unique_by: nil)
  tracer.in_span("#{self}.upsert_all") do
    super
  end
end

Private Instance Methods

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