otel-cli
$ otel-cli Official Low Riskotel-cli (equinix-labs/otel-cli) is a Go CLI for sending OpenTelemetry traces and spans from shell scripts and CI/CD pipelines. Provides otel-cli span, otel-cli exec (wrapping subprocesses with W3C TRACEPARENT propagation), otel-cli status, and otel-cli server for local OTLP trace inspection.
brew install otel-cli otel-cli wraps local shell subprocesses (otel-cli exec) and propagates TRACEPARENT across child processes in CI/CD scripts.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Non-interactive Go binary following standard OTEL_EXPORTER_OTLP_* env vars and --tp-print context propagation, though focused on emitting traces rather than JSON queries.
- Non-interactive
spanandexecsubcommands with standard OTel env vars --tp-printoutputsTRACEPARENTcleanly for shell chaining
Low-risk stateless exporter; only emits telemetry spans to the configured OTLP collector without modifying workspace files or storing credentials.
- Stateless operation via
OTEL_EXPORTER_OTLP_*env vars
Single static Go binary available via Homebrew, go install, and GitHub Releases on macOS, Linux, and Windows.
- Installable via
brew install otel-cliand static release binaries
Solves shell and CI pipeline tracing cleanly with exec and W3C TRACEPARENT propagation, though it focuses on traces/spans rather than OTLP metrics.
- Wraps arbitrary shell commands in OpenTelemetry spans via
otel-cli exec
Maintained by Equinix Labs (equinix-labs/otel-cli) under Apache-2.0 license.
- Apache-2.0 open-source repository by Equinix Labs
Documented on ReadTheDocs and GitHub README with clear span, exec, and TRACEPARENT examples.
- Docs at
open-telemetry-cli.readthedocs.io
Security, Auth & Guardrails
Stateless CLI; reads standard OpenTelemetry env vars (OTEL_EXPORTER_OTLP_ENDPOINT, OTEL_EXPORTER_OTLP_HEADERS) for collector auth without storing local credentials.
Apache-2.0 open-source CLI; free to use with any OTLP collector or observability backend.
# otel-cli Agent Rules - Configure `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS` via env vars instead of hardcoding tokens. - Check `otel-cli status` before instrumenting long CI scripts. - Avoid `otel-cli server tui` inside non-interactive agent shells as it starts a blocking terminal UI.
Agent-Ready Command Recipes
Safe Read-Only Queries
otel-cli status
Prints resolved OpenTelemetry exporter configuration and checks collector connectivity.
Controlled Writes & Previews
otel-cli exec --service ci-runner --name "unit-tests" --attrs "branch=main" -- npm test
Executes npm test inside a timed OpenTelemetry span and exports it to the configured OTLP endpoint.
Strengths for Agents
- + Zero-dependency static Go binary adhering to standard
OTEL_EXPORTER_OTLP_*andTRACEPARENTconventions. - +
otel-cli execinstruments arbitrary shell and CI commands with minimal boilerplate.
Caveats & Pitfalls
- ! Focuses on OpenTelemetry traces and spans (
span,exec,server), not native OTLP metric counters. - !
otel-cli server tuiis an interactive terminal UI unsuitable for headless shells.