Tune Agent-level Configurations¶
The agent runs alongside the application on your application servers; this agent dynamically inserts the logs, metrics and snapshots in the code based on the Lightrun actions you run.
ROLE_MANAGER can administer and customize agents as follows:
Only users with
ROLE_MANAGER can perform these actions.
You can configure the agent in order to calibrate its behavior by setting the properties in the agent.config file (per agent).
The configuration file is located at the following path:
You can set these properties from the:
- agent.config file - only some of the properties can be set here
- Configure properties from the terminal - you can flexibly set any of the available properties from the terminal as part of the command when running the agent
Whether you change configurations directly from agent.config or from the terminal, save the changes and restart the agent in order to apply the new configurations.
To manually set the properties, navigate to the config file on the relevant server:
The following table describes the set of properties that you can customize manually from the agent.config file:
| ||Number of log prints per second|
| ||Number of bytes per second (on|
| ||How often to log debugger|
| ||Maximum cost in percentage of CPU|
| ||Maximum cost of dynamic logging|
| ||The total size in bytes we allow|
| ||Max frame count we allow to|
| ||Breakpoint \ Dynamic log|
| ||Time to pause dynamic log after|
| ||Enable certificate pinning when|
| ||Disable all performance safe|
| ||Enable the capturing of the|
| ||Print all of the captured|
| ||Process and report only this percentage of the exceptions thrown by the debuggee (A float between 0 and 1.0).|
| ||Report exceptions that were caught by the application as well as exceptions that remained uncaught|
| ||The total size in bytes we allow to evaluate when capturing an exception (Same as snapshot)|
| ||Max frame count we allow to collect data from when capturing an exception (Same as snapshot)|
| ||Agent empties queues before the application exits.|
| ||Enable personally identifiable information (PII) redaction in the agent's side (may have an effect on the application's performance)|
Command line arguments¶
All agent configurations can be changed with a command line argument as part of the command you use to run the agent with your application.
The command line arguments should be inserted after the path of the agent and they should be separated by a comma.
-agentpath:<path-to-agent>/lightrun_agent.so <AppName> --<parameter>=<value>,--<parameter>=<value>...
java -agentpath:/Users/brucewayne/Downloads/agent/lightrun_agent.so=--lightrun_extra_class_path=<PATH_TO_JAR> PrimeMain
Following are the parameters that can be configured from the terminal.
| ||amount of time in milliseconds to sleep before retrying failed requests to Management server||int32|
| ||amount of time in milliseconds to sleep before checking whether the debugger was enabled back||int32|
| ||additional directories and files containing resolvable binaries||string|
| ||timeout for wait iflightrun_wait_for_init is set||int32|
| ||ck application until first time of fetching breakpoints from the server||bool|
| ||allows any method without side effects in expressions||bool|
| ||additional methods to block for testing purposes||string|
| ||additional methods allowed for testing purposes||string|
| ||internal names of additional classes to allow for testing purposes||string|
| ||maximum number of classes that the Nano Java interpreter is allowed to load while evaluating a single breakpoint expression||int32|
| ||maximum number of instructions that the Nano Java interpreter is allowed to execute while evaluating a single breakpoint expression||int32|
| ||maximum number of classes that the Nano Java interpreter is allowed to load while formatting some well known data structures||int32|
| ||maximum number of instructions that the Nano Java interpreter is allowed to execute while formatting some well-known data structures||int32|
| ||maximum number of classes that the Nano Java interpreter is allowed to load while evaluating all expressions in a single dynamic log statement||int32|
| ||maximum number of instructions that the Nano Java interpreter is allowed to execute while evaluating all expressions in a single dynamic log||int32|
| ||maximum allowed size of the array to copy or allocate in safe caller (copying or allocating larger arrays is considered to be too expensive MISSING||int32|
| ||maximum stack depth that safe caller will allow||int32|
| ||additional text to be appended to debug description||string|
| ||cache size for class files used in safe method caller||int32|
| ||use this value when ignoring quota||int32|
| ||maximum number of stack frames to unwind||int32|
To view agents from the CLI¶
- Install the CLI
java -jar lightrunc.jar list-agents:
See the CLI reference for more information.