module Honeycomb::Sequel
Wrap sequel commands in a span
Public Instance Methods
honeycomb_client()
click to toggle source
# File lib/honeycomb/integrations/sequel.rb, line 8 def honeycomb_client @honeycomb_client || Honeycomb.client end
honeycomb_client=(client)
click to toggle source
# File lib/honeycomb/integrations/sequel.rb, line 12 def honeycomb_client=(client) @honeycomb_client = client end
log_connection_yield(sql, conn, args = nil)
click to toggle source
Calls superclass method
# File lib/honeycomb/integrations/sequel.rb, line 16 def log_connection_yield(sql, conn, args = nil) return super if honeycomb_client.nil? honeycomb_client.start_span(name: sql.sub(/\s+.*/, "").upcase) do |span| span.add_field "meta.package", "sequel" span.add_field "meta.package_version", ::Sequel::VERSION span.add_field "type", "db" span.add_field "db.sql", sql super end end