Module: OpenTelemetry::Instrumentation::ActiveRecord::Patches::Persistence

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

Overview

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

Instance Method Summary collapse

Instance Method Details

#becomes(klass) ⇒ Object



32
33
34
35
36
# 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) ⇒ Object



38
39
40
41
42
# 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) ⇒ Object



86
87
88
89
90
# 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) ⇒ Object



92
93
94
95
96
# 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

#deleteObject



14
15
16
17
18
# File 'lib/opentelemetry/instrumentation/active_record/patches/persistence.rb', line 14

def delete
  tracer.in_span("#{self.class}#delete") do
    super
  end
end

#destroyObject



20
21
22
23
24
# File 'lib/opentelemetry/instrumentation/active_record/patches/persistence.rb', line 20

def destroy
  tracer.in_span("#{self.class}#destroy") do
    super
  end
end

#destroy!Object



26
27
28
29
30
# 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) ⇒ Object



74
75
76
77
78
# 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) ⇒ Object



80
81
82
83
84
# 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) ⇒ Object



110
111
112
113
114
# 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) ⇒ Object



98
99
100
101
102
# 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) ⇒ Object



104
105
106
107
108
# 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) ⇒ Object



116
117
118
119
120
# 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) ⇒ Object



50
51
52
53
54
# 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) ⇒ Object



56
57
58
59
60
# 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) ⇒ Object



44
45
46
47
48
# 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) ⇒ Object



62
63
64
65
66
# 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) ⇒ Object



68
69
70
71
72
# 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