Merge remote-tracking branch 'origin/master'

This commit is contained in:
ascrutae 2016-04-18 18:56:52 +08:00
commit ac8aa1befc
7 changed files with 257 additions and 104 deletions

View File

@ -0,0 +1,95 @@
### 通过服务器日志的Server Health Collector Report分析运行情况
- Health Report会在服务器定时出现报告在两次报告时间段内的运行情况
1. ServerReceiver反映服务端接收数据的情况
1. DataBufferThread反映接收到的数据异步写入log文件的情况
1. PersistenceThread反映log文件中的内容读取情况
1. PersistenceThread extra:hbase反映log文件中的内容持久化到hbase的情况
1. RedisInspectorThread反映和redis的连接池检测情况
- Health Report示例如下
```
---------Server Health Collector Report---------
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:DataBufferThread_0(27)>
[INFO]DataBuffer flush data to local file:1460445849010-a4ea1e20927b40d290ebd4f5f3e08705(t:1460598787106)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:DataBufferThread_1(28)>
[INFO]DataBuffer flush data to local file:1460445849012-0ec5a44474bc4969a9194fa1b1cadf73(t:1460598848608)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:DataBufferThread_2(29)>
[INFO]DataBuffer flush data to local file:1460445849012-4182e3d0205e48968b59fe9fbb0923b4(t:1460598668464)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:DataBufferThread_4(31)>
[INFO]DataBuffer flush data to local file:1460445849013-54216553363343fe8b39221a0691cf40(t:1460598788488)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:DataBufferThread_5(32)>
[INFO]DataBuffer flush data to local file:1460445849013-531a955690764a56ac0490db531bec10(t:1460598727104)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:DataBufferThread_6(33)>
[INFO]DataBuffer flush data to local file:1460445849014-e0163d8c8b8446d6812a11e89cd48b0e(t:1460598787722)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:DataBufferThread_7(34)>
[INFO]DataBuffer flush data to local file:1460445849014-340435a1dd9e49f088af039c2e9e85af(t:1460598787510)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:DataBufferThread_8(35)>
[INFO]DataBuffer flush data to local file:1460445849015-5dacc5f6fb38442eb484b50a240568df(t:1460598727508)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_0(15)>
[INFO]read 224 chars from local file:1460445849014-340435a1dd9e49f088af039c2e9e85af(t:1460598787534)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_0(15),extra:hbase>
[INFO]save 1 BuriedPointEntries.(t:1460598787549)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_1(16)>
[INFO]read 268 chars from local file:1460445849013-531a955690764a56ac0490db531bec10(t:1460598727121)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_1(16),extra:hbase>
[INFO]save 1 BuriedPointEntries.(t:1460598727129)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_4(19)>
[INFO]read 238 chars from local file:1460445849013-54216553363343fe8b39221a0691cf40(t:1460598788522)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_4(19),extra:hbase>
[INFO]save 1 BuriedPointEntries.(t:1460598788532)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_5(20)>
[INFO]read 526 chars from local file:1460445849014-e0163d8c8b8446d6812a11e89cd48b0e(t:1460598787770)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_5(20),extra:hbase>
[INFO]save 1 BuriedPointEntries.(t:1460598787775)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_6(21)>
[INFO]read 238 chars from local file:1460445849010-a4ea1e20927b40d290ebd4f5f3e08705(t:1460598787126)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_6(21),extra:hbase>
[INFO]save 1 BuriedPointEntries.(t:1460598787135)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_7(22)>
[INFO]read 583 chars from local file:1460445849012-4182e3d0205e48968b59fe9fbb0923b4(t:1460598668466)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_7(22),extra:hbase>
[INFO]save 1 BuriedPointEntries.(t:1460598668473)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_8(23)>
[INFO]read 819 chars from local file:1460445849015-5dacc5f6fb38442eb484b50a240568df(t:1460598727531)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_8(23),extra:hbase>
[INFO]save 2 BuriedPointEntries.(t:1460598727542)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_9(24)>
[INFO]read 462 chars from local file:1460445849012-0ec5a44474bc4969a9194fa1b1cadf73(t:1460598848648)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:PersistenceThread_9(24),extra:hbase>
[INFO]save 3 BuriedPointEntries.(t:1460598848757)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:RedisInspectorThread(65)>
[INFO]alarm redis connectted.(t:1460598845054)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:RegisterPersistenceThread(14)>
[INFO]flush memory register to file.(t:1460598848748)
id<SkyWalkingServer,M:host-10-1-241-17/61.50.248.117,P:18737,T:ServerReceiver(39)>
[INFO]DataBuffer reveiving data.(t:1460598845300)
------------------------------------------------
```

View File

@ -128,6 +128,7 @@ export SKYWALKING_RUN=true
# QA
- [SkyWalking SDK是否已经工作 Is SkyWalking SDK Running?](QA/IS_RUNNING.md)
- [tid在web-ui上无法查询. tid can't be search on web-ui](QA/TID_CANNOT_BE_SEARCH.md)
- [SkyWalking Server的运行情况. The status of SkyWalking Server](QA/SERVER_RUNNING_STAUTS.md)
# 源代码说明
* [追踪日志明细存储结构说明. the storage structure of tracking logs](skywalking-server/doc/hbase_table_desc.md)

View File

@ -1,81 +1,87 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>skywalking-sdk-plugin</artifactId>
<groupId>com.ai.cloud</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>skywalking-sdk-plugin</artifactId>
<groupId>com.ai.cloud</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>skywalking-spring-plugin</artifactId>
<packaging>jar</packaging>
<artifactId>skywalking-spring-plugin</artifactId>
<packaging>jar</packaging>
<name>spring-plugin</name>
<url>http://maven.apache.org</url>
<name>spring-plugin</name>
<url>http://maven.apache.org</url>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.8.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.ai.cloud</groupId>
<artifactId>skywalking-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.ai.cloud</groupId>
<artifactId>skywalking-auth</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>3.2.0.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>3.2.9.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.1.1</version>
<scope>test</scope>
</dependency>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.8.7</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.ai.cloud</groupId>
<artifactId>skywalking-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.4.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>3.2.0.RELEASE</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.ai.cloud</groupId>
<artifactId>skywalking-auth</artifactId>
<version>${project.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>3.2.0.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>3.2.9.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-dbcp2</artifactId>
<version>2.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.38</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
@ -93,24 +99,24 @@
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
<plugin>
<!-- 源码插件 -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<!-- 发布时自动将源码同时发布的配置 -->
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
</plugin>
<plugin>
<!-- 源码插件 -->
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<!-- 发布时自动将源码同时发布的配置 -->
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -9,19 +9,7 @@ public class TracingAspect {
public Object doTracing(ProceedingJoinPoint proceedingJoinPoint) throws Throwable {
LocalBuriedPointSender _sender = new LocalBuriedPointSender();
try {
StringBuilder viewPoint = new StringBuilder();
viewPoint.append(proceedingJoinPoint.getTarget().getClass().getName() + "." + proceedingJoinPoint.getSignature().getName() + "(");
boolean first = true;
for (Object arg : proceedingJoinPoint.getArgs()) {
if (!first) {
viewPoint.append(",");
} else {
first = false;
}
viewPoint.append(arg.getClass().getName());
}
viewPoint.append(")");
_sender.beforeSend(Identification.newBuilder().viewPoint(viewPoint.toString()).spanType(SpringBuriedPointType.instance()).build());
_sender.beforeSend(Identification.newBuilder().viewPoint(proceedingJoinPoint.getSignature().toString()).spanType(SpringBuriedPointType.instance()).build());
return proceedingJoinPoint.proceed();
} catch (Throwable e) {
_sender.handleException(e);

View File

@ -5,7 +5,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
//@Transactional
public class TestBean/* implements TestInterface*/ {
private String value;

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="error">
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<PatternLayout pattern="%d [%t](%F:%L) %-5level %logger{36} - %msg%n" />
</Console>
</Appenders>
<Loggers>
<Root level="error">
<AppenderRef ref="Console" />
</Root>
<logger name="com.ai.cloud.skywalking" level="debug">
<AppenderRef ref="Console" />
</logger>
</Loggers>
</Configuration>

View File

@ -0,0 +1,47 @@
#skyWalking用户ID
skywalking.user_id=123
#skyWalking应用编码
skywalking.application_code=test
#skywalking auth的环境变量名字
skywalking.auth_system_env_name=SKYWALKING_RUN
#skywalking数据编码
skywalking.charset=UTF-8
#是否打印数据
buriedpoint.printf=true
#埋点异常的最大长度
buriedpoint.max_exception_stack_length=4000
#业务字段的最大长度
buriedpoint.businesskey_max_length=300
#过滤异常
buriedpoint.exclusive_exceptions=java.lang.RuntimeException
#最大发送者的连接数阀比例
sender.connect_percent=100
#发送服务端配置
sender.servers_addr=127.0.0.1:34000
#最大发送的副本数量
sender.max_copy_num=2
#发送的最大长度
sender.max_send_length=20000
#当没有Sender时,尝试获取sender的等待周期
sender.retry_get_sender_wait_interval=2000
#是否开启发送消息
sender.is_off=false
#最大消费线程数
consumer.max_consumer=2
#消费者最大等待时间
consumer.max_wait_time=5
#发送失败等待时间
consumer.consumer_fail_retry_wait_interval=50
#每个Buffer的最大个数
buffer.buffer_max_size=18000
#Buffer池的最大长度
buffer.pool_size=5
#发送检查线程检查周期
senderchecker.check_polling_time=200