从菜鸟到调用链专家---PPT

之前,在公司内部做了一个PPT分享,这个分享是我在认真研究了zipkin的源码后的一些体会。

截图如下:

 

 

json文件内容见:

[
  {
    "traceId": "daaed0921874ebc3",
    "id": "daaed0921874ebc3",
    "name": "gateway->service1",
    "timestamp": 1476197067420000,
    "duration": 4694000,
    "annotations": [
      {
        "timestamp": 1476197067420000,
        "value": "cs",
        "endpoint": {
          "serviceName": "gateway",
          "ipv4": "1.2.3.110"
        }
      },
      {
        "timestamp": 1476197067527500,
        "value": "sr",
        "endpoint": {
          "serviceName": "service1",
          "ipv4": "1.2.3.111"
        }
      },
      {
        "timestamp": 1476197072006500,
        "value": "ss",
        "endpoint": {
          "serviceName": "service1",
          "ipv4": "1.2.3.111"
        }
      },
      {
        "timestamp": 1476197072114000,
        "value": "cr",
        "endpoint": {
          "serviceName": "gateway",
          "ipv4": "1.2.3.110"
        }
      }
    ],
    "binaryAnnotations": [
      {
        "key": "error",
        "value": "错误发生",
        "endpoint": {
          "serviceName": "gateway",
          "ipv4": "1.2.3.110"
        }
      },
      {
        "key": "http.status_code",
        "value": "200",
        "endpoint": {
          "serviceName": "service1",
          "ipv4": "1.2.3.111"
        }
      },
      {
        "key": "http.url",
        "value": "/service1",
        "endpoint": {
          "serviceName": "service1",
          "ipv4": "1.2.3.111"
        }
      },
      {
        "key": "http.url",
        "value": "http://localhost:8080/service1",
        "endpoint": {
          "serviceName": "gateway",
          "ipv4": "1.2.3.110"
        }
      },
      {
        "key": "任何你想上报的信息点",
        "value": "java.lang.Exception\r\n\tat zipkin_public_training.Zipkin.execute(Zipkin.java:76)\r\n\tat zipkin_public_training.Zipkin.step9(Zipkin.java:64)\r\n\tat zipkin_public_training.Zipkin.step8(Zipkin.java:59)\r\n\tat zipkin_public_training.Zipkin.step7(Zipkin.java:55)\r\n\tat zipkin_public_training.Zipkin.step6(Zipkin.java:51)\r\n\tat zipkin_public_training.Zipkin.step5(Zipkin.java:47)\r\n\tat zipkin_public_training.Zipkin.step4(Zipkin.java:43)\r\n\tat zipkin_public_training.Zipkin.step3(Zipkin.java:39)\r\n\tat zipkin_public_training.Zipkin.step2(Zipkin.java:35)\r\n\tat zipkin_public_training.Zipkin.step1(Zipkin.java:31)\r\n\tat zipkin_public_training.Zipkin.step0(Zipkin.java:27)\r\n\tat zipkin_public_training.Zipkin.main(Zipkin.java:23)\r\n",
        "endpoint": {
          "serviceName": "gateway",
          "ipv4": "1.2.3.110"
        }
      }
    ]
  },
  {
    "traceId": "daaed0921874ebc3",
    "id": "411d4c32c102a974",
    "name": "service1->service2",
    "parentId": "daaed0921874ebc3",
    "timestamp": 1476197069584500,
    "duration": 1168000,
    "annotations": [
      {
        "timestamp": 1476197069584500,
        "value": "cs",
        "endpoint": {
          "serviceName": "service1",
          "ipv4": "1.2.3.111"
        }
      },
      {
        "timestamp": 1476197069648500,
        "value": "sr",
        "endpoint": {
          "serviceName": "service2",
          "ipv4": "1.2.3.112"
        }
      },
      {
        "timestamp": 1476197070688500,
        "value": "ss",
        "endpoint": {
          "serviceName": "service2",
          "ipv4": "1.2.3.112"
        }
      },
      {
        "timestamp": 1476197070752500,
        "value": "cr",
        "endpoint": {
          "serviceName": "service1",
          "ipv4": "1.2.3.111"
        }
      }
    ],
    "binaryAnnotations": [
      {
        "key": "http.status_code",
        "value": "200",
        "endpoint": {
          "serviceName": "service2",
          "ipv4": "1.2.3.112"
        }
      },
      {
        "key": "http.url",
        "value": "http://localhost:8089/service2",
        "endpoint": {
          "serviceName": "service1",
          "ipv4": "1.2.3.111"
        }
      },
      {
        "key": "http.url",
        "value": "/service2",
        "endpoint": {
          "serviceName": "service2",
          "ipv4": "1.2.3.112"
        }
      }
    ]
  },
  {
    "traceId": "daaed0921874ebc3",
    "id": "7c0d7d897a858217",
    "name": "service1->service3",
    "parentId": "daaed0921874ebc3",
    "timestamp": 1476197070754500,
    "duration": 1216000,
    "annotations": [
      {
        "timestamp": 1476197070754500,
        "value": "cs",
        "endpoint": {
          "serviceName": "service1",
          "ipv4": "1.2.3.111"
        }
      },
      {
        "timestamp": 1476197070833000,
        "value": "sr",
        "endpoint": {
          "serviceName": "service3",
          "ipv4": "1.2.3.113"
        }
      },
      {
        "timestamp": 1476197071892000,
        "value": "ss",
        "endpoint": {
          "serviceName": "service3",
          "ipv4": "1.2.3.113"
        }
      },
      {
        "timestamp": 1476197071970500,
        "value": "cr",
        "endpoint": {
          "serviceName": "service1",
          "ipv4": "1.2.3.111"
        }
      }
    ],
    "binaryAnnotations": [
      {
        "key": "http.status_code",
        "value": "200",
        "endpoint": {
          "serviceName": "service3",
          "ipv4": "1.2.3.113"
        }
      },
      {
        "key": "http.url",
        "value": "/service3",
        "endpoint": {
          "serviceName": "service3",
          "ipv4": "1.2.3.113"
        }
      },
      {
        "key": "http.url",
        "value": "http://localhost:8090/service3",
        "endpoint": {
          "serviceName": "service1",
          "ipv4": "1.2.3.111"
        }
      }
    ]
  }
]

 

转载于:https://my.oschina.net/qiangzigege/blog/881780

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值