Grafana Alloy — open-source OpenTelemetry Collector distribution with programmable pipelines.
Multi-module Go repo: root, syntax/, collector/, extension/alloyengine/, tools/.
- Contributing and PR workflow: docs/developer/contributing.md
- Specifically, make sure you use the conventional commit formats and PR titles as described in the contributing guide.
- Verify the changes with
make lintand run relevant tests before opening the PR. - Note that we have some code generation steps that need to be run when the generated output is changed. See the contributing guide and Makefile help commands for more details.
Whenever you are writing public-facing documentation such as documentation located in docs/sources, make sure you get familiar with the following:
- Agent role and Grafana context for documentation: .docs/agent/role.md, .docs/agent/grafana.md
- Documentation style guide: .docs/agent/style.md
If you are developing code, depending on what you are building, make sure you get familiar with relevant playbooks from the list below:
- Handling breaking changes
- Shepherding releases
- Managing issues
- Updating OpenTelemetry dependencies
- Add OpenTelemetry components
- Adding community components
- Writing documentation
- Write component docs
- Create exporter components
- Key dependency updates
Show all Makefile targets and descriptions:
make helpLint (Go + custom alloylint):
make lintTest (PR-safe, skips Docker-dependent tests):
GO_TAGS="nodocker" make testTest a single package:
go test -race -tags="nodocker" ./internal/component/discovery/...Build (without UI):
SKIP_UI_BUILD=1 make alloyRun:
./build/alloy run example-config.alloy~/go/binmust be on PATH (export PATH="$PATH:$(go env GOPATH)/bin"). The VM update script handles this, but ad-hoc shells need it explicitly.CGO_ENABLED=1is the default.libsystemd-devis required on Linux for the build to link.- Docker daemon is not started automatically. Before running tests without the
nodockertag:sudo dockerd &thensudo chmod 666 /var/run/docker.sock. Usesfuse-overlayfsstorage driver (nested Firecracker VM). - First
make linton a cold cache takes ~10 min (module download + analysis). Cached runs ~30s. SKIP_UI_BUILD=1saves ~90s when not touching UI code. The UI must be built at least once for the embedded web server at:12345to serve pages..nvmrcsays Node 24.x; Node 22.x (pre-installed) works for builds. Only matters for exact CI parity on UI lint.