traceable-agentfrom the command line:
runtask of a Gradle project leveraging the Application Plugin, complete the following steps:
javaagentflag as the first element of the
jvmArgslist for the
runtask. Use the custom configuration you defined to dynamically retrieve the path of the Java agent JAR on your system.
exectask of a Maven project leveraging the Exec Maven Plugin, complete the following steps:
<argument>to the Exec Maven Plugin configuration to set the -
mvn compile exec:execwill now run your application with the Traceable Java agent attached
example-config.yamlto configure Traceable’s Java agent. If you do not provide the configuration file, the Java agent takes the inbuilt default values which you can see in the output of the command on the console. Run the above command separately for each Java application that you want to instrument with Traceable’s Java agent.
-Dproperty=valuemethod to set the configuration values. When you set the value using this method, it overwrites the values set using both Method 1 and 2. Following is an example of using Java’s
ht- All Hypertrace instrumentation
servlet-ht- Servlet, Spark Web
-Dotel.instrumentation.servlet.enabled=falsedisables all the servlet instrumentations including core OpenTelemetry and Hypertrace.