Module: OpenTelemetry::Instrumentation::ActiveRecord::Patches::PersistenceInsertClassMethods::ClassMethods

Defined in:
lib/opentelemetry/instrumentation/active_record/patches/persistence_insert_class_methods.rb

Overview

Contains ActiveRecord::Persistence::ClassMethods to be patched

Instance Method Summary collapse

Instance Method Details

#insert(attributes, returning: nil, unique_by: nil) ⇒ Object



22
23
24
25
26
# 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) ⇒ Object



34
35
36
37
38
# 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) ⇒ Object



28
29
30
31
32
# 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) ⇒ Object



40
41
42
43
44
# 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) ⇒ Object



46
47
48
49
50
# 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) ⇒ Object



52
53
54
55
56
# 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