Module: OpenTelemetry::Instrumentation::ActiveRecord::Patches::PersistenceClassMethods::ClassMethods
- Defined in:
- lib/opentelemetry/instrumentation/active_record/patches/persistence_class_methods.rb
Overview
Contains ActiveRecord::Persistence::ClassMethods to be patched
Instance Method Summary collapse
- #create(attributes = nil, &block) ⇒ Object
- #create!(attributes = nil, &block) ⇒ Object
- #delete(id_or_array) ⇒ Object
- #destroy(id) ⇒ Object
-
#update(id = :all, attributes) ⇒ Object
rubocop:disable Style/OptionalArguments.
Instance Method Details
#create(attributes = nil, &block) ⇒ Object
21 22 23 24 25 |
# File 'lib/opentelemetry/instrumentation/active_record/patches/persistence_class_methods.rb', line 21 def create(attributes = nil, &block) tracer.in_span("#{self}.create") do super end end |
#create!(attributes = nil, &block) ⇒ Object
27 28 29 30 31 |
# File 'lib/opentelemetry/instrumentation/active_record/patches/persistence_class_methods.rb', line 27 def create!(attributes = nil, &block) tracer.in_span("#{self}.create!") do super end end |
#delete(id_or_array) ⇒ Object
45 46 47 48 49 |
# File 'lib/opentelemetry/instrumentation/active_record/patches/persistence_class_methods.rb', line 45 def delete(id_or_array) tracer.in_span("#{self}.delete") do super end end |
#destroy(id) ⇒ Object
39 40 41 42 43 |
# File 'lib/opentelemetry/instrumentation/active_record/patches/persistence_class_methods.rb', line 39 def destroy(id) tracer.in_span("#{self}.destroy") do super end end |
#update(id = :all, attributes) ⇒ Object
rubocop:disable Style/OptionalArguments
33 34 35 36 37 |
# File 'lib/opentelemetry/instrumentation/active_record/patches/persistence_class_methods.rb', line 33 def update(id = :all, attributes) # rubocop:disable Style/OptionalArguments tracer.in_span("#{self}.update") do super end end |