Use java.lang.instrument without writing an agent.
'net.ju-n.auto-instrument:auto-instrument:1.0.2'
<dependency>
<groupId>net.ju-n.auto-instrument</groupId>
<artifactId>auto-instrument</artifactId>
<version>1.0.2</version>
</dependency>
<dependency org="net.ju-n.auto-instrument" name="auto-instrument" rev="1.0.2"/>
"net.ju-n.auto-instrument", "auto-instrument", "1.0.2"