Build fluency with Grafana Alloy vocabulary — River pipelines, Prometheus scraping, OTLP receivers, and Loki shipping.
0 / 5 completed
1 / 5
During standup, the team adopts Grafana Alloy and its config language. How is Alloy configured?
Grafana Alloy uses River (now called Alloy syntax), an HCL-inspired declarative language in .alloy files. You declare component blocks like prometheus.scrape "job_name" { ... } and wire them by referencing exports: forward_to = [prometheus.remote_write.default.receiver]. The data flow is explicit and inspectable.
2 / 5
In a PR review, a colleague adds a prometheus.scrape component to Alloy. How does it work?
prometheus.scrape is Alloy's replacement for Prometheus's scrape_configs. It polls the configured targets, parses the Prometheus exposition format, and forwards metric families to a downstream receiver (e.g. prometheus.remote_write.default.receiver). It supports discovery components like discovery.kubernetes for dynamic targets.
3 / 5
An incident shows otelcol.receiver.otlp not receiving spans from an instrumented service. What should be checked?
otelcol.receiver.otlp listens for OTLP data over gRPC (default port 4317) or HTTP (4318). The most common misconfiguration is a port or endpoint mismatch — check that OTEL_EXPORTER_OTLP_ENDPOINT in your app points to Alloy's listener address. The output block wires received signals to downstream exporters.
4 / 5
In a design review, the team connects a log shipper to loki.write in Alloy. What does it do?
loki.write is the terminal component for log pipelines in Alloy — it batches and pushes log streams to Loki's push API. Upstream components like loki.source.file (tail local files), loki.source.journal (systemd journal), or otelcol.exporter.loki (from OTel traces) reference loki.write.default.receiver as their output.
5 / 5
During a code review, the team discusses component pipeline wiring in Alloy. What makes it different from Prometheus config?
Alloy's wiring model is explicit: each component exports typed values (e.g. a receiver endpoint) accessible via component_type.label.exports.field notation. Other components consume these references as configuration values. This creates a directed acyclic graph of data flow that's visible in Alloy's built-in UI at /graph, unlike Prometheus's implicit config coupling.