Operations 12 min read

Master SkyWalking: End‑to‑End Guide to Distributed Tracing, Setup & Monitoring

This tutorial walks through SkyWalking, an open‑source APM framework, explaining its features, architecture, how to install and configure the server and agents, persist data with MySQL, enable log collection, perform performance profiling, and set up alerting rules for robust distributed tracing.

Su San Talks Tech
Su San Talks Tech
Su San Talks Tech
Master SkyWalking: End‑to‑End Guide to Distributed Tracing, Setup & Monitoring

What is SkyWalking?

SkyWalking is a Chinese open‑source APM framework launched in 2015 by Wu Sheng and entered the Apache incubator in 2017. It supports Dubbo, Spring Cloud, Spring Boot, provides non‑intrusive bytecode‑enhancement agents, GRPC communication, JVM monitoring, alarm, and global call statistics.

How to choose between SkyWalking and Spring Cloud Sleuth + Zipkin?

SkyWalking offers bytecode‑enhancement for zero‑intrusion and richer UI and reporting features compared with the more invasive Zipkin approach.

SkyWalking architecture

It consists of four main components: Agent (collects trace data), OAP server (analysis, storage, query), UI (web console), and Storage (supports multiple back‑ends).

Server setup

Download the desired version (e.g., 8.7.0) from the official site, unzip and note the directory layout:

agent – client‑side agent jar

bin – startup scripts

config – configuration files

logs – OAP logs

oap‑libs – OAP dependencies

webapp – UI files

Configuration changes

Modify /config/application.yml to use Nacos as the registry and adjust Nacos settings. Change webapp/webapp.yml to set the UI port (e.g., 8888).

Start services

Run oapService.bat (or .sh) and webappService.bat, or use the provided startup.bat to launch both.

Client setup

Add the SkyWalking agent to each microservice via JVM arguments:

-javaagent:E:\springcloud\apache-skywalking-apm-es7-8.7.0\apache-skywalking-apm-bin-es7\agent\skywalking-agent.jar
-Dskywalking.agent.service_name=skywalking-product-service
-Dskywalking.collector.backend_service=127.0.0.1:11800

Ensure the agent JAR path contains no spaces or non‑ASCII characters.

Persisting data

By default SkyWalking stores data in memory; to use MySQL, change config/application.yml storage type to MySQL and add the JDBC driver JAR to oap‑libs. The tables are created automatically on startup.

Log monitoring

SkyWalking can collect logs from Logback (or Log4j). Add the apm-toolkit-logback-1.x dependency and a logback‑spring.xml configuration file as shown in the official documentation.

Performance profiling

Create an endpoint (e.g., /order/list) that sleeps for two seconds, then use the “Performance Profiling” module to trace the slow call and view the stack information.

Alerting

SkyWalking provides default alarm rules (e.g., average response time > 1 s). Rules are defined in config/alarm-settings.yml and can be extended with webhooks to send notifications via email, WeChat, or DingTalk.

Summary

This article introduced SkyWalking as a distributed tracing solution, covering server and client deployment, data persistence, log collection, performance analysis, and alert configuration.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

monitoringAPMAlertingDistributed TracingSkyWalking
Su San Talks Tech
Written by

Su San Talks Tech

Su San, former staff at several leading tech companies, is a top creator on Juejin and a premium creator on CSDN, and runs the free coding practice site www.susan.net.cn.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.