add optional masking support for event_filter