1. A computer-implemented method comprising: (1) identifying, by instrumented bytecode, a transaction executed by a plurality of threads on at least one host system connected by a computer network, where a portion of the transaction is executed by a given thread in the plurality of threads and the instrumented bytecode is executed by the given thread; (2) collecting, by the instrumented bytecode, performance metrics regarding the transaction during execution of the transaction; (3) identifying, by the instrumented bytecode, when execution of the portion of the transaction by the given thread has started; (4) sampling the given thread in response to the identification that the execution of the portion of the transaction in the given thread has started, where the given thread is sampled by cyclically fetching stack data from a call stack for the given thread and associating the stack data with the given thread, wherein the stack data defines nesting relationships of methods associated with the transaction; (5) identifying, by the instrumented bytecode, when the execution of the portion of the transaction in the given thread has ended; (6) stopping sampling of the given thread in response to the identification that the execution of the portion of the transaction by the given thread has ended (7) associating the stack data for the given thread and the collected performance metrics with the identified transaction.