class Raven::Processor::SanitizeData

Constants

CREDIT_CARD_RE
DEFAULT_FIELDS
JSON_STARTS_WITH
QUERY_STRING

Attributes

sanitize_credit_cards[RW]
sanitize_fields[RW]
sanitize_fields_excluded[RW]

Public Class Methods

new(client) click to toggle source
Calls superclass method Raven::Processor::new
# File sentry-raven/lib/raven/processor/sanitizedata.rb, line 14
def initialize(client)
  super
  self.sanitize_fields = client.configuration.sanitize_fields
  self.sanitize_credit_cards = client.configuration.sanitize_credit_cards
  self.sanitize_fields_excluded = client.configuration.sanitize_fields_excluded
end

Public Instance Methods

process(value, key = nil) click to toggle source
# File sentry-raven/lib/raven/processor/sanitizedata.rb, line 21
def process(value, key = nil)
  case value
  when Hash
    sanitize_hash_value(key, value)
  when Array
    sanitize_array_value(key, value)
  when Integer
    matches_regexes?(key, value.to_s) ? INT_MASK : value
  when String
    sanitize_string_value(key, value)
  else
    value
  end
end