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; determining the relevancy of each input event according to each dependency function 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; and providing data provenance for a given output event using the input event recording method associated with a best dependency function according to the criterion.