Tracelet

CLI flags

Every command-line option and environment variable otel-test reads.

Global options

These are accepted by every command.

OptionDefaultDescription
-f, --file <FILE>otel-test.yamlTest file to load. init accepts it but ignores it.
--color <WHEN>autoauto, always or never
-h, --helpPrint help
-V, --versionPrint otel-test 0.1.0

test options

OptionDescription
-v, --verboseShow rewrite notes, durations, passed assertions, notes and Collector logs on failure
--filter <TEXT>Run only tests whose name contains TEXT, ignoring case
--collector-bin <PATH>Collector binary to use
--offlineNever download the Collector

validate options

OptionDescription
--collector-bin <PATH>Collector binary to use
--offlineNever download the Collector

init arguments

Argument or optionDescription
[DIR]Target directory, default .
--forceOverwrite existing starter files

Collector options

The Collector binary is resolved in this order:

  1. --collector-bin <PATH>
  2. OTEL_TEST_COLLECTOR_BIN
  3. the cached pinned release, otelcol-contrib v0.164.0
  4. a download of the pinned release, unless --offline is set

With --offline and nothing cached, the command fails with exit code 4 and names the expected cache path.

Environment variables

VariableEffect
OTEL_TEST_COLLECTOR_BINCollector binary to use. --collector-bin takes precedence.
OTEL_TEST_CACHE_DIRCache directory. The default is ~/Library/Caches/otel-test on macOS, $XDG_CACHE_HOME/otel-test on Linux and %LOCALAPPDATA%\otel-test on Windows.
OTEL_TEST_DOWNLOAD_BASE_URLMirror for the Collector release download. Checksums are still enforced.
NO_COLOR, CLICOLOR_FORCEStandard color control, used when --color auto
RUST_LOGInternal diagnostics on stderr, for example RUST_LOG=otel_test_core=debug

The installer script reads OTEL_TEST_VERSION and OTEL_TEST_INSTALL_DIR. See Installation.

${env:…} references in your processors are resolved by the Collector from the environment otel-test runs in.

On this page