1. A method for selection of a provenance dependency function in a stream-based data processing infrastructure to optimize backtracing performance in response to a provenance query, the method comprising: determining performance of a set of dependency functions associated with an analysis component for determining relevancy of each input event received by the analysis component, wherein each of the dependency functions provides a different, respective method for determining a respective data provenance of a given output event for the analysis component; determining the relevancy of each input event according to each of the dependency functions and storing a record of relevant events according to a recording method; aggregating relevancy results of the dependency functions and ordering the dependency functions according to a criterion indicating the relevancy of the input events provided by the dependency functions; for the given output event, selecting between the dependency functions to obtain a best dependency function from the set of dependency functions based on the ordering; and providing the respective data provenance for the given output event provided by the best dependency function using an input event recording method associated with the best dependency function according to the criterion.