Skip to content

Latest commit

 

History

History
129 lines (90 loc) · 3.66 KB

File metadata and controls

129 lines (90 loc) · 3.66 KB
canonical description labels title weight
Learn about the otel command
stage products
experimental
oss
otel
350

otel

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 >}}

Usage

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.

Configuration

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.

Optionally Running the Default Engine

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.

Available Components

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

Examples

Running with OTel Engine only

This example runs the OTel Engine without the Alloy Engine extension:

alloy otel --config=config.yaml

Example 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]

Running with OTel Engine and Alloy Engine extension

This example runs both the OTel Engine and the Alloy Engine extension in parallel:

alloy otel --config=config.yaml

Example 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]

Related documentation