Skip to content

Manage agents

Users with the Manager role can administer agents as follows:

Agent properties

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:

<install_dir>/agent/agent.config

You can set these properties from the:

Agent.config file

To manually set the properties, navigate to the config file on the relevant server:

<install_dir>/agent/agent.config

The following table describes the properties that you can customize:

Parameter name Explanation
max_dynamic_log_rate Number of log prints per second
max_dynamic_log_bytes_rate Number of bytes per second (on
log_stats_time_micros How often to log debugger
max_condition_cost Maximum cost in percentage of CPU
max_log_cpu_cost Maximum cost of dynamic logging
max_snapshot_buffer_size The total size in bytes we allow
max_snapshot_frame_count Max frame count we allow to
breakpoint_expiration_sec Breakpoint \ Dynamic log
dynamic_log_quota_recovery_ms Time to pause dynamic log after
no_check_certificate Disable certificate pinning when
ignore_quota Disable all performance safe
exceptions_monitoring_enabled Enable the capturing of the
exceptions_monitoring_stdout Print all of the captured
exceptions_report_percentage Process and report only this percentage of the exceptions thrown by the debuggee (A float between 0 and 1.0).
exceptions_should_report_caught Report exceptions that were caught by the application as well as exceptions that remained uncaught
exceptions_max_buffer_size The total size in bytes we allow to evaluate when capturing an exception (Same as snapshot)
exceptions_stack_trace_frame_count Max frame count we allow to collect data from when capturing an exception (Same as snapshot)
exit_after_report_all Agent empties queues before the application exits.
enable_pii_redaction Enable personally identifiable information (PII) redaction in the agent's side (may have an effect on the application's performance)

Command line arguments

Agent configurations can be changed with a command line argument.

The command line arguments should be inserted after the path of the agent and they should be separated by a comma.

Synopsis

-agentpath:<path-to-agent>/lightrun_agent.so=--<parameter>=<value>,--<parameter>=<value>...

Agent parameters

Following are the parameters that can be configured from the terminal.

Parameter name Explanation Type
hub_retry_delay_ms amount of time in milliseconds to sleep before retrying failed requests to Management server int32
debuggee_disabled_delay_ms amount of time in milliseconds to sleep before checking whether the debugger was enabled back int32
lightrun_extra_class_path additional directories and files containing resolvable binaries string
lightrun_init_wait_time_ms timeout for wait iflightrun_wait_for_init is set int32
lightrun_wait_for_init ck application until first time of fetching breakpoints from the server bool
enable_safe_caller allows any method without side effects in expressions bool
extra_blocked_methods additional methods to block for testing purposes string
extra_allowed_methods additional methods allowed for testing purposes string
extra_whitelisted_classes internal names of additional classes to allow for testing purposes string
expression_max_classes_load_quota maximum number of classes that the Nano Java interpreter is allowed to load while evaluating a single breakpoint expression int32
expression_max_interpreter_instructions_quota maximum number of instructions that the Nano Java interpreter is allowed to execute while evaluating a single breakpoint expression int32
pretty_printers_max_classes_load_quota maximum number of classes that the Nano Java interpreter is allowed to load while formatting some well known data structures int32
pretty_printers_max_interpreter_instructions_quota maximum number of instructions that the Nano Java interpreter is allowed to execute while formatting some well-known data structures int32
dynamic_log_max_classes_load_quota maximum number of classes that the Nano Java interpreter is allowed to load while evaluating all expressions in a single dynamic log statement int32
dynamic_log_max_interpreter_instructions_quota maximum number of instructions that the Nano Java interpreter is allowed to execute while evaluating all expressions in a single dynamic log int32
safe_caller_max_array_elements 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
safe_caller_max_interpreter_stack_depth maximum stack depth that safe caller will allow int32
cdbg_description_suffix additional text to be appended to debug description string
cdbg_class_files_cache_size cache size for class files used in safe method caller int32
cdbg_max_instructions_high use this value when ignoring quota int32
cdbg_max_stack_depth maximum number of stack frames to unwind int32

Example

-agentpath:<pathtoagent>/lightrun_agent.so=--enable_safe_caller,--lightrun_init_wait_time_ms=999

View active agents

Whenever an agent is running, you can view its details directly from the browser.

Log in to your Lightrun account and navigate to Entities->Agents.

The Agents screen loads, and appears similar to the following:

Agent view

The following table describes the data:

Column Description
Id The unique agent ID
Host The host name of the server on which the agent is running
ApiVersion The Lightrun API version currently implemented
Pid The unique process identifier
StartTime The time at which the agent was started
UpdateTime The last time the agent fetched actions from the server
PipeLogs The current configuration for log piping
Labels Tags attached to this agent

Last update: April 7, 2021