Sha256: 827298fa5a3b18912b773e175b37882d4792235ab811f31fb5e5e914d34114b3
Contents?: true
Size: 726 Bytes
Versions: 59
Compression:
Stored size: 726 Bytes
Contents
module Appsignal class EventFormatter module ElasticSearch class SearchFormatter < Appsignal::EventFormatter register 'search.elasticsearch' def format(payload) [ "#{payload[:name]}: #{payload[:klass]}", sanitized_search(payload[:search]).inspect ] end def sanitized_search(search) return nil unless search.is_a?(Hash) {}.tap do |hsh| search.each do |key, val| if [:index, :type].include?(key) hsh[key] = val else hsh[key] = Appsignal::Utils.sanitize(val) end end end end end end end end
Version data entries
59 entries across 59 versions & 1 rubygems