This article is more than one year old. Older articles may contain outdated content. Check that the information in the page has not become incorrect since its publication.
Apache Skywalking (Incubator) is an APM system designed for microservice architecture and cloud-native architecture systems that supports distributed tracing. Apache Skywalking (Incubator) collects application call chain information by loading probes and analyzes the collected call chain information to generate relationships and service metrics between applications and services. Currently, Apache Skywalking (Incubating) supports multiple languages, including Java, .Net Core, Node.js, and Go.
Skywalking currently supports dissecting the operation of distributed systems from six visualization dimensions. The overview view provides a global view of applications and components, including the number of components and applications, alarm fluctuations, slow service lists, and application throughput; the topology map shows the entire application’s topology based on application dependencies; the application view shows upstream and downstream relationships, TopN services, JVM-related information, and corresponding host information from the perspective of a single application. The service view focuses on the operating status of a single service entry and its upstream and downstream dependencies, helping users optimize and monitor individual services; the call chain shows all points of interest along with the execution duration of each point for a single request; the alarm view provides real-time alerts for applications, servers, and services based on configured thresholds.
The Dubbo sample program has been uploaded to the Github repository for your convenience.
Service interface:
package org.apache.skywalking.demo.interfaces;
public interface HelloService {
String sayHello(String name);
}
package org.apache.skywalking.demo.provider;
@Service(version = "${demo.service.version}",
application = "${dubbo.application.id}",
protocol = "${dubbo.protocol.id}",
registry = "${dubbo.registry.id}", timeout = 60000)
public class HelloServiceImpl implements HelloService {
public String sayHello(String name) {
LockSupport.parkNanos(TimeUnit.SECONDS.toNanos(1));
return "Hello, " + name;
}
}
package org.apache.skywalking.demo.consumer;
@RestController
public class ConsumerController {
private static int COUNT = 0;
@Reference(version = "${demo.service.version}",
application = "${dubbo.application.id}",
url = "dubbo://localhost:20880", timeout = 60000)
private HelloService helloService;
@GetMapping("/sayHello/{name}")
public String sayHello(@PathVariable(name = "name") String name) {
if ((COUNT++) % 3 == 0){
throw new RuntimeException();
}
LockSupport.parkNanos(TimeUnit.SECONDS.toNanos(2));
return helloService.sayHello(name);
}
}
Apache Skywalking (Incubator) provides two deployment modes: single-node mode and cluster mode. Below are the deployment steps for single-node mode; for details on cluster mode, refer to the documentation.
cluster.name
to CollectorDBCluster
. This name must match the collector configuration file.network.host
, changing its value to 0.0.0.0
.bin/startup.sh
command to start the Skywalking Collector.Before starting the sample program, execute the compile and package command:
./mvnw clean package
java -jar -javaagent:$AGENT_PATH/skywalking-agent.jar -Dskywalking.agent.application_code=dubbo-provider -Dskywalking.collector.servers=localhost:10800 dubbo-provider/target/dubbo-provider.jar
java -jar -javaagent:$AGENT_PATH/skywalking-agent.jar -Dskywalking.agent.application_code=dubbo-consumer -Dskywalking.collector.servers=localhost:10800 dubbo-consumer/target/dubbo-consumer.jar
curl http://localhost:8080/sayHello/test
JVM Information
Service Consumer:
Service Provider:
Span Information: