A non-transitory computer-readable medium having computer-executable instructions that, upon execution of the instructions by a processor of a computer, cause the computer to:
- receive, by a server agent, a session recording probability, where the server agent is injected into a web server that delivers content of an application to a web browser;
- receive, by the web server, a content request for content from the application;
- determine, by the server agent, whether to start session recording of application functionality performed in the web browser using the session recording probability, where the application functionality is executed in response to the content request;
- inject, by the server agent, a browser agent into the content;
- configure, by the server agent, the browser agent to perform session recording in response to a determination to start session recording in the web browser;
- and
- determining the session recording probability by determining a number of sessions recorded in an observation period, determining traffic volume during the observation period, and calculating a session recording rate using the number of sessions recorded in the observation period and the traffic volume during the observation period, where the session recording rate is the session recording probability.