# C++ Agent Parameter Reference Table

## SeaLights C++ Agent – Configuration Parameters Reference

A concise lookup table for every configuration parameter and the ways you can provide it.

<details>

<summary>Table Legend</summary>

**Column Definitions**

* **Timing** - At which phase in the workflow can the parameter be configured
* **Usage Mode** - In which agent usage mode the parameter can be used

**Timing Values**

* **🔧 Config** - Typically set during `SL.Agent.Cpp config` command
* **🔧⚡ Either** - Can be set during config or runtime (commonly deferred for deployment flexibility)

**Usage Mode Values**

* **Coverage Listener Mode (AUT)** - Used when instrumenting applications to collect coverage data
* **Test Runner Mode** - Used when instrumenting test frameworks to collect test execution details
* **Both** - Used in either operating mode

</details>

<table><thead><tr><th>Parameter</th><th width="94">Timing</th><th width="119.5">Usage Mode</th><th width="99.453125">Config File key</th><th width="110.65234375">CLI Flags</th><th width="128">Environment Variables</th><th width="196.5">Description</th><th>Default</th></tr></thead><tbody><tr><td>Authentication token</td><td>🔧⚡ Either</td><td>Both</td><td>—</td><td><code>--token</code> | <code>--tokenFile</code> </td><td><code>SL_TOKEN</code> | <code>SL_TOKENFILE</code></td><td>Raw token or path to token file (required)</td><td>—</td></tr><tr><td>Build session ID</td><td>🔧 Config</td><td>Both</td><td>—</td><td><code>--buildSessionId</code> | <code>--buildSessionIdFile</code></td><td><code>SL_BUILDSESSIONID</code>| <code>SL_BUILDSESSIONFILE</code></td><td>Build-session identifier</td><td>—</td></tr><tr><td>Application name</td><td>🔧 Config</td><td>Coverage Listener Mode (AUT)</td><td><code>appName</code></td><td><code>--appName</code></td><td><code>SL_APPNAME</code></td><td>Display name in Sealights</td><td>—</td></tr><tr><td>Build name</td><td>🔧 Config</td><td>Coverage Listener Mode (AUT)</td><td><code>buildName</code></td><td><code>--buildName</code> </td><td><code>SL_BUILDNAME</code></td><td>Build identifier (auto-generated if omitted)</td><td>—</td></tr><tr><td>Branch name</td><td>🔧 Config</td><td>Coverage Listener Mode (AUT)</td><td><code>branchName</code></td><td><code>--branchName</code></td><td><code>SL_BRANCHNAME</code></td><td>Git branch for build</td><td>Unspecified</td></tr><tr><td>Proxy URL</td><td>🔧⚡ Either</td><td>Both</td><td><code>proxyUrl</code></td><td><code>--proxy-url</code> | <code>--proxy</code></td><td><code>SEALIGHTS_PROXY_URL</code></td><td>HTTP/HTTPS proxy</td><td>—</td></tr><tr><td>Collector URL</td><td>🔧⚡ Either</td><td>Both</td><td><code>collectorUrl</code></td><td><code>--collector-url</code> | <code>--collector</code> | <code>-c</code></td><td><code>SEALIGHTS_COLLECTOR_URL</code></td><td>Override backend collector</td><td>—</td></tr><tr><td>Packages included</td><td>🔧 Config</td><td>Coverage Listener Mode (AUT)</td><td><code>include</code></td><td><code>--include</code></td><td><code>SL_INCLUDE</code></td><td>Globs of C++ packages to instrument</td><td>—</td></tr><tr><td>Packages excluded</td><td>🔧 Config</td><td>Coverage Listener Mode (AUT)</td><td><code>exclude</code></td><td><code>--exclude</code></td><td><code>SL_EXCLUDE</code></td><td>Packages to skip</td><td>—</td></tr><tr><td>Logging enabled</td><td>🔧⚡ Either</td><td>Both</td><td><code>loggingEnables</code></td><td><code>--loggingEnabled</code></td><td><code>SL_LOGGING_ENABLED</code></td><td>Boolean</td><td><code>false</code></td></tr><tr><td>Log level</td><td>🔧⚡ Either</td><td>Both</td><td><code>logLevel</code></td><td><code>--logLevel</code></td><td><code>SL_LOGLEVEL</code></td><td><code>silent</code> | <code>debug</code> | <code>info</code> | <code>warn</code> | <code>error</code></td><td><code>info</code></td></tr><tr><td>Log directory</td><td>🔧⚡ Either</td><td>Both</td><td><code>logDir</code></td><td><code>--logDir</code></td><td><code>SL_LogDir</code></td><td>Folder where the logs will be saved</td><td></td></tr><tr><td>Lab ID</td><td>🔧⚡ Either</td><td>Both</td><td><code>labId</code></td><td><code>--labId</code></td><td><code>SL_LABID</code></td><td>Group related executions</td><td></td></tr><tr><td>Test stage</td><td>🔧⚡ Either</td><td>Both</td><td><code>testStage</code></td><td><code>--test-stage</code></td><td><code>SL_TEST_STAGE</code></td><td>Stage name shown in UI</td><td></td></tr><tr><td>Test Listener Session ID</td><td>🔧⚡ Either</td><td>Both</td><td><code>testListenerSessionKey</code></td><td><code>--testListenerSessionKey</code></td><td></td><td></td><td></td></tr><tr><td>Agent address</td><td></td><td></td><td><code>agentAddress</code></td><td><code>--agentAddress</code></td><td><code>SL_AGENT_ADDRESS</code></td><td>If the AUT and the Test Runner are on different machines, enter the IP of the Test Runner machine    </td><td></td></tr><tr><td>Agent port</td><td></td><td></td><td><code>agentPort</code></td><td><code>--agentPort</code></td><td><code>SL_AGENT_PORT</code></td><td>Port of the Test Runner machine</td><td></td></tr><tr><td>Bin directory</td><td>🔧 Config</td><td>Coverage Listener Mode (AUT)</td><td><code>binDir</code></td><td><code>--binDir</code></td><td><code>SL_BINDIR</code></td><td>Path to the source folder</td><td></td></tr></tbody></table>

{% hint style="info" %}
*A blank “Config File key” means that particular parameter cannot be set inside `settings.json`; use flags or env vars instead.*
{% endhint %}

### Parameters That Can Be Deferred to Runtime

In the above table, the parameters with a "Timing" value of "Either" do not need to be set during `SL.Agent.Cpp config` command; they can be set later at runtime using environment variables.

1. These parameters are optional during the config phase
2. They can be set during config if desired, but it's not required
3. They have the flexibility to be set at runtime via environment variables instead
