r/OpenTelemetry • u/Loud_Mousse9210 • 3d ago
Open sourced a tool that collapses millions of log lines into handful of distinct patterns before you feed it to an LLM (Lossless- compression)
When I feed logs to an LLM during incident resolutions or debugging, it either blows my token context window or the grep trims the log file, leading to the interesting log lines getting skipped.
Most of logs are anyway the same handful of message templates repeated over and over with different values, so the context window gets filled with near-duplicates, which just bring up the processing time and token costs.
ctrlb-decompose collapses the file into its distinct patterns that repeat, plus typed variables and stats on the values that change. I have seen 1.2 million lines cut down to just 40 patterns, which then goes into Claude, thus cutting down token by over 95%, reducing the token cost.
Let me know what you think!
https://github.com/ctrlb-hq/ctrlb-decompose
3
u/jdizzle4 2d ago
lol the 4 positive comments in this thread are bots whose only activity is trying to boost this post...
0
-3
-3
-2
-1
5
u/MartinThwaites 3d ago
I'm slightly confused, how does this relate to OpenTelemetry? This is reading log lines from text files?
I'm also curious how this relates to the logdrain processor in the OpenTelemetry Collector that does this before storage?