# File lib/new_relic/agent/attribute_filter.rb, line 77
      def initialize(config)
        @enabled_destinations = DST_NONE

        @enabled_destinations |= DST_TRANSACTION_TRACER if config['transaction_tracer.attributes.enabled''transaction_tracer.attributes.enabled']
        @enabled_destinations |= DST_TRANSACTION_EVENTS if config['transaction_events.attributes.enabled''transaction_events.attributes.enabled']
        @enabled_destinations |= DST_ERROR_COLLECTOR    if config['error_collector.attributes.enabled''error_collector.attributes.enabled']
        @enabled_destinations |= DST_BROWSER_MONITORING if config['browser_monitoring.attributes.enabled''browser_monitoring.attributes.enabled']

        @enabled_destinations = DST_NONE unless config['attributes.enabled''attributes.enabled']

        @rules = []

        build_rule(config['attributes.exclude''attributes.exclude'], DST_ALL, false)
        build_rule(config['transaction_tracer.attributes.exclude''transaction_tracer.attributes.exclude'], DST_TRANSACTION_TRACER, false)
        build_rule(config['transaction_events.attributes.exclude''transaction_events.attributes.exclude'], DST_TRANSACTION_EVENTS, false)
        build_rule(config['error_collector.attributes.exclude''error_collector.attributes.exclude'],    DST_ERROR_COLLECTOR,    false)
        build_rule(config['browser_monitoring.attributes.exclude''browser_monitoring.attributes.exclude'], DST_BROWSER_MONITORING, false)

        build_rule(['request.parameters.*'], include_destinations_for_capture_params(config[:capture_params]), true)
        build_rule(['job.resque.args.*'],    include_destinations_for_capture_params(config['resque.capture_params''resque.capture_params']), true)
        build_rule(['job.sidekiq.args.*'],   include_destinations_for_capture_params(config['sidekiq.capture_params''sidekiq.capture_params']), true)

        build_rule(config['attributes.include''attributes.include'], DST_ALL, true)
        build_rule(config['transaction_tracer.attributes.include''transaction_tracer.attributes.include'], DST_TRANSACTION_TRACER, true)
        build_rule(config['transaction_events.attributes.include''transaction_events.attributes.include'], DST_TRANSACTION_EVENTS, true)
        build_rule(config['error_collector.attributes.include''error_collector.attributes.include'],    DST_ERROR_COLLECTOR,    true)
        build_rule(config['browser_monitoring.attributes.include''browser_monitoring.attributes.include'], DST_BROWSER_MONITORING, true)
        # This agent attribute has unexpected behaviors and we need to ensure it only goes where directed in configuration
        build_rule(['request_uri'], DST_TRANSACTION_TRACER | DST_ERROR_COLLECTOR, false)

        @rules.sort!

        # We're ok to cache high security for fast lookup because the attribute
        # filter is re-generated on any significant config change.
        @high_security = config[:high_security]

        cache_prefix_blacklist
      end