Sha256: b5f7dc2b95073631b6b3c60b1811bd1618fcc5840d86a8bcd6ab30f066f557c3
Contents?: true
Size: 748 Bytes
Versions: 27
Compression:
Stored size: 748 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::QueryParamsSanitizer.sanitize(val) end end end end end end end end
Version data entries
27 entries across 27 versions & 1 rubygems