You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/drift/configuration.md
+45-2Lines changed: 45 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,14 +2,57 @@
2
2
3
3
This document lists all configuration options, defaults, environment overrides, and guidance. See [`docs/architecture.md`](architecture.md) for the end‑to‑end flow.
4
4
5
-
Where the CLI reads config from:
5
+
Where the CLI reads config from (highest precedence first):
6
6
7
7
1. CLI flags (e.g., `--concurrency`, `--results-dir`, `--enable-service-logs`). See `--help` for each command for more details.
8
8
2. Environment variables (prefix `TUSK_`)
9
-
3. Config file (auto-discovered): `.tusk/config.yaml`, `.tusk/config.yml`, `tusk.yaml`, `tusk.yml`, or `~/.tusk/config.yaml`
9
+
3. Config override file via `--config-override` flag or `TUSK_CONFIG_OVERRIDE` env var (flag takes precedence)
10
+
4. Base config file (auto-discovered): `.tusk/config.yaml`, `.tusk/config.yml`, `tusk.yaml`, `tusk.yml`, or `~/.tusk/config.yaml`
10
11
11
12
**✨ Run `tusk drift setup` in your service root directory to start an agent automatically create a config file based on your service.**
12
13
14
+
## Config Overrides
15
+
16
+
You can provide a config override file that is merged on top of the base config. Only the fields you specify in the override file are changed; everything else is preserved from the base config.
17
+
18
+
This is useful for local-only settings like disabling span export or changing the sampling mode without modifying the shared config file.
19
+
20
+
**Using the `--config-override` flag:**
21
+
```bash
22
+
tusk drift run --config-override .tusk/local-config.yaml
23
+
tusk drift list --config-override .tusk/local-config.yaml
24
+
```
25
+
26
+
**Using the `TUSK_CONFIG_OVERRIDE` env var:**
27
+
```bash
28
+
TUSK_CONFIG_OVERRIDE=.tusk/local-config.yaml tusk drift run
29
+
```
30
+
31
+
The `--config-override` flag takes precedence over the `TUSK_CONFIG_OVERRIDE` env var. Both are overridden by individual env vars (e.g., `TUSK_RECORDING_SAMPLING_MODE`).
32
+
33
+
Example override file:
34
+
35
+
```yaml
36
+
recording:
37
+
sampling:
38
+
mode: fixed
39
+
base_rate: 1.0
40
+
export_spans: false
41
+
enable_env_var_recording: false
42
+
```
43
+
44
+
### Recording Environment Variable Overrides
45
+
46
+
These env vars override the corresponding config keys regardless of what's in the config files:
0 commit comments