| canonical | description | labels | title | weight | |||||
|---|---|---|---|---|---|---|---|---|---|
Learn about the otel command |
|
otel |
350 |
The otel command runs Grafana Alloy using the OpenTelemetry (OTel) Collector engine. This command accepts OpenTelemetry Collector YAML configuration files.
The Alloy OTel distribution includes receivers, processors, exporters, extensions, and connectors from the OpenTelemetry Collector core and contrib repositories. This includes components for OTLP, Prometheus, Kafka, Zipkin, and other popular integrations.
As with the run command, this runs in the foreground until an interrupt is received.
{{< admonition type="warning" >}} Please note that this is an experimental feature and can therefore be subject to breaking changes or removal in future releases. {{< /admonition >}}
alloy otel --config=<CONFIG_FILE> [<FLAGS> ...] Replace the following:
<CONFIG_FILE>: Path to an OpenTelemetry Collector configuration file.<FLAGS>: One or more flags that configure the OpenTelemetry Collector.
The otel command accepts standard OpenTelemetry Collector YAML configuration files. The configuration file defines receivers, processors, exporters, and other components that make up your telemetry pipeline.
For information about configuration options, refer to the OpenTelemetry Collector documentation.
The Alloy Collector Distro includes the option to run pipelines using the Default Engine alongside the OTel Engine using the built in Alloy Engine extension. More information on how to run the extension can be found here
This will run a Default Engine pipeline in parallel to the OTel Engine pipeline - the two pipelines cannot natively interact.
The included components are based off the upstream core distribution, in order to ensure that full end-to-end pipelines are accessible for most use cases. In addition to upstream components, we also integrate some of our own components that enable functionality to work well within the Alloy ecosystem.
To view the full list of components and their versioning, please refer to the OCB manifest
This example runs the OTel Engine without the Alloy Engine extension:
alloy otel --config=config.yamlExample config.yaml:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
processors:
batch:
exporters:
debug:
service:
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [debug]This example runs both the OTel Engine and the Alloy Engine extension in parallel:
alloy otel --config=config.yamlExample config.yaml:
extensions:
alloyengine:
config:
file: path/to/alloy-config.alloy
flags:
server.http.listen-addr: 0.0.0.0:12345
stability.level: experimental
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
processors:
batch:
exporters:
debug:
service:
extensions: [alloyengine]
pipelines:
traces:
receivers: [otlp]
processors: [batch]
exporters: [debug]- OpenTelemetry Collector documentation: Official OpenTelemetry Collector documentation.