I’m currently evaluating replacing promtail with Alloy as a log shipping client for the Loki setup at my employer, as the Loki docs say that promtail is feature complete and Agent is considered end-of-life.
I’ve managed to get Alloy up and running on a test machine with an equivalent config for shipping logs off to a Loki server without any issues. However, I was quite surprised that the binary is 285MB in size! This isn’t a total deal breaker, however rolling out Alloy as the standard log shipping client to our customers would mean nearly 300MB more OS disk usage on every customer machine, which is enough to be noticeable. (In practice, the disk usage would probably be greater than 300MB – we use NixOS, so when we update the version of Alloy, the old binary will be kept around on disk until it’s explicitly cleaned up at a later date.)
While I appreciate that Alloy is intended as an all-in-one solution, it does come with a lot of batteries included which we don’t necessarily need (e.g. all the Prometheus exporters). On the other hand, there are some Alloy features we’re interested in which aren’t available in promtail – such as WAL support.
In our use case it would be helpful if there were a way to reduce the set of integrations compiled into Alloy at build time, as we only need a small subset of the overall feature list. Is this something which is on the radar upstream? The way the code is structured at the moment means that removing integrations is a pretty invasive change, so it would be infeasible for me to maintain a patch removing the integrations we don’t need for our local build.