主权项 |
1. A method of instrumenting scripts of webpages, comprising:
intercepting, by an agent, a webpage served by an origin server to a client responsive to receiving a request for the webpage from the client, the webpage comprising one or more scripts; inserting, by the agent, an instrumentation script within a portion of the webpage prior to execution of the one or more scripts, the instrumentation script configured to embed instrumentation code within the one or more scripts to report on execution of one or more scripts; executing, upon the client loading the webpage received from the agent, the instrumentation script on the client; embedding by the instrumentation script, instrumentation code within the one or more scripts; and storing, by the one or more scripts via execution of the embedded instrumentation code, data to one of a log file or a server to report on execution of the one or more scripts of the webpage. |