skywalking-java/docs/en/setup/service-agent/java-agent
King a7a4faabb1
Add rocketmq reporter link to doc (#70)
2021-11-09 21:46:55 +08:00
..
agent-optional-plugins Replace the URL width https (#6392) 2021-02-18 09:52:18 +08:00
Application-toolkit-log4j-1.x.md Add Kafka LogReporter and make grpc log reporter sharing grpc channel with reporters (#20) 2021-09-23 10:50:34 +08:00
Application-toolkit-log4j-2.x.md Add Kafka LogReporter and make grpc log reporter sharing grpc channel with reporters (#20) 2021-09-23 10:50:34 +08:00
Application-toolkit-logback-1.x.md Add Kafka LogReporter and make grpc log reporter sharing grpc channel with reporters (#20) 2021-09-23 10:50:34 +08:00
Application-toolkit-meter.md Doc polish, remove unrelated documents and fix source code LICENSE (#5) 2021-08-27 10:08:36 +08:00
Application-toolkit-micrometer.md Provide agent-side meter api (#4816) 2020-06-22 14:07:34 +08:00
Application-toolkit-trace-cross-thread.md [Enhance]For trace CompletableFuture thenApply or thenAccept (#60) 2021-11-01 21:36:34 +08:00
Application-toolkit-trace.md export the segmentId and spanId in toolkit (#6213) 2021-01-16 09:04:01 +08:00
Bootstrap-plugins.md Add new menu for the document (#46) 2021-10-11 10:07:15 +08:00
Customize-enhance-trace.md Fix change log link (#13) 2021-08-29 16:40:25 +08:00
How-to-disable-plugin.md Finish the new document structure. 2018-07-08 21:04:50 -07:00
How-to-tolerate-exceptions.md Fix wrong dependency in doc for IgnoredException (#69) 2021-11-09 10:16:51 +08:00
Java-Plugin-Development-Guide.md Doc polish, remove unrelated documents and fix source code LICENSE (#5) 2021-08-27 10:08:36 +08:00
Namespace.md Doc polish, remove unrelated documents and fix source code LICENSE (#5) 2021-08-27 10:08:36 +08:00
Opentracing.md Finish the new document structure. 2018-07-08 21:04:50 -07:00
Optional-plugins.md Add new menu for the document (#46) 2021-10-11 10:07:15 +08:00
Plugin-list.md Add okhttp2.x plugin (#49) 2021-10-25 22:40:37 +08:00
Plugin-test.md support jdk17 in agent plugin testing, add test case plugin on jdk17 (#55) 2021-11-07 08:27:37 +08:00
README.md Add JDK17 supported declaration. (#52) 2021-10-16 20:40:42 +08:00
Setting-override.md feat:Active System.env Config In Both Collector And agent.config. (#1957) 2018-11-26 00:12:01 +08:00
Specified-agent-config.md Add the function of the specified agent config 2018-08-25 21:41:42 +08:00
Supported-list.md Correct asynchttpclient-scenario case and supported versions. (#68) 2021-11-08 21:08:14 +08:00
TLS.md Support mTLS for gRPC channel (#15) 2021-08-31 15:56:30 +08:00
Token-auth.md Doc polish, remove unrelated documents and fix source code LICENSE (#5) 2021-08-27 10:08:36 +08:00
advanced-features.md Doc polish, remove unrelated documents and fix source code LICENSE (#5) 2021-08-27 10:08:36 +08:00
advanced-reporters.md Add rocketmq reporter link to doc (#70) 2021-11-09 21:46:55 +08:00
configuration-discovery.md Support config `agent.span_limit_per_segment` can be changed in the runtime. (#6482) 2021-03-05 15:22:02 +08:00
configurations.md Support set instance properties in json format (#67) 2021-11-07 18:51:34 +08:00
containerization.md Doc: Update setup agent in kubernetes from 'containers' to 'initContainers'. (#44) 2021-10-08 18:16:01 +08:00
logic-endpoint.md Separate agent docs to avoid long single page. (#7537) 2021-08-23 20:10:01 +08:00

README.md

Setup java agent

  1. Agent is available for JDK 8 - 17.
  2. Find agent folder in SkyWalking release package
  3. Set agent.service_name in config/agent.config. Could be any String in English.
  4. Set collector.backend_service in config/agent.config. Default point to 127.0.0.1:11800, only works for local backend.
  5. Add -javaagent:/path/to/skywalking-package/agent/skywalking-agent.jar to JVM argument. And make sure to add it before the -jar argument.

The agent release dist is included in Apache official release. New agent package looks like this.

+-- agent
    +-- activations
         apm-toolkit-log4j-1.x-activation.jar
         apm-toolkit-log4j-2.x-activation.jar
         apm-toolkit-logback-1.x-activation.jar
         ...
    +-- config
         agent.config  
    +-- plugins
         apm-dubbo-plugin.jar
         apm-feign-default-http-9.x.jar
         apm-httpClient-4.x-plugin.jar
         .....
    +-- optional-plugins
         apm-gson-2.x-plugin.jar
         .....
    +-- bootstrap-plugins
         jdk-http-plugin.jar
         .....
    +-- logs
    skywalking-agent.jar
  • Start your application.

Install javaagent FAQs

  • Linux Tomcat 7, Tomcat 8, Tomcat 9
    Change the first line of tomcat/bin/catalina.sh.
CATALINA_OPTS="$CATALINA_OPTS -javaagent:/path/to/skywalking-agent/skywalking-agent.jar"; export CATALINA_OPTS
  • Windows Tomcat 7, Tomcat 8, Tomcat 9
    Change the first line of tomcat/bin/catalina.bat.
set "CATALINA_OPTS=-javaagent:/path/to/skywalking-agent/skywalking-agent.jar"
  • JAR file
    Add -javaagent argument to command line in which you start your app. eg:
java -javaagent:/path/to/skywalking-agent/skywalking-agent.jar -jar yourApp.jar
  • Jetty
    Modify jetty.sh, add -javaagent argument to command line in which you start your app. eg:
export JAVA_OPTIONS="${JAVA_OPTIONS} -javaagent:/path/to/skywalking-agent/skywalking-agent.jar"

Plugins

SkyWalking agent has supported various middlewares, frameworks and libraries. Read supported list to get them and supported version. If the plugin is in Optional² catalog, go to optional plugins and bootstrap class plugin section to learn how to active it.

  • All plugins in /plugins folder are active. Remove the plugin jar, it disabled.
  • The default logging output folder is /logs.