Module: AppPerfRpm::Instruments::SequelDatabase
- Includes:
- Sequel
- Defined in:
- lib/app_perf_rpm/instruments/sequel.rb
Instance Method Summary
collapse
Methods included from Sequel
#parse_opts, #sanitize_sql
Instance Method Details
#run_with_trace(sql, options = ::Sequel::OPTS) ⇒ Object
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
# File 'lib/app_perf_rpm/instruments/sequel.rb', line 36
def run_with_trace(sql, options = ::Sequel::OPTS)
if ::AppPerfRpm::Tracer.tracing?
begin
::AppPerfRpm::Tracer.trace("sequel") do |span|
span.options = parse_opts(sql, options)
run_without_trace(sql, options)
end
rescue => e
::AppPerfRpm.logger.error e.inspect
raise
end
else
run_without_trace(sql, options)
end
end
|