<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ??碼云GVP開源項目 12k star Uniapp+ElementUI 功能強大 支持多語言、二開方便! 廣告
                # OpenTracing [OpenTracing](https://opentracing.io/) 是 CNCF 提出的分布式追蹤的標準,它提供用廠商中立的 API,并提供 Go、Java、JavaScript、Python、Ruby、PHP、Objective-C、C++ 和 C# 這九種語言的庫。 目前支持 Tracer 包括 Zipkin、Skywalking、Jaeger 等,支持的框架包括 gRPC、MOTAN、django、Flask、Sharding-JDBC 等,詳見 [OpenTracing 官網](https://opentracing.io/)。 Jaeger 是遵循 OpenTracing 的一種實現。 ![Jaeger UI](https://ws4.sinaimg.cn/large/006tNbRwly1fwjg48fh7xj31kw0wedrg.jpg) 關于 OpenTracing 的詳細約定請參考: - [OpenTracing 語義規范(Semantic Specification)](https://github.com/opentracing/specification/blob/master/specification.md) - [OpenTracing 語義約定(Semantic Conventions)](https://github.com/opentracing/specification/blob/master/semantic_conventions.md) ## 基本術語 如下是 OpenTracing 中定義的基本術語。 **Trace** Trace 通常指一次完整的調用鏈。如上文中的 Jaeger UI 截圖就是 Istio 官方提供的 [Bookinfo 示例](https://istio.io/zh/docs/examples/bookinfo/) 的追蹤中對 `productpage` 的調用鏈分析。 **Span** 每個 trace 都由一系列 Span 組成,一個 span 可以理解為兩個微服務之間的調用,如同 Chrome 檢查器中查看網絡訪問瀑布一樣。 ![Chrome Inspector](https://ws2.sinaimg.cn/large/006tNbRwly1fwjkfbvfluj30y70hf0y9.jpg) 根據 OpenTracing 的規格約定,每個 Span 都要包含以下狀態: - **操作名稱**:可以是訪問的一個 URL。必填。例如 `localhost:8808/`。 - **起/止時間戳**:也可以使用起始時間和持續時間來表示。必填。例如 `1540273832696773`。 - **Tags**:一組鍵值對集合,[Semantic Conventions](https://github.com/opentracing/specification/blob/master/semantic_conventions.md) 有一些常用約定。必填。例如 `http.protocol`。 - **Logs**:一組鍵值對集合,用于記錄調用日志。可選填。 - **SpanContext**:在進程間通信時攜帶的 span 信息,指整個 trace。 **示例** 下面是 Jaeger 收集的來自 [Bookinfo 示例](https://istio.io/zh/docs/examples/bookinfo/) 中的 `productpage` 的調用鏈追蹤數據。 ```json { "data": [ { "traceID": "aaccbe962478cf93", "spans": [ { "traceID": "aaccbe962478cf93", "spanID": "fa36a9cbd60b4ae5", "operationName": "details.default.svc.cluster.local:9080/*", "references": [ { "refType": "CHILD_OF", "traceID": "aaccbe962478cf93", "spanID": "2" } ], "startTime": 1540273832696773, "duration": 8171, "tags": [ { "key": "component", "type": "string", "value": "proxy" }, { "key": "node_id", "type": "string", "value": "sidecar~172.33.5.11~productpage-v1-8584c875d8-4jgwg.default~default.svc.cluster.local" } ... ], "logs": [], "processID": "p1", "warnings": null }, ... ], "processes": { "p1": { "serviceName": "productpage", "tags": [ { "key": "ip", "type": "string", "value": "172.33.5.11" } ] }, ... }, "warnings": null } ], "total": 0, "limit": 0, "offset": 0, "errors": null } ``` 在開發應用時需要使用兼容 OpenTracing API 的 Tracing 實現庫,例如 [Jaeger](https://www.jaegertracing.io) 來實現自動的分布式追蹤。參考[在 Istio 中使用分布式追蹤](https://istio.io/zh/docs/tasks/telemetry/distributed-tracing/)。 ## 參考 - [OpenTracing 官方網站](https://opentracing.io/) - [OpenTracing 語義規范(Semantic Specification)](https://github.com/opentracing/specification/blob/master/specification.md) - [OpenTracing 語義約定(Semantic Conventions)](https://github.com/opentracing/specification/blob/master/semantic_conventions.md) - [開放分布式追蹤(OpenTracing)入門與 Jaeger 實現](https://yq.aliyun.com/articles/514488#19)
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看