Grafana Cloud
Last reviewed: October 6, 2026

Run the Alloy OpenTelemetry Engine with the CLI

The OTel Engine is available under the Alloy otel command. Use the CLI to experiment locally or to run the OTel Engine on a single host. Refer to the otel reference documentation for more information.

EXPERIMENTAL: OTel Engine is an experimental feature. Experimental features are subject to frequent breaking changes, and may be removed with no equivalent replacement.

To maintain full compatibility of the OTel Engine with the upstream OpenTelemetry Collector and expose a compatible command line interface, the OTel Engine isn’t hidden behind a stability flag.

Make sure that you understand the risks involved before using an experimental feature in your production environments.

Before you begin

Make sure you have Alloy installed. Refer to Install Grafana Alloy for more information.

Run the OTel Engine

  1. Create a configuration file named config.yaml. The following example accepts traces over OTLP and prints it to the console:

    YAML
    receivers:
      otlp:
        protocols:
          grpc: {}
          http: {}
    
    processors:
      batch:
        timeout: 1s
        send_batch_size: 512
    
    exporters:
      debug:
        verbosity: detailed
    
    service:
      pipelines:
        traces:
          receivers: [otlp]
          processors: [batch]
          exporters: [debug]
  2. Check the configuration:

    shell
    alloy otel validate --config=config.yaml
  3. Start the OTel Engine:

    shell
    alloy otel --config=config.yaml

    To pass extra command-line flags, refer to the otel command reference.

  4. Verify that the OTel Engine runs:

    shell
    curl http://localhost:8888/metrics

Alloy then accepts incoming OTLP traces on localhost:4317 for gRPC and localhost:4318 for HTTP requests. Metrics are also available on the default collector port and endpoint at localhost:8888/metrics.

The Default Engine isn’t running, so its UI at localhost:12345 and its metrics at localhost:12345/metrics aren’t available.

Send data to Grafana Cloud

The following example configuration accepts telemetry over OTLP and sends it to Grafana Cloud:

YAML
extensions:
  basicauth/my_auth:
    client_auth:
      username: "<USERNAME>"
      password: "<PASSWORD>"

receivers:
  otlp:
    protocols:
      grpc: {}
      http: {}

processors:
  batch:
    timeout: 1s
    send_batch_size: 512

exporters:
  otlp_http/my_backend:
    endpoint: <URL>
    auth:
      authenticator: basicauth/my_auth

service:
  extensions: [basicauth/my_auth]
  pipelines:
    traces:
      receivers: [otlp]
      processors: [batch]
      exporters: [otlp_http/my_backend]

Replace the following: