opentelemetry-java-contrib/static-instrumenter
Trask Stalnaker 82d01789eb
Update username (#382)
2022-07-05 19:18:00 -07:00
..
agent-extension Fix deprecated AgentListener.beforeAgent usage (#332) 2022-05-12 10:25:23 -07:00
agent-instrumenter Remove SNAPSHOT dependency (#360) 2022-06-17 14:10:54 -07:00
bootstrap Static instrumenter logic - a new agent distro (#319) 2022-05-10 17:27:19 -07:00
gradle-plugin Static instrumenter logic - a new agent distro (#319) 2022-05-10 17:27:19 -07:00
maven-plugin Static instr maven plugin core (#293) 2022-06-01 20:59:11 -07:00
test-app small test app for verifying instrumentation (#313) 2022-04-26 16:13:02 -07:00
README.md Update username (#382) 2022-07-05 19:18:00 -07:00
build.gradle.kts Static instrumentation donation - project structure (#199) 2022-01-24 20:26:11 -08:00

README.md

OpenTelemetry Java static instrumenter

Structure

Agent instrumenter

Module enhancing OpenTelemetry Java Agent for static instrumentation. The modified agent is capable of instrumenting and saving a new JAR with all relevant instrumentations applied and necessary helper class-code included.

In order to statically instrument a JAR, modified agent needs to be both attached (-javaagent:) and run as the main method (io.opentelemetry.contrib.staticinstrumenter.agent.main.Main class). :

To instrument you app use opentelemetry-static-agent.jar and pass the main class of the agent:

java -javaagent:opentelemetry-static-agent.jar -cp your-app.jar io.opentelemetry.contrib.staticinstrumenter.agent.main.Main output-folder

To run an instrumented app pass the -Dio.opentelemetry.javaagent.shaded.io.opentelemetry.context.contextStorageProvider=default option and add no-inst-agent.jar to the classpath:

java -Dio.opentelemetry.javaagent.shaded.io.opentelemetry.context.contextStorageProvider=default -cp output-folder/your-app.jar:no-inst-agent.jar org.example.YourMainClass

Gradle plugin

Gradle plugin running static instrumentation agent during the assemble lifecycle task. The assembled archive contains statically instrumened class code.

Maven3 plugin

Maven3 plugin running the static instrumentation agent during the package phase. Packaged archive contains statically instrumened class code.

Component owners

Learn more about component owners in component_owners.yml.