DEV Community


Log clustering in Rust

Benjamin Trent
I make things. I read things. I do things. I sometimes write things. All opinions are my own.
・1 min read

Log clustering in Rust

Log clustering is a powerful tool for finding insights in large amounts of logs. Spikes in log categories can indicate a change point in the system warranting investigation.

Here is a simple library I wrote drain-rs. And lg-rs is an example command line utility using the drain library.

Drain is an online, unsupervised semi-structured text clustering algorithm. It is based on the original work by logpai. Drain boasts some impressive numbers when compared against other clustering algorithms:


Paring this clustering efficacy with the throughput and low overhead capabilities of Rust is a no-brainer.


Let me know what you think. Its OSS, so issues/PRs are welcome.

Discussion (0)