|
| 1 | +# Integration of CodeTuner for Cloud |
| 2 | + |
| 3 | +The following instructions describe the integration process for CodeTuner for Cloud with your backend application. |
| 4 | + |
| 5 | + |
| 6 | +## Architecture |
| 7 | +CodeTuner for Cloud is an agent that connects to your working application, |
| 8 | +providing low-overhead runtime instrumentation to track the cost of interactions with the server. |
| 9 | +The agent sends data to the Control Panel, which stores and processes the data. |
| 10 | + |
| 11 | +The Control Panel, a part of CodeTuner, stores data from agents, processes it, and manages the agent's configuration. |
| 12 | +The data is available for analysis in the CodeTuner UI. |
| 13 | + |
| 14 | + |
| 15 | +!!! info |
| 16 | + By default, CodeTuner and the Control Panel are hosted on Product Science servers. |
| 17 | + If your company's security rules do not allow sending data outside of the private network, |
| 18 | + CodeTuner and the Control Panel are available for on-premises distribution. |
| 19 | + Please contact the Product Science Team for more details. |
| 20 | + |
| 21 | + |
| 22 | +## Running Your Application |
| 23 | + |
| 24 | +Run your application as usual. |
| 25 | +The agent will be attached to the already running application. |
| 26 | +Make sure to save the process ID to attach the agent. |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | +## Attach Agent to the app's process |
| 31 | + |
| 32 | +The Product Science Team will provide you with the Control Panel URL and a security token for communication between the agent and the Control Panel. |
| 33 | + |
| 34 | +When attaching the agent, you need to configure three parameters: |
| 35 | + |
| 36 | +1. `PS_CONTROL_PANEL_URL` - - The URL for the Control Panel, provided by Product Science. |
| 37 | + |
| 38 | +2. `PS_AGENT_APPLICATION_API_KEY` - The security token, provided by Product Science. |
| 39 | + |
| 40 | +3. `PS_AGENT_APPLICATION_NAME` - The name of your application. |
| 41 | + |
| 42 | + |
| 43 | +Then, run the JAR file `code-tuner-agent.jar` with the following command: |
| 44 | + |
| 45 | +```bash |
| 46 | +java -jar code-tuner-agent.jar \ |
| 47 | + --pid <PROCESS_ID> \ |
| 48 | + --control-panel-url <PS_CONTROL_PANEL_URL> \ |
| 49 | + --token <PS_AGENT_APPLICATION_API_KEY> \ |
| 50 | + --app-name <PS_AGENT_APPLICATION_NAME> |
| 51 | + |
| 52 | +``` |
| 53 | + |
| 54 | +If you need to analyze several instances, the agent should be attached to all of them. |
| 55 | +The same URL, application name, and token can be used for each instance. |
| 56 | + |
| 57 | + |
| 58 | +## Configuration |
| 59 | + |
| 60 | +All further CodeTuner configuration will be done automatically based on your application's static and dynamic analysis. |
0 commit comments