The Application Insight agent approach seems to be overkill for creating HTTP-based services. This is not a trivial exercise. Here are some videos that should help with understanding: Overview of DevTest Solutions Application Insight Features - YouTube You might consider using the Demo Server applications that ship with DevTest to "play around" with the agent. The agent starts automatically when the Demo Server is executed.
At the 80 thousand foot level:
The agent installation occurs on the JVM of the Application Server that is sending or receiving the HTTP requests.
The agent installation and configuration depends on which App Server is being used. The agent is added to the App Server's JVM start-up options.
DevTest Java Agent - DevTest Solutions - 10.2 - CA Technologies Documentation
Java Agent Installation - DevTest Solutions - 10.2 - CA Technologies Documentation
The agent then monitors that various calls that occur on the JVM and report those events to Broker service. The Application Insight panels in the DevTest Portal Application enable turning the agent on and off, capturing data, creating services, etc. In the picture below, the Agent is running in the JVM located on the application server, not DevTest. The agent communicates with the Broker executing on the DevTest server. The DevTest console shown here is the Portal.
The agent does not hi-jack the HTTP calls and re-direct them to the VSE. For playback, SUT needs to change its endpoint to point to the service running on the VSE. Hence, an application endpoint change is inevitable (not so when virtualizing Java, EJB, etc. using the Java Agent).