Added filter method for lifecycle events.