Class: Appsignal::EventFormatter::Rom::SqlFormatter
- Inherits:
-
Appsignal::EventFormatter
- Object
- Appsignal::EventFormatter
- Appsignal::EventFormatter::Rom::SqlFormatter
- Defined in:
- lib/appsignal/event_formatter/rom/sql_formatter.rb
Constant Summary
Constants inherited from Appsignal::EventFormatter
Instance Method Summary collapse
-
#format(payload) ⇒ Object
dry-monitor reports an event under an id rather than a name, so the first value here names the event.
Methods inherited from Appsignal::EventFormatter
register, registered?, unregister
Instance Method Details
#format(payload) ⇒ Object
dry-monitor reports an event under an id rather than a name, so the first value here names the event. Naming it after ROM keeps every ROM query in one group.
The payload also says which database ROM is talking to, as Sequel's database type. That is deliberately not part of the name. It would put an application's queries in a group per database engine, so the same application would report one group in production and another in its tests.
17 18 19 |
# File 'lib/appsignal/event_formatter/rom/sql_formatter.rb', line 17 def format(payload) ["query.rom", payload[:query], SQL_BODY_FORMAT] end |