@@ -26,12 +26,12 @@ a YAML configuration file.
2626
2727### Settings
2828
29- | Setting | CLI Flag | Environment Variable | Default | Description |
30- | ----------------------| ------------------------------------| ----------------------------------------| ----------------| ------------------------------------------ |
31- | Audit Logs | ` --audit-logs-retention ` | ` CODER_AUDIT_LOGS_RETENTION ` | ` 0 ` (disabled) | How long to retain Audit Log entries |
32- | Connection Logs | ` --connection-logs-retention ` | ` CODER_CONNECTION_LOGS_RETENTION ` | ` 0 ` (disabled) | How long to retain Connection Logs |
33- | API Keys | ` --api-keys-retention ` | ` CODER_API_KEYS_RETENTION ` | ` 7d ` | How long to retain expired API keys |
34- | Workspace Agent Logs | ` --workspace-agent-logs-retention ` | ` CODER_WORKSPACE_AGENT_LOGS_RETENTION ` | ` 7d ` | How long to retain workspace agent logs |
29+ | Setting | CLI Flag | Environment Variable | Default | Description |
30+ | ----------------------| ------------------------------------| ----------------------------------------| ----------------| -----------------------------------------|
31+ | Audit Logs | ` --audit-logs-retention ` | ` CODER_AUDIT_LOGS_RETENTION ` | ` 0 ` (disabled) | How long to retain Audit Log entries |
32+ | Connection Logs | ` --connection-logs-retention ` | ` CODER_CONNECTION_LOGS_RETENTION ` | ` 0 ` (disabled) | How long to retain Connection Logs |
33+ | API Keys | ` --api-keys-retention ` | ` CODER_API_KEYS_RETENTION ` | ` 7d ` | How long to retain expired API keys |
34+ | Workspace Agent Logs | ` --workspace-agent-logs-retention ` | ` CODER_WORKSPACE_AGENT_LOGS_RETENTION ` | ` 7d ` | How long to retain workspace agent logs |
3535
3636### Duration Format
3737
@@ -107,13 +107,14 @@ error message when users attempt to use an expired key.
107107
108108# ## Workspace Agent Logs Behavior
109109
110- Workspace agent logs are retained based on the retention period, but **logs from
111- the latest build of each workspace are always retained** regardless of age. This
112- ensures you can always debug issues with active workspaces.
110+ Workspace agent logs are deleted based on when the agent last connected, not the
111+ age of the logs themselves. **Logs from the latest build of each workspace are
112+ always retained** regardless of when the agent last connected. This ensures you
113+ can always debug issues with active workspaces.
113114
114- Only logs from non-latest workspace builds that are older than the retention
115- period are deleted . Setting `--workspace-agent-logs-retention=7d` keeps all logs
116- from the latest build plus logs from previous builds for up to 7 days .
115+ For non-latest builds, logs are deleted if the agent hasn't connected within the
116+ retention period . Setting `--workspace-agent-logs-retention=7d` deletes logs for
117+ agents that haven't connected in 7 days (excluding those from the latest build) .
117118
118119# # Best Practices
119120
@@ -183,4 +184,4 @@ containing the table name (e.g., `audit_logs`, `connection_logs`, `api_keys`).
183184- [Audit Logs](../security/audit-logs.md) : Learn about Audit Logs and manual
184185 purge procedures.
185186- [Connection Logs](../monitoring/connection-logs.md) : Learn about Connection
186- Logs and monitoring.
187+ Logs and monitoring.
0 commit comments