Setting up the agent¶
To enable developers to insert instrumentation on the fly, you need to download and attach the agent to a running application.
Set up the agent¶
From the server where your application is running, log in to Lightrun from the browser.
Navigate to Getting started=>Install the agent.
From the Install the Agent section, select the tab for the operating system that your application server has installed.
Copy and run the script. The script on this page already includes your
portvalues, similar to this:
Once you've downloaded the agent, optionally customize the agent configurations.
You can customize agent configurations any time you want. Check out the content of the file
agent/agent.config. To apply any changes, restart the agent as described in the next step.
Now, add the application to your application as follows:
From the application server, open the terminal and navigate to the folder where your application resides.
From the browser, copy the command, replace
RestofArgumentsHerewith the name of your application and any other relevant options, and follow the instructions to run it; similar to this GIF:
!!! tip Optionally, add the
JAVA_OPTSenvironment variable to the server so that all Java processes launched on that server have an agent attached. Copy the following command from the server and replace the
agentpathvalue with the path to the Lightrun agent where you downloaded it:
Install the CLI and validate that the agent registered correctly by running
lightrunc list-agents. Assuming the agent is running, something similar to the following should print in the terminal:
0 : ID 5c84e29871f7a700010ca737UPDATE Sun, 10 Mar 2019 10:10:32 GMT