1. A computer-implemented method for monitoring code execution in an on-demand code execution environment, the on-demand code execution environment comprising at least one virtual machine instance executing an initialized operating system and awaiting requests to execute user-specified code within that operating system, the method comprising: as implemented by one or more computing devices configured with specific computer-executable instructions, determining a task on the on-demand code execution environment to be actively monitored, wherein the task corresponds to a set of user-defined code executable by the virtual machine instance, and wherein the task is determined based at least in part on a frequency of service calls to the task received at the on-demand code execution environment, each service call requesting execution of the task at the on-demand code execution environment; associating an individual execution of the task on the on-demand code execution environment with active monitoring information, wherein the active monitoring information identifies the individual execution of the task; modifying a service call, generated by the individual execution of the task, to include the active monitoring information, wherein the service call invokes at least one of an external service or the on-demand code execution environment; identifying subsequent service calls, received at the on-demand code execution environment, that include the active monitoring information; associating the subsequent service calls that include the active monitoring information with the individual execution of the task; receiving a request to generate a profile from the task; generating a task profile based at least in part on the individual execution of the task and on the subsequent service calls that include the active monitoring information, wherein the task profile indicates a relationship between the individual execution and the subsequent service calls; and transmitting the task profile to a computing device of a requesting user for display to the requesting user.