skywalking-java/docs/en/setup/service-agent/java-agent
xu1009 9e26f26f0b
Support monitor grizzly thread pool (#533)
2023-05-25 19:30:35 -04:00
..
agent-optional-plugins Update trace-ignore-plugin.md (#452) 2023-02-07 12:00:31 +08:00
Application-toolkit-dependency.md Polish docs for preparing release. (#490) 2023-03-29 11:21:50 +08:00
Application-toolkit-kafka.md Support mannual propagation of tracing context to next stream for webflux. (#371) 2022-11-03 14:41:45 +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 Support `-Dlog4j2.contextSelector=org.apache.logging.log4j.core.async.AsyncLoggerContextSelector` in gRPC log report. (#182) 2022-05-22 13:56:29 +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-1.10.md Adds Micrometer Observation instrumentation (#401) 2022-12-06 18:51:12 +08:00
Application-toolkit-micrometer.md Adds Micrometer Observation instrumentation (#401) 2022-12-06 18:51:12 +08:00
Application-toolkit-trace-annotation.md Expose complete Tracing APIs in the tracing toolkit (#442) 2023-01-24 08:01:18 +08:00
Application-toolkit-trace-correlation-context.md Polish docs for preparing release. (#490) 2023-03-29 11:21:50 +08:00
Application-toolkit-trace-cross-thread.md Polish docs for preparing release. (#490) 2023-03-29 11:21:50 +08:00
Application-toolkit-trace-read-context.md Polish docs for preparing release. (#490) 2023-03-29 11:21:50 +08:00
Application-toolkit-trace.md Correct missing package name in native manual API docs. (#449) 2023-02-03 22:09:56 +08:00
Application-toolkit-tracer.md Correct missing package name in native manual API docs. (#449) 2023-02-03 22:09:56 +08:00
Application-toolkit-webflux.md Support mannual propagation of tracing context to next stream for webflux. (#371) 2022-11-03 14:41:45 +08:00
Bootstrap-plugins.md Support forkjoinpool plugin (#505) 2023-04-17 17:45:09 +08:00
Customize-enhance-trace.md Enhance `returnedObj` expression to support Array, List and Map (#84) 2021-12-15 15:00:22 +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 Polish up kafka,nats,activemq,rabbitmq plugins to set peer at comsumer side (#377) 2022-11-06 18:57:19 +08:00
Opentracing.md Polish docs for preparing release. (#490) 2023-03-29 11:21:50 +08:00
Optional-plugins.md Add plugin for Spring 6, set development baseline to JDK 17, remove Powermock entirely (#444) 2023-01-31 19:29:32 +08:00
Plugin-list.md Support monitor grizzly thread pool (#533) 2023-05-25 19:30:35 -04:00
Plugin-test.md Upgrade agent-test-tools and polish dubbo plugin (#387) 2022-11-19 16:27:25 +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 Support monitor grizzly thread pool (#533) 2023-05-25 19:30:35 -04: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 Adds Micrometer Observation instrumentation (#401) 2022-12-06 18:51:12 +08:00
advanced-reporters.md Add rocketmq reporter link to doc (#70) 2021-11-09 21:46:55 +08:00
configuration-discovery.md Add `plugin.jdbc.trace_sql_parameters` into Configuration Discovery S… (#174) 2022-05-30 20:42:30 +08:00
configurations.md Support keep trace profiling when cross-thread (#479) 2023-03-14 17:55:28 +08:00
containerization.md add java agent injector link (#112) 2022-02-27 18:56:33 +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.