Commit 9aab22c6 authored by 吴晟's avatar 吴晟
Browse files

Merge remote-tracking branch 'origin/1.0-beta-analysis-webui-future'

parents 7de4ff39 3d9fe881
Loading
Loading
Loading
Loading

index.html

0 → 100644
+72 −0
Original line number Diff line number Diff line
<!DOCTYPE html>
<html lang="en-us">
  <head>
    <meta charset="UTF-8">
    <title>Sky Walking</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="stylesheet" type="text/css" href="stylesheets/normalize.css" media="screen">
    <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" type="text/css" href="stylesheets/stylesheet.css" media="screen">
    <link rel="stylesheet" type="text/css" href="stylesheets/github-light.css" media="screen">
  </head>
  <body>
  	  <section class="page-header" style="background-image: url(images/backgroud.png);">
      <h1 class="project-name">Sky Walking</h1>
      <h2 class="project-tagline">Distributed Application Tracing System</h2>
      <a href="https://github.com/wu-sheng/sky-walking" class="btn">View on GitHub</a>
      <a href="https://github.com/wu-sheng/sky-walking/zipball/master" class="btn">Download .zip</a>
      <a href="sample-code/uiView.html" class="btn">UI Preview</a>
      <a href="sample-code/codeView.html" class="btn">How to trace</a>
    </section>

    <section class="main-content">
      <h3>
<a id="什么是sky-walking" class="anchor" href="#%E4%BB%80%E4%B9%88%E6%98%AFsky-walking" aria-hidden="true"><span class="octicon octicon-link"></span></a>什么是Sky Walking?</h3>

<p>他是一个面向分布式系统的全链路监控追踪系统。用于应用集群的分布式调用情况和服务性能监控,负载分布情况的分析系统。</p>

<h3>
<a id="为什么需要sky-walking" class="anchor" href="#%E4%B8%BA%E4%BB%80%E4%B9%88%E9%9C%80%E8%A6%81sky-walking" aria-hidden="true"><span class="octicon octicon-link"></span></a>为什么需要Sky Walking?</h3>
<p><img src="images/classicScene.jpeg"/></p>
<p>目前主流的应用系统或者互联网系统,都是由各种不同职责的系统构成的大规模集群(如上图所示),通过分布式调用(rest、webservice、dubbo、dubbox、消息等)的模式,支持前台系统。系统间关系复杂,无法预先设计与规划。调用链路繁多,通过日志分析难度很大。<br/>
<br/>
分布式系统的开发者和维护人员,希望在系统出现业务错误时,得到邮件通知,并能从全局角度追踪调用关系,而不用在庞大的分布式日志中,寻找关联关系和错误原因。<br/>
<br/>
从Google发表自己的Drapper分布式追踪系统的论文发表以来,wiki、淘宝、京东等各家国内外大型互联网公司,都研发了自己的全链路追踪系统。可见此系统在离散的分布式集群中的重要作用。</p>
<p>
另外,针对非分布式应用,应用的性能调优也是开发团队头疼问题,全链路监控可以针对应用的各种本地或远程调用,为提高执行效率提供依据。</p>

<h3>
<a id="sky-walking支持追踪哪些调用" class="anchor" href="#sky-walking%E6%94%AF%E6%8C%81%E8%BF%BD%E8%B8%AA%E5%93%AA%E4%BA%9B%E8%B0%83%E7%94%A8" aria-hidden="true"><span class="octicon octicon-link"></span></a>Sky Walking支持追踪哪些调用?</h3>

<p>Sky Walking已开放底层API的方式,支持对java程序的本地调用、远程调用(同步/异步)、多线程运行的追踪监控<br/>
为了方便使用,计划在初期,开发以下常用的插件,更方便的进行追踪监控<br/>
1.web调用<br/>
2.jdbc调用<br/>
3.dubbo/dubbox<br/>
4.Spring本地方法调用<br/>
5.公司内部封装的内部服务<br/>
6.应用可自行封装的各种调用</p>

<h3>
<a id="sky-walking目前的进展情况" class="anchor" href="#sky-walking%E7%9B%AE%E5%89%8D%E7%9A%84%E8%BF%9B%E5%B1%95%E6%83%85%E5%86%B5" aria-hidden="true"><span class="octicon octicon-link"></span></a>Sky Walking目前的进展情况?</h3>
<p><b>1.0-alpha2(on developing):</b><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.支持链路的识别,分析归类,汇总调用次数、成功率、QPS等指标<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.webui展现链路分析报告<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.log4j和log4j2扩展,能在日志中快速展现tid</p>
<p><b>1.0-alpha1(released):</b><br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;1.支持链路追踪、上下文传递、追踪日志持久化。<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;2.追踪插件支持web filter, JDBC(MySQL Driver, other driver extend api), dubbo, dubbox(2.8.4/below 2.8.3), apache httpclient(4.2/4.3), spring context<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;3.webui展现调用轨迹、耗时、状态等。<br/>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;4.支持异常调用的识别,并通过邮件告警<br/></p>


      <footer class="site-footer">
        <span class="site-footer-owner"><a href="https://github.com/wu-sheng/sky-walking">Sky Walking</a> is maintained by <a href="https://github.com/wu-sheng">吴晟</a><a href="https://github.com/ascrutae">张鑫</a><a href="https://github.com/tanzhen84">谭真</a>.</span>
      </footer>

    </section>

  
  </body>
</html>
+13 −0
Original line number Diff line number Diff line
<component name="libraryTable">
  <library name="Maven: com.alibaba:dubbox:2.8.4">
    <CLASSES>
      <root url="jar://$MAVEN_REPOSITORY$/com/alibaba/dubbox/2.8.4/dubbox-2.8.4.jar!/" />
    </CLASSES>
    <JAVADOC>
      <root url="jar://$MAVEN_REPOSITORY$/com/alibaba/dubbox/2.8.4/dubbox-2.8.4-javadoc.jar!/" />
    </JAVADOC>
    <SOURCES>
      <root url="jar://$MAVEN_REPOSITORY$/com/alibaba/dubbox/2.8.4/dubbox-2.8.4-sources.jar!/" />
    </SOURCES>
  </library>
</component>
 No newline at end of file
+37 −5
Original line number Diff line number Diff line
@@ -28,8 +28,8 @@ import java.util.List;
 */
public class CallChainMapperTest {

    //private static String ZK_QUORUM = "10.1.235.197,10.1.235.198,10.1.235.199";
    private static String ZK_QUORUM = "10.1.241.18,10.1.241.19,10.1.241.20";
    private static String ZK_QUORUM = "10.1.235.197,10.1.235.198,10.1.235.199";
    //    private static String ZK_QUORUM = "10.1.241.18,10.1.241.19,10.1.241.20";
    private static String ZK_CLIENT_PORT = "29181";
    private static String chain_Id = "1.0a2.1457436000002.860568c.21818.49.82";
//    private static String chain_Id = "1.0a2.1453429608422.2701d43.6468.56.1";
@@ -60,11 +60,39 @@ public class CallChainMapperTest {
        return entries;
    }

    public static List<ChainInfo> selectSpans() throws IOException, ParseException {
    @Test
    public void validateSummaryResult() throws IOException, ParseException {
        List<ChainInfo> chainInfoList = selectSpecificCallEntranceSpansOnSpecificCallTime("com.ai.aisse.core.service.impl.SynchAisseWorkDataServiceImpl.SynchAisseDataDel()", "2016-01-26/10:00:00", "2016-02-08/10:00:00");

        System.out.println("size :" + chainInfoList.size());
        Map<String, Integer> summaryResult = new HashMap<String, Integer>();
        for (ChainInfo chainInfo : chainInfoList) {
            String key = generateKey(chainInfo.getStartDate());
            Integer total = summaryResult.get(key);
            if (total == null){
                total = 0;
            }
            summaryResult.put(key, ++total);
        }

        for (Map.Entry<String, Integer> entry : summaryResult.entrySet()){
            System.out.println(entry.getKey() + "  " + entry.getValue());
        }

    }

    private String generateKey(long startDate) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(new Date(startDate));
        return calendar.get(Calendar.YEAR) + "-" + (calendar.get(Calendar.MONTH) + 1) + "-"
                + calendar.get(Calendar.DAY_OF_MONTH);
    }

    public static List<ChainInfo> selectSpecificCallEntranceSpansOnSpecificCallTime(String callEntrance, String startDate, String endDate) throws IOException, ParseException {
        List<ChainInfo> chainInfos = new ArrayList<ChainInfo>();
        Table table = connection.getTable(TableName.valueOf(HBaseTableMetaData.TABLE_CALL_CHAIN.TABLE_NAME));
        Scan scan = new Scan();
        scan.setTimeRange(new SimpleDateFormat("yyyy-MM-dd/HH:mm:ss").parse("2016-01-10/11:55:48").getTime(), new SimpleDateFormat("yyyy-MM-dd/HH:mm:ss").parse("2016-02-10/11:55:48").getTime());
        scan.setTimeRange(new SimpleDateFormat("yyyy-MM-dd/HH:mm:ss").parse(startDate).getTime(), new SimpleDateFormat("yyyy-MM-dd/HH:mm:ss").parse(endDate).getTime());
        ResultScanner resultScanner = table.getScanner(scan);
        Iterator<Result> resultIterator = resultScanner.iterator();
        while (resultIterator.hasNext()) {
@@ -80,8 +108,11 @@ public class CallChainMapperTest {
            } catch (Exception e) {
                continue;
            }
            // System.out.println(chainInfo.getCallEntrance());
            if (callEntrance.equalsIgnoreCase(chainInfo.getCallEntrance())) {
                chainInfos.add(chainInfo);
            }
        }

        return chainInfos;
    }
@@ -92,6 +123,7 @@ public class CallChainMapperTest {
            configuration = HBaseConfiguration.create();
            configuration.set("hbase.zookeeper.quorum", ZK_QUORUM);
            configuration.set("hbase.zookeeper.property.clientPort", ZK_CLIENT_PORT);
            configuration.set("hbase.rpc.timeout", "600000");
            connection = ConnectionFactory.createConnection(configuration);
        }

+1 −0
Original line number Diff line number Diff line
@@ -53,6 +53,7 @@
						</goals>
					</execution>
				</executions>
				<version>2.4</version>
			</plugin>
		</plugins>
	</build>
+69.8 KiB
Loading image diff...
Loading