Module: AppPerfRpm::Instruments::SequelDataset
- 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
#execute_with_trace(sql, options = ::Sequel::OPTS, &block) ⇒ Object
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
# File 'lib/app_perf_rpm/instruments/sequel.rb', line 57
def execute_with_trace(sql, options = ::Sequel::OPTS, &block)
if ::AppPerfRpm::Tracer.tracing?
begin
::AppPerfRpm::Tracer.trace("sequel", opts) do |span|
span.options = parse_opts(sql, options)
execute_without_trace(sql, options, &block)
end
rescue => e
::AppPerfRpm.logger.error e.inspect
raise
end
else
execute_without_trace(sql, options, &block)
end
end
|