otelcol(8)
OpenTelemetry Collector is a vendor-agnostic agent that receives, processes, and exports telemetry data from applications and infrastructure.
Synopsis
otelcol [OPTION]... [--config=FILE]Description
The OpenTelemetry Collector (otelcol) is a standalone service that collects traces, metrics, and logs from applications and infrastructure, then processes and exports them to backend systems like Jaeger, Prometheus, or cloud observability platforms. It acts as a bridge between instrumented services and telemetry backends.
The collector uses a pipeline architecture: receivers accept data in various formats, processors transform and filter it, and exporters send it to destinations. Configuration is typically provided via a YAML file that defines these components and their interactions.
Common options
| Flag | What it does |
|---|---|
--config, -c | Path to the collector configuration file (YAML format) |
--set | Set a configuration value using the key=value format (can be used multiple times) |
--feature-gates | Comma-separated list of feature gates to enable or disable (format: +feature or -feature) |
--version | Print the version and exit |
--help, -h | Display help information and exit |
--dry-run | Validate configuration and exit without starting the collector |
--logs-level | Set the logging level (debug, info, warn, error) |
--configserver | Start in configuration server mode for remote configuration management |
Examples
Start the collector with a configuration file located at config.yaml
otelcol --config=config.yamlStart the collector with debug logging enabled to troubleshoot issues
otelcol --config=config.yaml --logs-level=debugValidate the configuration file without actually starting the collector service
otelcol --dry-run --config=config.yamlStart the collector and override a specific configuration value for the OTLP receiver endpoint
otelcol --config=config.yaml --set=receivers.otlp.protocols.grpc.endpoint=0.0.0.0:4317Display the installed version of the OpenTelemetry Collector
otelcol --versionStart the collector with a specific feature gate enabled for Prometheus translation
otelcol --config=config.yaml --feature-gates=+pkg.translator.prometheus.NormalizeName