Agent Configuration Parameters
The Go Agent supports various configuration parameters that control its behavior in different usage modes. This page summarizes the different approaches you can use to apply configuration parameters and adds context to the detailed parameter reference table, found: Go Agent Parameter Reference Table
Usage Mode-Specific Parameters
The Go Agent operates in two distinct usage modes, and many configuration parameters apply only to specific modes:
Coverage Listener Mode - Parameters used when instrumenting applications to collect coverage data.
Test Runner Mode - Parameters used when instrumenting test frameworks to collect test execution details
Both modes - Parameters used in either agent operating mode.
The Go Agent Parameter Reference Table table indicates which usage mode each parameter applies to, helping you focus on the relevant settings for your specific implementation.
Ways to Configure Agent Parameters
The Go Agent supports three different ways to set configuration parameters:
Environment Variables - Set via shell environment (e.g.,
SEALIGHTS_TOKEN=your-token
)CLI Flags - Provided as command-line arguments (e.g.,
--token=your-token
)Configuration File - Specified in a YAML file (default:
.slconfig.yaml
)
Not all parameters can be set using all three methods. The reference table shows exactly which methods are available for each parameter, with empty cells indicating that method is not supported for that parameter.
When Using a Configuration File
The agent automatically loads configuration from .slconfig.yaml
if this file exists in the directory where you run agent commands. To use a different configuration file name, specify it with the --config
flag as part of the slgoagent config
command:
./slgoagent config --config=custom-config.yaml --token="./token-file.txt"
Parameter Precedence
When the same parameter is set using multiple methods, the following precedence order applies (highest to lowest priority):
Environment Variables (highest priority)
CLI Flags (medium priority)
Configuration File (lowest priority)
Default Values (used only when parameter is not set by any other method)
Default Values
Many parameters have built-in default values that are used when the parameter is not explicitly configured. If a default value exists for a parameter, it will be shown in the reference table.
Last updated
Was this helpful?