diff --git a/static-instrumenter/README.md b/static-instrumenter/README.md index c0121146..6a3140ee 100644 --- a/static-instrumenter/README.md +++ b/static-instrumenter/README.md @@ -4,15 +4,19 @@ ### Agent instrumenter -Module enhancing OpenTelemetry Java Agent for static instrumentation. The modified agent can instrument and save a new JAR with all relevant instrumentations applied and necessary helper class-code included. +Module enhancing OpenTelemetry Java Agent for static instrumentation. The modified agent can +instrument and save a new JAR with all relevant instrumentations applied and necessary helper +class-code included. #### Generate a new application jar containing the static instrumentation -Execute the following command line with your application jar name and the desired output folder of the new jar: +Execute the following command line with your application jar name and the desired output folder of +the new jar: `java -javaagent:opentelemetry-static-agent.jar -cp io.opentelemetry.contrib.staticinstrumenter.agent.main.Main ` -The `opentelemetry-static-agent.jar` agent needs to be both attached (`-javaagent:`) and run as the main method (`io.opentelemetry.contrib.staticinstrumenter.agent.main.Main` class). +The `opentelemetry-static-agent.jar` agent needs to be both attached (`-javaagent:`) and run as the +main method (`io.opentelemetry.contrib.staticinstrumenter.agent.main.Main` class). The generated jar will keep the name of your non-instrumented jar. @@ -24,9 +28,37 @@ Execute the following command line: `` is `:` on UNIX systems and `;` on Windows systems. -### Maven3 plugin +### Maven 3 plugin -Maven3 plugin running the static instrumentation agent during the `package` phase. Packaged archive contains statically instrumened class code. +Maven 3 plugin running the static instrumentation agent during the `package` phase. Packaged archive +contains statically instrumented class code. + +| Parameter | Description | +|---------------|------------------------------------------------------------------------------------------------------------| +| artifactName | Name of the artifact to instrument. If not provided, the plugin will instrument all the project artifacts. | +| outputFolder | Path to the folder where the plugin will generate the instrumented artifacts. | +| suffix | Suffix added to the generated artifact. The default value is `-instrumented`. | + +```xml + + + io.opentelemetry.contrib + static-instrumentation-maven-plugin + ... + + ... + ... + ... + + + + + instrument + + + + +``` ## Component owners