# class Object

### Public Instance Methods

filter_context(context) click to toggle source

    # File lib/raven/integrations/sidekiq.rb, line 34
    def filter_context(context)
      case context
      when Array
        context.map { |arg| filter_context(arg) }
      when Hash
        Hash[context.map { |key, value| filter_context_hash(key, value) }]
      else
        context
      end
    end

filter_context_hash(key, value) click to toggle source

    # File lib/raven/integrations/sidekiq.rb, line 45
    def filter_context_hash(key, value)
      # Strip any `_aj` prefixes from keys.
      # These keys come from an internal serialized object from ActiveJob.
      # Internally, there are a subset of keys that ActiveJob references, but
      # these are declared as private, and I don't think it's wise
      # to keep chasing what this list is. But they all use a common prefix, so
      # we want to strip this becuase ActiveJob will complain.
      # e.g.: _aj_globalid -> _globalid
      (key = key[3..-1]) if key [0..3] == "_aj_"
      [key, filter_context(value)]
    end