skywalking/docs/en/setup/service-agent/java-agent
吴晟 Wu Sheng c6ada8c98f
Support new v2 protocol and make concept consistently (#1937)
* Update new protocol

* Support new protocol at agent side.

* Fix test case.

* Make backend supports new trace protocol

* Fix tests.

* Make all new services available in gRPC.

* Fix bugs.

* Finish new document for v2 trace protocol.

* Fix wrong version requirement of zk

* Fix trace query bug.

* Find a client side dictionary bug.

* Fix register bugs.

* Fix break doc links.
2018-11-21 22:33:04 +08:00
..
agent-optional-plugins Sync 6.0.0-alpha release and version up to beta. (#1883) 2018-11-06 15:45:15 +08:00
Application-toolkit-log4j-1.x.md Finish the new document structure. 2018-07-08 21:04:50 -07:00
Application-toolkit-log4j-2.x.md Finish the new document structure. 2018-07-08 21:04:50 -07:00
Application-toolkit-logback-1.x.md Finish the new document structure. 2018-07-08 21:04:50 -07:00
Application-toolkit-trace-cross-thread.md Finish the new document structure. 2018-07-08 21:04:50 -07:00
Application-toolkit-trace.md Finish the new document structure. 2018-07-08 21:04:50 -07:00
How-to-disable-plugin.md Finish the new document structure. 2018-07-08 21:04:50 -07:00
Namespace.md Refactor documents. Delete all backend documents, cc @peng-yongsheng , considering backend refactored, then the documents should rebuild manually. 2018-08-07 20:25:11 +08:00
Opentracing.md Finish the new document structure. 2018-07-08 21:04:50 -07:00
README.md Support new v2 protocol and make concept consistently (#1937) 2018-11-21 22:33:04 +08:00
Setting-override.md Support for overriding config with agent options (#1887) 2018-11-07 23:15:36 +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 Sync 6.0.0-alpha release and version up to beta. (#1883) 2018-11-06 15:45:15 +08:00
TLS.md Refactor documents. Delete all backend documents, cc @peng-yongsheng , considering backend refactored, then the documents should rebuild manually. 2018-08-07 20:25:11 +08:00
Token-auth.md Refactor documents. Delete all backend documents, cc @peng-yongsheng , considering backend refactored, then the documents should rebuild manually. 2018-08-07 20:25:11 +08:00

README.md

Setup java agent

  1. Find agent folder in SkyWalking release package
  2. Set agent.service_name in config/agent.config. Could be any String in English.
  3. Set collector.backend_service in config/agent.config. Default point to 127.0.0.1:11800, only works for local backend.
  4. Add -javaagent:/path/to/skywalking-package/agenxt/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
         .....
    skywalking-agent.jar
  • Start your application.

Advanced features

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

Install javaagent FAQs

  • Linux Tomcat 7, Tomcat 8
    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
    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

Supported middlewares, frameworks and libraries

See supported list.

Plugins

Java agent plugins are all pluggable. Optional plugins could be provided by source codes or in optional-plugins folder under agent. For using these plugins, you need to compile source codes by yourself, or copy the certain plugins to /plugins.

Now, we have the following known plugins.

Advanced Features

Plugin Development Guide

SkyWalking java agent supports plugin to extend the supported list. Please follow our Plugin Development Guide.

Test

If you are interested in plugin compatible tests or agent performance, see the following reports.