public class InstrumentationClassPath
extends java.lang.Object
ClassPath utility used when loading instrumentation modules and configuration. The goal of this class is creating a
special ClassLoader instance that provides two Kanela-specific capabilities:
1. It is able to load instrumentation modules embedded in the Kanela jar itself. All jar files that are included
under the "kanela/agent/instrumentations" folder on the Kanela jar will be unpacked and applied.
2. It searches for an instrumentation ClassLoader to use when loading instrumentations. This ClassLoader is useful
when attaching the Kanela agent at runtime while using tools and frameworks with intricate class loading
mechanisms like SBT and Play Framework on development mode. This allows users to specify which of the several
existent ClassLoaders should be used by Kanela to load instrumentations.
The instrumentation ClassLoader instance is shared via the "kanela.instrumentation.classloader" system property,
which should be set by the infrastructure code (usually a SBT or toolkit-specific plugin) before attaching/reloading
the Kanela agent and will be cleared out as soon as this class' construction finishes.
NOTE: Even though system properties are not meant to be used as an object instance sharing mechanism, after carefully
reviewing the options and warnings on the Properties class, it turns out to be the most simple and convenient way to
share the instrumentation ClassLoader instance.