提交 ae1b0e3c 编写于 作者: P pengys5

Merge branch 'master' into feature/debugging

Sky Walking | [中文](https://github.com/wu-sheng/sky-walking/wiki/sky-walking-documents-zh-contents)
Sky Walking | [中文](README_ZH.md)
==========
<img src="https://sky-walking.github.io/page-resources/3.0/skywalking.png" alt="Sky Walking logo" height="90px" align="right" />
......@@ -10,13 +10,18 @@ Sky Walking | [中文](https://github.com/wu-sheng/sky-walking/wiki/sky-walking-
![license](https://img.shields.io/aur/license/yaourt.svg)
[![codebeat badge](https://codebeat.co/badges/579e4dce-1dc7-4f32-a163-c164eafa1335)](https://codebeat.co/projects/github-com-wu-sheng-sky-walking)
[![Join the chat at https://gitter.im/sky-walking/Lobby](https://badges.gitter.im/sky-walking/Lobby.svg)](https://gitter.im/sky-walking/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![OpenTracing-1.0 Badge](https://img.shields.io/badge/OpenTracing--1.0-enabled-blue.svg)](http://opentracing.io)
[![OpenTracing-1.x Badge](https://img.shields.io/badge/OpenTracing--1.x-enabled-blue.svg)](http://opentracing.io)
* Auto-instrumentation mechanism, **no need to CHANGE any application source code**. [Supported middlewares, frameworks and libraries](https://github.com/wu-sheng/sky-walking/wiki/3.1-supported-list).
* Explicit-instrumentation, as an [OpenTracing supported tracer](http://opentracing.io/documentation/pages/supported-tracers).
* Pure Java server implementation, with RESTful Web service.
* High performance streaming analysis.
* Auto instrumentation by javaagent, **no need to CHANGE any application source code**.
* High performance agent. Only increase extra **10%** cpu cost in 5000+ tps application, even **do not need to use sampling mechanism**, [check test reports](#test-reports).
* [Supported middlewares, frameworks and libraries](https://github.com/wu-sheng/sky-walking/wiki/3.2-supported-list).
* Manual instrumentation
* As an [OpenTracing supported tracer](http://opentracing.io/documentation/pages/supported-tracers)
* Use **@Trace** annotation for any methods you want to trace.
* Integrate traceId into logs for log4j, log4j2 and logback.
* Pure Java server implementation, provide RESTful and gRPC services. Compatibility with other language agents/SDKs.
* [How to uplink metrics and traces to collector?]()
* The UI released on [wu-sheng/sky-walking-ui](https://github.com/wu-sheng/sky-walking-ui)
......@@ -34,6 +39,10 @@ _In chronological order_
This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to wu.sheng@foxmail.com.
# Architecture
* Architecture graph for 3.2+
<img src="https://sky-walking.github.io/page-resources/3.2/architecture/3.2-architecture.jpg"/>
# Screenshots
- Topological graph of application clusters based on Spring Cloud.
<img src="https://sky-walking.github.io/page-resources/3.1/topological_graph.png?forceUpdate=0"/>
......@@ -47,6 +56,11 @@ This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDU
- Span detail.
<img src="https://sky-walking.github.io/page-resources/3.0/span.png" />
# Test reports
- Automatic integration test reports
- [Java Agent test report](https://github.com/sky-walking/agent-integration-test-report)
- Performance test reports
- [Java Agent test report](https://sky-walking.github.io/Agent-Benchmarks/)
# Document
* [WIKI](https://github.com/wu-sheng/sky-walking/wiki)
......
Sky Walking | [Engligh](README.md)
==========
<img src="https://sky-walking.github.io/page-resources/3.0/skywalking.png" alt="Sky Walking logo" height="90px" align="right" />
**SkyWalking 3**: 针对分布式系统的APM系统,也被称为分布式追踪系统
[![Build Status](https://travis-ci.org/wu-sheng/sky-walking.svg?branch=master)](https://travis-ci.org/wu-sheng/sky-walking)
[![Coverage Status](https://coveralls.io/repos/github/wu-sheng/sky-walking/badge.svg?branch=master&forceUpdate=2)](https://coveralls.io/github/wu-sheng/sky-walking?branch=master)
![license](https://img.shields.io/aur/license/yaourt.svg)
[![codebeat badge](https://codebeat.co/badges/579e4dce-1dc7-4f32-a163-c164eafa1335)](https://codebeat.co/projects/github-com-wu-sheng-sky-walking)
[![Join the chat at https://gitter.im/sky-walking/Lobby](https://badges.gitter.im/sky-walking/Lobby.svg)](https://gitter.im/sky-walking/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![OpenTracing-1.x Badge](https://img.shields.io/badge/OpenTracing--1.x-enabled-blue.svg)](http://opentracing.io)
* 自动java探针,**不需要修改应用程序源代码**
* 高性能探针,针对单实例5000tps的应用,在**不需要采样的情况下**,只增加**10%**的CPU开销。
* [中间件,框架与类库支持列表](https://github.com/wu-sheng/sky-walking/wiki/3.2-supported-list).
* 手动探针
* [使用OpenTracing手动探针API](http://opentracing.io/documentation/pages/supported-tracers)
* 使用 **@Trace** 标注追踪业务方法
* 将 traceId 集成到 log4j, log4j2 或 logback这些日志组件中
* 纯Java后端Collector实现,提供RESTful和gRPC接口。兼容接受其他语言探针发送数据
* [如何将探针的Metric和Trace数据上传到Collector?]()
* UI工程请查看 [wu-sheng/sky-walking-ui](https://github.com/wu-sheng/sky-walking-ui)
* 中文QQ群:392443393
# Contributors
_按首次加入时间排序_
* 吴晟 [**PMC Member**] [@wu-sheng](https://github.com/wu-sheng) Principle Engineer, 2012 Lab, Huawei.
* 张鑫 [**PMC Member**] [@ascrutae](https://github.com/ascrutae)
* 谭真 [@mircoteam](https://github.com/mircoteam) Advanced R&D Engineers, Creative & Interactive Group.
* 徐妍 [@TastySummer](https://github.com/TastySummer)
* 彭勇升 [**PMC Member**] [@pengys5](https://github.com/pengys5)
* 戴文
* 柏杨 [@bai-yang](https://github.com/bai-yang) Senior Engineer, Alibaba Group.
* 陈凤 [@trey03](https://github.com/trey03)
* [其他贡献者](https://github.com/wu-sheng/sky-walking/graphs/contributors)
This project adheres to the Contributor Covenant [code of conduct](CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code. Please report unacceptable behavior to wu.sheng@foxmail.com.
# Architecture
* 3.2+版本架构图
<img src="https://sky-walking.github.io/page-resources/3.2/architecture/3.2-architecture.jpg"/>
# Screenshots
- 追踪基于Spring Cloud的分布式系统,生成的拓扑截图
<img src="https://sky-walking.github.io/page-resources/3.1/topological_graph.png?forceUpdate=0"/>
- 追踪基于 dubbox 和 [motan](https://github.com/weibocom/motan)的分布式系统,生成的拓扑截图
<img src="https://sky-walking.github.io/page-resources/3.1/topological_graph_test_project.png?forceUpdate=0"/>
- 调用链查询
<img src="https://sky-walking.github.io/page-resources/3.1/trace_segment.png"/>
- Span信息查询
<img src="https://sky-walking.github.io/page-resources/3.0/span.png" />
# Test reports
- 自动化集成测试报告
- [Java探针测试报告](https://github.com/sky-walking/agent-integration-test-report)
- 性能测试报告
- [Java探针测试报告](https://sky-walking.github.io/Agent-Benchmarks/)
# Document
* [WIKI](https://github.com/wu-sheng/sky-walking/wiki)
......@@ -57,7 +57,7 @@ public class Config {
/**
* Collector service discovery REST service name
*/
public static String DISCOVERY_SERVICE_NAME = "/grpc/addresses";
public static String DISCOVERY_SERVICE_NAME = "/agentstream/grpc";
}
public static class Jvm {
......
......@@ -21,7 +21,7 @@ public class GRPCStreamServiceStatus {
/**
* @param maxTimeout max wait time, milliseconds.
*/
public void wait4Finish(long maxTimeout) {
public boolean wait4Finish(long maxTimeout) {
long time = 0;
while (!status) {
if (time > maxTimeout) {
......@@ -30,6 +30,7 @@ public class GRPCStreamServiceStatus {
try2Sleep(5);
time += 5;
}
return status;
}
/**
......
......@@ -28,6 +28,9 @@ public class TraceSegmentServiceClient implements BootService, IConsumer<TraceSe
private static final ILog logger = LogManager.getLogger(TraceSegmentServiceClient.class);
private static final int TIMEOUT = 30 * 1000;
private long lastLogTime;
private long segmentUplinkedCounter;
private long segmentAbandonedCounter;
private volatile DataCarrier<TraceSegment> carrier;
private volatile TraceSegmentServiceGrpc.TraceSegmentServiceStub serviceStub;
private volatile GRPCChannelStatus status = GRPCChannelStatus.DISCONNECT;
......@@ -39,6 +42,9 @@ public class TraceSegmentServiceClient implements BootService, IConsumer<TraceSe
@Override
public void boot() throws Throwable {
lastLogTime = System.currentTimeMillis();
segmentUplinkedCounter = 0;
segmentAbandonedCounter = 0;
carrier = new DataCarrier<TraceSegment>(CHANNEL_SIZE, BUFFER_SIZE);
carrier.setBufferStrategy(BufferStrategy.IF_POSSIBLE);
carrier.consume(this, 1);
......@@ -94,14 +100,27 @@ public class TraceSegmentServiceClient implements BootService, IConsumer<TraceSe
}
upstreamSegmentStreamObserver.onCompleted();
status.wait4Finish(TIMEOUT);
if (logger.isDebugEnable()) {
logger.debug("{} trace segments have been sent to collector.", data.size());
if (status.wait4Finish(TIMEOUT)) {
segmentUplinkedCounter += data.size();
}
} else {
if (logger.isDebugEnable()) {
logger.debug("{} trace segments have been abandoned, cause by no available channel.", data.size());
segmentAbandonedCounter += data.size();
}
printUplinkStatus();
}
private void printUplinkStatus() {
long currentTimeMillis = System.currentTimeMillis();
if (lastLogTime - currentTimeMillis > 30 * 1000) {
lastLogTime = currentTimeMillis;
if (segmentUplinkedCounter > 0) {
logger.debug("{} trace segments have been sent to collector.", segmentUplinkedCounter);
segmentUplinkedCounter = 0;
}
if (segmentAbandonedCounter > 0) {
logger.debug("{} trace segments have been abandoned, cause by no available channel.", segmentAbandonedCounter);
segmentAbandonedCounter = 0;
}
}
}
......
log4j=org.skywalking.apm.toolkit.activation.log.log4j.v1.x.TraceIdPatternConverterActivation
\ No newline at end of file
toolkit-log4j=org.skywalking.apm.toolkit.activation.log.log4j.v1.x.TraceIdPatternConverterActivation
log4j2=org.skywalking.apm.toolkit.activation.log.log4j.v2.x.Log4j2OutputAppenderActivation
\ No newline at end of file
toolkit-log4j2=org.skywalking.apm.toolkit.activation.log.log4j.v2.x.Log4j2OutputAppenderActivation
logback=org.skywalking.apm.toolkit.activation.log.logback.v1.x.LogbackPatternConverterActivation
\ No newline at end of file
toolkit-logback=org.skywalking.apm.toolkit.activation.log.logback.v1.x.LogbackPatternConverterActivation
opentracing=org.skywalking.apm.toolkit.activation.opentracing.tracer.SkywalkingTracerActivation
opentracing=org.skywalking.apm.toolkit.activation.opentracing.span.SkywalkingSpanActivation
opentracing=org.skywalking.apm.toolkit.activation.opentracing.continuation.SkywalkingContinuationActivation
toolkit-opentracing=org.skywalking.apm.toolkit.activation.opentracing.tracer.SkywalkingTracerActivation
toolkit-opentracing=org.skywalking.apm.toolkit.activation.opentracing.span.SkywalkingSpanActivation
toolkit-opentracing=org.skywalking.apm.toolkit.activation.opentracing.continuation.SkywalkingContinuationActivation
trace-annotation=org.skywalking.apm.toolkit.activation.trace.ActiveSpanTagActivation
trace-annotation=org.skywalking.apm.toolkit.activation.trace.TraceAnnotationActivation
trace-context=org.skywalking.apm.toolkit.activation.trace.TraceContextActivation
toolkit-trace=org.skywalking.apm.toolkit.activation.trace.ActiveSpanTagActivation
toolkit-trace=org.skywalking.apm.toolkit.activation.trace.TraceAnnotationActivation
toolkit-trace=org.skywalking.apm.toolkit.activation.trace.TraceContextActivation
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册