Grafana Alloy — OpenTelemetry Collector Distribution by Grafana
Collect, transform, and ship telemetry data with Grafana Alloy. A vendor-neutral OpenTelemetry collector with a programmable pipeline, built-in Prometheus scraping, and native Loki and Tempo support.
What it is
Grafana Alloy is an open-source, vendor-neutral telemetry collector from Grafana Labs. It unifies metrics, logs, traces, and profiles into a single agent, serving as the replacement for the older Grafana Agent.
Alloy targets platform engineers and SREs who need a single binary to scrape Prometheus metrics, collect logs for Loki, forward traces to Tempo, and ship profiles to Pyroscope -- all with a programmable pipeline language.
How it saves time or tokens
Instead of deploying separate agents for each telemetry signal (Prometheus exporter, Fluentd, Jaeger agent), Alloy consolidates them into one binary with one config syntax. This reduces the number of running processes, config files, and deployment manifests a team must maintain.
How to use
- Install Alloy via package manager or Docker:
# Linux (apt)
sudo apt update && sudo apt install alloy
# Docker
docker run -v ./config.alloy:/etc/alloy/config.alloy -p 12345:12345 grafana/alloy:latest
- Write a config file using the Alloy syntax (a HCL-like pipeline language).
- Start Alloy pointing to your config:
alloy run config.alloy.
Example
// config.alloy -- scrape Prometheus metrics and forward to Mimir
prometheus.scrape 'default' {
targets = [{'__address__' = 'localhost:9090'}]
forward_to = [prometheus.remote_write.mimir.receiver]
}
prometheus.remote_write 'mimir' {
endpoint {
url = 'http://mimir:9009/api/v1/push'
}
}
// Collect logs and send to Loki
loki.source.file 'app_logs' {
targets = [{'__path__' = '/var/log/app/*.log'}]
forward_to = [loki.write.default.receiver]
}
loki.write 'default' {
endpoint {
url = 'http://loki:3100/loki/api/v1/push'
}
}
Related on TokRepo
- DevOps Tools -- More infrastructure and operations tooling
- Monitoring Tools -- Observability and monitoring solutions
Common pitfalls
- Alloy syntax is not YAML. Existing Grafana Agent YAML configs need conversion using
alloy convert. - Running Alloy alongside an existing Prometheus instance on the same host can cause port conflicts on 9090.
- Memory usage scales with the number of active scrape targets and log tails. Set resource limits in Docker or Kubernetes to avoid OOM.
Frequently Asked Questions
Alloy is Grafana Labs distribution of the OpenTelemetry Collector with added components for Prometheus scraping, Loki log collection, Tempo trace forwarding, and Pyroscope profiling. It uses a custom pipeline syntax instead of YAML-based OTel Collector config.
Yes. Grafana Labs deprecated Grafana Agent in favor of Alloy. Alloy is the successor that combines Grafana Agent Static mode and Flow mode into one product with the Alloy config syntax.
Alloy handles four signals: metrics (Prometheus format), logs (Loki format), traces (OpenTelemetry/Tempo), and continuous profiling (Pyroscope). All four can be collected, transformed, and shipped from a single Alloy instance.
Yes. Alloy supports any OTLP-compatible endpoint for traces, any Prometheus remote-write endpoint for metrics, and any syslog or HTTP endpoint for logs. It is vendor-neutral despite being built by Grafana Labs.
Alloy uses a HCL-inspired declarative syntax where you define components (sources, processors, exporters) and wire them together via forward_to references. This replaces both YAML configs and the older River syntax from Grafana Agent Flow.
Citations (3)
- Grafana Alloy GitHub— Grafana Alloy is an open-source telemetry collector replacing Grafana Agent
- Grafana Alloy Documentation— Supports Prometheus, Loki, Tempo, and Pyroscope telemetry signals
- OpenTelemetry Docs— OpenTelemetry Collector specification and architecture
Related on TokRepo
Discussion
Related Assets
HumHub — Open-Source Enterprise Social Network
A flexible, open-source social networking platform built on Yii2 for creating private communities, intranets, and collaboration spaces within organizations.
Dolibarr — Open-Source ERP & CRM for Business Management
A modular open-source ERP and CRM application written in PHP for managing contacts, invoices, orders, inventory, accounting, and more from a single web interface.
PrestaShop — Open-Source PHP E-Commerce Platform
A widely adopted open-source e-commerce platform written in PHP with a rich module marketplace, multi-language support, and a strong European user base.