Before you can view the trace data of your application in the Tracing Analysis console, you must use a client to submit the trace data to Tracing Analysis. This topic shows how to use SkyWalking to report the data of Java applications.
Prerequisites
- SkyWalking 6.X.X or later is downloaded from SkyWalking download page. We recommend that you download the latest stable version. The decompressed folder Agent is placed in a directory that can be accessed by Java processes.
- All plug-ins are saved in the
/plugins
directory. If you add a plug-in to the directory during startup, the plug-in takes effect. If you delete a plug-in from the directory, the plug-in becomes ineffective. By default, log files are saved in the/logs
directory.
- Log on to the Tracing Analysis console.
- In the left-side navigation pane, click Cluster Configurations. Then, click the Access point information tab.
- In the top navigation bar, select a region. In the Cluster Information section, turn on Show Token.
- In the Client section, click SkyWalking.
Obtain an endpoint of SkyWalking in the Related Information column of the table in the lower part.
Note If your application is deployed in an Alibaba Cloud production environment, use a private endpoint. Otherwise, use a public endpoint.
Background information
SkyWalking is a popular application performance monitoring (APM) service developed in China. SkyWalking is designed for microservices, cloud-native architectures, and containers, such as Docker, Kubernetes, and Mesos. SkyWalking is also a distributed tracing system.
To use SkyWalking to report Java application data to the Tracing Analysis console, you must first instrument the application. SkyWalking not only provides auto-instrument agents such as Dubbo, gRPC, JDBC, OkHttp, Spring, Tomcat, Struts, and Jedis, but also allows you to manually instrument applications. This topic shows how to automatically instrument an application.

Use SkyWalking to automatically instrument a Java application
- Open the
config/agent.config
file and configure an endpoint and a token:Important Replace<endpoint>
with the endpoint of the region where the SkyWalking client resides. Replace<auth-token>
with the authentication token of the client. You can obtain the endpoint and the authentication token on the Overview page in the Tracing Analysis console. For more information, see the Prerequisites topic.collector.backend_service=<endpoint> agent.authentication=<auth-token>
- Use one of the following methods to set the service name of the application: Important Replace
<ServiceName>
with your application name. If you use both of the following methods, only the second method that adds a parameter to the startup command takes effect.Open the
config/agent.config
file and set the application name:agent.service_name=<ServiceName>
Add the -Dskywalking.agent.service_name parameter to the startup command of the application:
java -javaagent:<skywalking-agent-path> -Dskywalking.agent.service_name=<ServiceName> -jar yourApp.jar
- Use one of the following methods to specify the path to the Agent folder based on the runtime environment of the application: Note Replace
<skywalking-agent-path>
in the following sample code with the absolute path of the skywalking-agent.jar file in the Agent folder.Linux Tomcat 7 / Tomcat 8
Add the following content as the first line in the
tomcat/bin/catalina.sh
file:CATALINA_OPTS="$CATALINA_OPTS -javaagent:<skywalking-agent-path>"; export CATALINA_OPTS
Windows Tomcat 7 / Tomcat 8
Add the following content as the first line in the
tomcat/bin/catalina.bat
file:set "CATALINA_OPTS=-javaagent:<skywalking-agent-path>"
JAR File or Spring Boot
Add the -javaagent parameter to the startup command of the application.
Important The -javaagent parameter must be written before the -jar parameter.java -javaagent:<skywalking-agent-path> -jar yourApp.jar
Jetty
Add the following content to the
{JETTY_HOME}/start.ini
configuration file:--exec # Remove the number sign (#) to uncomment the code. -javaagent:<skywalking-agent-path>
- Restart the application.
FAQ
Q: Why am I unable to create an application after SkyWalking is properly connected to the server?

No data may be reported because sampling is enabled, the data is filtered, or the request for using Tracing Analysis is not triggered.