1. A method comprising: receiving, by a computer system, raw machine data produced by an information technology environment, the raw machine data indicative of activity of one or more components of the information technology environment; wherein the received raw machine data include a plurality of data units, wherein the raw machine data in each data unit of the plurality of data units includes data indicative of an activity, entities that participated in the activity, and a timestamp for the activity; for each data unit of the plurality of data units, by the computer system, identifying a relationship between the entities indicated in the data unit, the relationship indicative of the activity indicated in the data unit, and annotating, by using a data structure corresponding to a graph, the raw machine data in the data unit to incorporate data indicative of the relationship into the raw machine data in the data unit; and providing, to an anomaly detection module, each of the plurality of data units including annotated raw machine data, for detection of a security-oriented anomaly in the information technology environment, wherein the anomaly detection module is in a real-time path or a batch path, and wherein information regarding identified security-oriented anomalies is shared between the real-time path and the batch path.