Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.02 KB

README.md

File metadata and controls

31 lines (24 loc) · 1.02 KB

jvmbytes inst agent allows you to config once and use Instrumentation for multiple times and in multiple libraries.

jvmbytes inst agent export the Instrumentation instance to multiple bytes libraries, which can be included in application classpath and loaded by AppClassloader, so that it's not need to update java command config, and which is always hard to change in production environment.

usage

  1. add inst-loader dependency in pom.xml:
<dependency>
    <groupId>com.jvmbytes.agent</groupId>
    <artifactId>inst-loader</artifactId>
    <version>1.0.1</version>
</dependency>
  1. load Instrumentation instance through com.jvmbytes.agent.inst.InstLoader.loadInst().

  2. download inst-agent-1.0.1.jar

wget https://search.maven.org/remotecontent?filepath=com/jvmbytes/agent/inst-agent/1.0.1/inst-agent-1.0.1.jar
  1. add -javaagent:inst-agent-1.0.1.jar for java process
java -javaagent:inst-agent-1.0.1.jar -jar app.jar

see demo