Class: InfluxDB::Metrics::Model
- Defined in:
- lib/influxdb/metrics/model.rb
Constant Summary collapse
- SELECT_DELETE =
/ FROM "(\w+)"/i- INSERT =
/^INSERT INTO "(\w+)"/i- UPDATE =
/^UPDATE "(\w+)"/i
Instance Method Summary collapse
Methods inherited from Event
Instance Method Details
#handle(_name, start, finish, _id, payload) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/influxdb/metrics/model.rb', line 14 def handle(_name, start, finish, _id, payload) metric = info(start, finish, payload) write_point 'sql', metric if metric rescue => e log :debug, "Unable to process sql: #{e.message}" end |
#subscribe_to ⇒ Object
10 11 12 |
# File 'lib/influxdb/metrics/model.rb', line 10 def subscribe_to 'sql.active_record' end |