A method implemented by a data processing system for identifying one or more portions of executable logic that are executed in processing one or more data items that each include a given value of a key, wherein a specification specifies the executable logic, wherein the specification is associated with the key and wherein states of the specification are being maintained for respective values of the key by storing, in a data repository or in an in-memory data grid, state data for each value of the key, the state data being indicative of which portion of the executable logic is executable for each state, the method including: accessing the specification, wherein a state of the specification for a particular value of the key specifies one or more portions of the executable logic that are executable in that state; intermittently receiving, over an input device or port, data items of a stream of data, with one or more of the data items each including the given value of the key; and generating a log record for the given value of the key, with the log record specifying the one or more portions of the executable logic that are executed in processing the one or more of the data items that are each associated with the given value of the key, the generating including: for each of the one or more of the data items associated with the given value of the key: identifying, based on the state data, a given state of the specification that is maintained for the given value of the key associated with that data item; processing, by the data processing system, that data item including executing, on that data item, one or more portions of executable logic that are specified in the identified given state of the specification; and generating the log record specifying the execution of those one or more portions of the executable logic for that given value of the key. accessing the specification, wherein a state of the specification for a particular value of the key specifies one or more portions of the executable logic that are executable in that state; intermittently receiving, over an input device or port, data items of a stream of data, with one or more of the data items each including the given value of the key; and generating a log record for the given value of the key, with the log record specifying the one or more portions of the executable logic that are executed in processing the one or more of the data items that are each associated with the given value of the key, the generating including: for each of the one or more of the data items associated with the given value of the key: identifying, based on the state data, a given state of the specification that is maintained for the given value of the key associated with that data item; processing, by the data processing system, that data item including executing, on that data item, one or more portions of executable logic that are specified in the identified given state of the specification; and generating the log record specifying the execution of those one or more portions of the executable logic for that given value of the key. for each of the one or more of the data items associated with the given value of the key: identifying, based on the state data, a given state of the specification that is maintained for the given value of the key associated with that data item; processing, by the data processing system, that data item including executing, on that data item, one or more portions of executable logic that are specified in the identified given state of the specification; and generating the log record specifying the execution of those one or more portions of the executable logic for that given value of the key. identifying, based on the state data, a given state of the specification that is maintained for the given value of the key associated with that data item; processing, by the data processing system, that data item including executing, on that data item, one or more portions of executable logic that are specified in the identified given state of the specification; and generating the log record specifying the execution of those one or more portions of the executable logic for that given value of the key.