otel-cli
otel-cli is a Go-based command-line tool that lets you emit OpenTelemetry traces from shell scripts and similar non-instrumented environments. It supports multiple export protocols, runs in safe non-recording mode by default, and can be configured via CLI args, config files, or environment variables.
Key facts
Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.
| Field | Value |
|---|---|
| Repository | equinix-labs/otel-cli |
| Owner | equinix-labs |
| Primary language | Go |
| License | Apache-2.0 — OSI-approved |
| Stars | 706 |
| Forks | 58 |
| Open issues | 40 |
| Latest release | v0.4.5 (2024-04-01) |
| Last updated | 2026-07-07 |
| Source | https://github.com/equinix-labs/otel-cli |
What otel-cli is
A lightweight OTLP exporter CLI written in Go that wraps span creation, execution, and background span management for shell environments. It supports gRPC and HTTP/protobuf protocols, TLS certificate handling, context propagation via environment variables and W3C traceparent headers, and includes a local TUI server mode for testing and development.
Get the otel-cli source
Clone the repository and explore it locally.
git clone https://github.com/equinix-labs/otel-cli.gitcd otel-cli# follow the project's README for install & configurationNeed it deployed, integrated, or customized instead? DEV.co ships production installs.
Best use cases
Implementation considerations
- Deploy a local OpenTelemetry collector alongside otel-cli to buffer spans and reduce connection overhead per invocation.
- Use non-recording mode by default (no endpoint configured) to safely add otel-cli to existing scripts before enabling tracing.
- Leverage traceparent context variables and {{traceparent}} substitution to build parent-child span relationships across command chains.
- Configure timeouts and blocking behavior to prevent slow OTLP exports from blocking critical shell operations.
- Ensure TLS certificates and credentials are securely managed via environment variables or config files, not command-line arguments.
When to avoid it — and what to weigh
- High-Volume, Low-Latency Tracing — Spawning a process per span incurs overhead unsuitable for microsecond-level latency requirements or tens of thousands of spans per second.
- Embedded or Resource-Constrained Environments — Requires Go runtime and network connectivity to OTLP endpoints; not suitable for embedded systems or offline-first scenarios.
- Complex Instrumentation Logic — Lacks advanced features like sampling policies, custom processors, or metric collection; better served by native SDKs for complex telemetry.
- No OTLP Collector Available — Requires an OTLP-compatible backend or local collector; not useful if your observability stack only supports vendor-specific APIs.
License & commercial use
Apache License 2.0 (Apache-2.0): a permissive OSI-approved open-source license allowing commercial use, modification, and distribution with minimal restrictions. Requires retention of copyright notices and license text.
Apache-2.0 is a permissive license explicitly allowing commercial use. However, review Equinix Labs' any trademark or usage policies separately. No warranty or liability protections are provided by the license itself.
DEV.co evaluation signals
Editorial assessment — not user reviews. Directional, with an explicit confidence level.
| Signal | Assessment |
|---|---|
| Maintenance | Moderate |
| Documentation | Adequate |
| License clarity | Clear |
| Deployment complexity | Low |
| DEV.co fit | Good |
| Assessment confidence | High |
otel-cli supports TLS certificate validation, client certificate authentication, and insecure mode flags. Ensure OTLP endpoints are authenticated and encrypted if transmitting sensitive trace data. Be cautious with --tls-no-verify in production. No public security audits or disclosed vulnerabilities found in provided data; requires independent security review.
Alternatives to consider
Jaeger Agent sidecar
Purpose-built Jaeger sidecar for tracing; tighter integration with Jaeger backend but requires running a separate service and is less flexible for general OTLP.
Custom bash wrapper with SDK HTTP calls
Roll-your-own instrumentation using curl or similar to POST traces directly; gives full control but requires more code and maintenance.
Native OTel SDKs in compiled wrapper binaries
Compile a simple Go/Python wrapper linking OTel SDKs directly; avoids subprocess overhead but requires building and maintaining custom binaries.
Build on otel-cli with DEV.co software developers
Evaluate otel-cli for your DevOps, CI/CD, and legacy system observability needs. Start with non-recording mode—no risk to existing scripts.
Talk to DEV.coRelated open-source tools
Surfaced by semantic similarity across the DEV.co open-source index.
Related on DEV.co
Explore the category and the services that help you build with it.
otel-cli FAQ
What happens if I add otel-cli to a script but no OTLP endpoint is configured?
How do I avoid connection latency on every script invocation?
Can I use otel-cli with my current observability platform (Datadog, New Relic, etc.)?
Is otel-cli suitable for production shell scripts?
Custom software development services
Need help beyond evaluating otel-cli? DEV.co is a software development agency offering software development services and web development for teams of every size. Our software developers and web developers build custom software, web applications, APIs, and open-source observability integrations — and maintain them long-term.
Bring Tracing to Your Shell Workflows
Evaluate otel-cli for your DevOps, CI/CD, and legacy system observability needs. Start with non-recording mode—no risk to existing scripts.