Build a custom Grafana Alloy binary with the OpenTelemetry Collector Builder (OCB)
Grafana builds the OTel Engine from a declarative OpenTelemetry Collector Builder (OCB) manifest. If you need additional components or want to remove bundled components, edit the manifest and build a customized Alloy binary.
Caution
Grafana doesn’t offer commercial support for custom builds.
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 the following tools:
- Git
- Go 1.26.7 or later
- Node.js
- Docker, if you want to build the container image
The build compiles C dependencies, so you also need the following for your platform:
- On Linux, the systemd headers.
On Debian-based distributions, run
sudo apt-get install libsystemd-dev. - On Windows, a 64-bit mingw-w64 gcc toolchain. Grafana recommends the WinLibs build.
Build a custom binary
Clone the Alloy repository and change to the repository root. The following steps assume you run commands from this directory.