Class: Appsignal::EventFormatter::Sequel::SqlFormatter

Inherits:
Appsignal::EventFormatter show all
Defined in:
lib/appsignal/event_formatter/sequel/sql_formatter.rb

Overview

Compatibility with the sequel-rails gem. The sequel-rails gem adds its own ActiveSupport::Notifications events that conflict with our own sequel instrumentor. Without this event formatter the sequel-rails events are recorded without the SQL query that's being executed.

Constant Summary

Constants inherited from Appsignal::EventFormatter

DEFAULT, Appsignal::EventFormatter::SQL_BODY_FORMAT

Instance Method Summary collapse

Methods inherited from Appsignal::EventFormatter

register, registered?, unregister

Instance Method Details

#format(payload) ⇒ Object



18
19
20
# File 'lib/appsignal/event_formatter/sequel/sql_formatter.rb', line 18

def format(payload)
  [payload[:name].to_s, payload[:sql], SQL_BODY_FORMAT]
end

#opentelemetry_kindObject

A query is an outgoing call to a datastore.



14
15
16
# File 'lib/appsignal/event_formatter/sequel/sql_formatter.rb', line 14

def opentelemetry_kind
  :client
end