Kanela 2.0 is a full rewrite of the Kanela agent that focuses on the specific parts of Kanela that we actually use in Kamon's instrumentation. The heavy lifting is still done by ByteBuddy, we just cleaned up and reorganized all the plumbing around ByteBuddy.
Taking a more concrete look at the changes we introduced:
- The overall code structure was simplified and we removed vavr and lombok from the codebase
- We no longer use a custom ByteBuddy build for Kanela. Now we are shading the asm dependencies in the same way that the ByteBuddy build would, so we can freely update ByteBuddy versions without patching
- No support for Java versions prior to Java 8. Soon we will also require Java 17
- Eliminated some features that we never used:
- The circuit breaker to remove instrumentation after some memory/cpu usage thresholds are exceeded
- The class dumper (although this might be introduced again in the future to assist with native image builds)
- Stoppable instrumentations
- Injecting custom classes in the bootstrap classloader
- The garbage collection listener
The new version is mostly source code compatible with the instrumentations built with Kanela 1.x, but any existing instrumentation needs to be recompiled using the new Kanela version. Kamon 2.8.x series will be the first using Kanela 2.0.
🚨 Do not use Kanela 2.0 with Kamon versions prior to 2.8.0.