zoukankan      html  css  js  c++  java
  • skywalking请求头传输协议

    https://github.com/apache/skywalking/blob/master/docs/en/protocols/Skywalking-Cross-Process-Propagation-Headers-Protocol-v3.md

    SkyWalking Cross Process Propagation Headers Protocol

    • Version 3.0

    SkyWalking is more likely an APM system, rather than the common distributed tracing system. The Headers are much more complex than them in order to improving analysis performance of OAP. You can find many similar mechanism in other commercial APM systems. (Some are even much more complex than our's)

    Abstract

    SkyWalking Cross Process Propagation Headers Protocol v3 is also named as sw8 protocol, which is for context propagation.

    Standard Header Item

    The standard header should be the minimal requirement for the context propagation.

    • Header Name: sw8.
    • Header Value: 8 fields split by -. The length of header value should be less than 2k(default).

    Value format example, XXXXX-XXXXX-XXXX-XXXX

    Values

    Values include the following segments, all String type values are in BASE64 encoding.

    • Required(s)
    1. Sample. 0 or 1. 0 means context exists, but could(most likely will) ignore. 1 means this trace need to be sampled and send to backend.
    2. Trace Id. String(BASE64 encoded). Literal String and unique globally.
    3. Parent trace segment Id. String(BASE64 encoded). Literal String and unique globally.
    4. Parent span Id. Integer. Begin with 0. This span id points to the parent span in parent trace segment.
    5. Parent service. String(BASE64 encoded). The length should not be less or equal than 50 UTF-8 characters.
    6. Parent service instance. String(BASE64 encoded). The length should be less or equal than 50 UTF-8 characters.
    7. Parent endpoint. String(BASE64 encoded). Operation Name of the first entry span in the parent segment. The length should be less than 150 UTF-8 characters.
    8. Target address used at client side of this request. String(BASE64 encoded). The network address(not must be IP + port) used at client side to access this target service.
    • Sample values, 1-TRACEID-SEGMENTID-3-PARENT_SERVICE-PARENT_INSTANCE-PARENT_ENDPOINT-IPPORT

    Extension Header Item

    Extension header item is designed for the advanced features. It provides the interaction capabilities between the agents deployed in upstream and downstream services.

    • Header Name: sw8-x
    • Header Value: Split by -. The fields are extendable.

    Values

    The current value includes fields.

    1. Tracing Mode. empty, 0 or 1. empty or 0 is default. 1 represents all spans generated in this context should skip analysis, spanObject#skipAnalysis=true. This context should be propagated to upstream in the default, unless it is changed in the tracing process.
    2. The timestamp of sending at the client-side. This is used in async RPC such as MQ. Once it is set, the consumer side would calculate the latency between sending and receiving, and tag the latency in the span by using key transmission.latency automatically.
  • 相关阅读:
    Android Bitmap 常见的几个操作:缩放,裁剪,旋转,偏移
    vue.js 本地解决跨域
    VUE添加网站favicon.ico图标
    在mpvue引入flyio
    页面中加入地图map
    360校招——最后赢家(C++)
    奇安信校招——买口罩(c++)
    携程校招——携程海洋馆的海豚小宝宝(C++)
    阿里云Web应用托管服务,低成本建个人博客(wordpress和wiki.js)
    (嵌入式)工程模板的创建和MDK下配置开发STM32F103ZE
  • 原文地址:https://www.cnblogs.com/kebibuluan/p/14025231.html
Copyright © 2011-2022 走看看