DEV.co
Open-Source Observability · equinix-labs

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.

Source: GitHub — github.com/equinix-labs/otel-cli
706
GitHub stars
58
Forks
Go
Primary language
Apache-2.0
License (OSI-approved)

Key facts

Objective fields from the source. Values we can't verify are shown as “Unknown” rather than guessed.

FieldValue
Repositoryequinix-labs/otel-cli
Ownerequinix-labs
Primary languageGo
LicenseApache-2.0 — OSI-approved
Stars706
Forks58
Open issues40
Latest releasev0.4.5 (2024-04-01)
Last updated2026-07-07
Sourcehttps://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.

Quickstart

Get the otel-cli source

Clone the repository and explore it locally.

terminalbash
git clone https://github.com/equinix-labs/otel-cli.gitcd otel-cli# follow the project's README for install & configuration

Need it deployed, integrated, or customized instead? DEV.co ships production installs.

Best use cases

Shell Script Observability

Instrument bash/sh scripts and cron jobs with distributed tracing by wrapping commands with otel-cli exec or embedding span calls.

CI/CD Pipeline Tracing

Add observability to build pipelines, deployment scripts, and automated workflows without modifying existing tooling.

Legacy System Integration

Bridge observability gaps in legacy or third-party systems where direct SDK instrumentation is not feasible.

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.

SignalAssessment
MaintenanceModerate
DocumentationAdequate
License clarityClear
Deployment complexityLow
DEV.co fitGood
Assessment confidenceHigh
Security considerations

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.

Software development agency

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.co

Related 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?
otel-cli runs in non-recording mode by design: spans are not emitted and no external calls are made. This 'first, do no harm' behavior lets you safely instrument scripts before enabling tracing.
How do I avoid connection latency on every script invocation?
Deploy a local OpenTelemetry collector (e.g., via Docker or systemd) and point otel-cli to localhost:4317. The collector buffers and batches spans for async export to your backend.
Can I use otel-cli with my current observability platform (Datadog, New Relic, etc.)?
Yes, if your platform supports OTLP ingestion. Set OTEL_EXPORTER_OTLP_ENDPOINT to your platform's OTLP endpoint and configure TLS/auth as needed. Check your platform's OTLP support first.
Is otel-cli suitable for production shell scripts?
Yes, with caveats: use it for non-latency-critical scripts (cron jobs, deployments, CI/CD). For high-frequency or latency-sensitive operations, subprocess overhead may be problematic. Always test with your deployment and collector setup.

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.