利用 DeepFlow 为传统 APM 开启全栈追踪能力

<section id="nice" data-tool="mdnice编辑器" data-website="https://www.mdnice.com" style="word-spacing: 0px; word-break: break-word; word-wrap: break-word; font-size: 16px; line-height: 1.75em; letter-spacing: 0.5px; text-align: justify; color: #3f3f3f; padding: 0 8px 0 8px; font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei UI', 'Microsoft YaHei', Arial, sans-serif !important;"><p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">传统&nbsp;APM&nbsp;聚焦在代码层面,不具备全栈多维度无盲点看问题的能力,同时由于插码的阻碍往往难以覆盖所有微服务,DeepFlow&nbsp;依靠&nbsp;eBPF&nbsp;零代码修改采集全栈追踪数据并聚合生成了调用关系,可以增强传统&nbsp;APM&nbsp;的数据,大大缩短问题定界时间。对于已经使用传统&nbsp;APM&nbsp;工具的用户,可以考虑使用&nbsp;DeepFlow&nbsp;提供的&nbsp;API&nbsp;来增强应用依赖拓扑及调用追踪,以获得全栈数据追踪能力。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">本文以&nbsp;SkyWalking&nbsp;为例从落地实现角度来描述,如何将在传统&nbsp;APM&nbsp;中集成&nbsp;DeepFlow&nbsp;的数据,增强传统&nbsp;APM&nbsp;数据能力,&nbsp;主要从以下两个角度来:</p> <ul data-tool="mdnice编辑器" style="margin-top: 8px; padding-left: 25px; list-style-type: disc; color: #1d51ce; margin: 0; margin-bottom: 27px;"> <li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">依赖拓扑:增强查看某历史时间范围内服务(POD)到服务(POD)全栈路径拓扑以及全景上下游拓扑。</section></li><li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">调用链追踪:增强查看某个应用&nbsp;Span&nbsp;对应系统&nbsp;Span、网络&nbsp;Span&nbsp;时延消耗以及追踪未插码服务的能力。</section></li></ul> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">开启下文的阅读之前,需要对&nbsp;DeepFlow&nbsp;目前已有的数据及术语有了解,下文默认读者都有一定的认知。</p> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 34px; color: #1d51ce; margin-bottom: 0; margin-top: calc(2 * 27px);"><span class="prefix" style="display: none;"></span><span class="content">01</span><span class="suffix"></span></h1> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 18px; margin-top: 5px; margin-bottom: 32px; color: #1d51ce;"><span class="prefix" style="display: none;"></span><span class="content">全栈路径拓扑-界面</span><span class="suffix"></span></h1> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">增强查看某历史时间范围内服务(POD)到服务(POD)应用和网络指标量能力,可以快速回答在某一段时间内端到端路径是否存在瓶颈点,下面将结合&nbsp;Skywalking&nbsp;介绍产品&nbsp;UI&nbsp;界面如何融合</p> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">第一步:聚焦需要查看的路径(以下举例通过拓扑图路径点击,大家可以根据环境的实际情况来定义使用流程)</p> <figure data-tool="mdnice编辑器" style="margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 0; margin-bottom: 27px;"><img src="https://yunshan-guangzhou.oss-cn-beijing.aliyuncs.com/pub/pic/202303206418810baf391.png" alt="聚焦需要查看的路径" style="display: block; margin: 0 auto; max-width: 100%;"><figcaption style="margin-top: 5px; text-align: center; color: #888; font-size: 14px;">聚焦需要查看的路径</figcaption></figure> <figure data-tool="mdnice编辑器" style="margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 0; margin-bottom: 27px;"><img src="https://yunshan-guangzhou.oss-cn-beijing.aliyuncs.com/pub/pic/20230322641b129db53c1.jpg" alt="点击全栈路径拓扑" style="display: block; margin: 0 auto; max-width: 100%;"><figcaption style="margin-top: 5px; text-align: center; color: #888; font-size: 14px;">点击全栈路径拓扑</figcaption></figure> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">第二步:查看全栈路径拓扑(增强能力)</p> <figure data-tool="mdnice编辑器" style="margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 0; margin-bottom: 27px;"><img src="https://yunshan-guangzhou.oss-cn-beijing.aliyuncs.com/pub/pic/20230322641b129d0a8c2.jpg" alt="查看全栈路径拓扑" style="display: block; margin: 0 auto; max-width: 100%;"><figcaption style="margin-top: 5px; text-align: center; color: #888; font-size: 14px;">查看全栈路径拓扑</figcaption></figure> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">上图拓扑中每一个节点都对应一个统计位置(tap_side),<span class="footnote-word" style="font-weight: bold; color: #3f3f3f;">统计位置的说明参考&nbsp;DeepFlow&nbsp;官网的线上文档</span><sup class="footnote-ref" style="line-height: 0; font-weight: bold; color: #3f3f3f;">[1]</sup>,以<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">客户端容器节点</code>举例说明具体的含义,表达是&nbsp;cartservice&nbsp;服务访问&nbsp;redis-cart&nbsp;服务,在&nbsp;cartservice&nbsp;对应&nbsp;POD&nbsp;所在的容器节点上采集到的访问数据,然后聚合的指标量。上图查看的指标量为<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">响应时延</code>,不难看出瓶颈在服务端容器网络,判断过程如下:</p> <ul data-tool="mdnice编辑器" style="margin-top: 8px; padding-left: 25px; list-style-type: disc; color: #1d51ce; margin: 0; margin-bottom: 27px;"> <li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">客户端时延:④=204.31ms,为请求服务端的总时延,由以下几部分组成 <ul style="margin-top: 8px; padding-left: 25px; color: #1d51ce; margin: 0; margin-bottom: 27px; list-style-type: square;"> <li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">客户端容器网络:路径①(也就是⑤-④),图中所示为38.14us</section></li><li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">云网络:路径②(也就是⑥-⑤),图中所示为273.13us</section></li><li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">服务端容器网络:路径③(也就是⑦-⑥),图中所示为204.25ms</section></li><li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">服务端:即图中⑦,为372.83us</section></li></ul> </section></li></ul> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 34px; color: #1d51ce; margin-bottom: 0; margin-top: calc(2 * 27px);"><span class="prefix" style="display: none;"></span><span class="content">02</span><span class="suffix"></span></h1> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 18px; margin-top: 5px; margin-bottom: 32px; color: #1d51ce;"><span class="prefix" style="display: none;"></span><span class="content">全栈路径拓扑-API</span><span class="suffix"></span></h1> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">结合&nbsp;API&nbsp;看看如何实现,DeepFlow&nbsp;的所有数据均可通过&nbsp;SQL&nbsp;API&nbsp;获取。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">调用方输入<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">客户端名称</code>、<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">服务端名称</code>、<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">指标量</code>以及<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">时间范围</code>作为&nbsp;API&nbsp;的搜索条件即可获得<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">全栈路径拓扑</code>数据。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">第一步:获取&nbsp;Skywalking&nbsp;路径的<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">客户端服务及服务端名称</code>,根据需求明确需要查看的<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">指标量</code>及查看的<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">时间范围</code></p> <figure data-tool="mdnice编辑器" style="margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 0; margin-bottom: 27px;"><img src="https://yunshan-guangzhou.oss-cn-beijing.aliyuncs.com/pub/pic/20230322641b129784761.jpg" alt="Skywalking&nbsp;输入" style="display: block; margin: 0 auto; max-width: 100%;"><figcaption style="margin-top: 5px; text-align: center; color: #888; font-size: 14px;">Skywalking&nbsp;输入</figcaption></figure> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">第二步:查询&nbsp;DeepFlow&nbsp;获取应用/网络统计位置的数据,<span class="footnote-word" style="font-weight: bold; color: #3f3f3f;">SQL&nbsp;调用参考&nbsp;DeepFlow&nbsp;官网的线上文档</span><sup class="footnote-ref" style="line-height: 0; font-weight: bold; color: #3f3f3f;">[2]</sup></p> <pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; color: #376bb4; background-color: #f3f3f3; padding-top: 15px; background: #282c34; border-radius: 5px;">SELECT&nbsp;Avg(`request`),&nbsp;/*&nbsp;需要查看的指标量&nbsp;*/&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pod_service_0,&nbsp;&nbsp;/*&nbsp;客户端服务名称,客户端为&nbsp;POD,则替换为&nbsp;pod_0&nbsp;*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tap_side,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pod_service_1&nbsp;/*&nbsp;服务端服务名称,服务端为&nbsp;POD,则替换为&nbsp;pod_1&nbsp;*/<br>FROM&nbsp;vtap_app_edge_port&nbsp;&nbsp;/*&nbsp;查看应用指标使用&nbsp;vtap_app_edge_port;查看网络指标切换到&nbsp;vtap_flow_edge_port&nbsp;*/<br>WHERE&nbsp;time&gt;=1678760220&nbsp;AND&nbsp;time&lt;=1678762020&nbsp;AND&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pod_service_0=<span class="hljs-string" style="color: #98c379; line-height: 26px;">'deepflow-server'</span>&nbsp;AND&nbsp;&nbsp;/*&nbsp;过滤客户端&nbsp;*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pod_service_1=<span class="hljs-string" style="color: #98c379; line-height: 26px;">'deepflow-server'</span>&nbsp;&nbsp;&nbsp;/*&nbsp;过滤服务端&nbsp;*/<br>GROUP&nbsp;BY&nbsp;pod_service_0,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tap_side,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pod_service_1,<br></code></pre> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">第三步:根据返回数据绘制拓扑图</p> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">每个&nbsp;tap_side&nbsp;对应一个节点,节点根据&nbsp;<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">c-app/app/c-p/c/c-nd/c-hv/c-gw-hv/c-gw/local/rest/s-gw/s-gw-hv/s-hv/s-nd/s/s-p/s-app</code>&nbsp;从左到右排序,每个节点独立显示<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">指标数据</code>。</p> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 34px; color: #1d51ce; margin-bottom: 0; margin-top: calc(2 * 27px);"><span class="prefix" style="display: none;"></span><span class="content">03</span><span class="suffix"></span></h1> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 18px; margin-top: 5px; margin-bottom: 32px; color: #1d51ce;"><span class="prefix" style="display: none;"></span><span class="content">全景上下游拓扑-界面</span><span class="suffix"></span></h1> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">增强某节点查看全景上下游拓扑的能力,可快速发现未插码范围内被谁访问了(比如追踪上游的&nbsp;Nginx&nbsp;网关、安全策略未防住的访问等等),以及自身访问了谁,下面也将结合&nbsp;Skywalking&nbsp;介绍产品&nbsp;UI&nbsp;界面如何融合</p> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">第一步:聚焦需要查看的节点(以下举例通过拓扑图节点点击,大家可以根据环境的实际情况来定义使用流程)</p> <figure data-tool="mdnice编辑器" style="margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 0; margin-bottom: 27px;"><img src="https://yunshan-guangzhou.oss-cn-beijing.aliyuncs.com/pub/pic/20230324641d30f785077.jpg" alt="点击全景上下游拓扑" style="display: block; margin: 0 auto; max-width: 100%;"><figcaption style="margin-top: 5px; text-align: center; color: #888; font-size: 14px;">点击全景上下游拓扑</figcaption></figure> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">第二步:查看全景上下游拓扑(增强能力)</p> <figure data-tool="mdnice编辑器" style="margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 0; margin-bottom: 27px;"><img src="https://yunshan-guangzhou.oss-cn-beijing.aliyuncs.com/pub/pic/20230324641d30ebca616.jpg" alt="查看全景上下游拓扑" style="display: block; margin: 0 auto; max-width: 100%;"><figcaption style="margin-top: 5px; text-align: center; color: #888; font-size: 14px;">查看全景上下游拓扑</figcaption></figure> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">上图为&nbsp;tikcet-web&nbsp;服务的全景上下游拓扑,其中&nbsp;①&nbsp;是未插码的&nbsp;ingress-nginx-controller&nbsp;服务,表明&nbsp;ticket-web&nbsp;服务对外都是通过&nbsp;ingress&nbsp;来访问的,其中&nbsp;②&nbsp;为未插码的&nbsp;kube-dns&nbsp;服务,经常访问服务慢,可能是因为&nbsp;DNS&nbsp;解析慢,而在应用拓扑是无法看出来此信息的。</p> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 34px; color: #1d51ce; margin-bottom: 0; margin-top: calc(2 * 27px);"><span class="prefix" style="display: none;"></span><span class="content">04</span><span class="suffix"></span></h1> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 18px; margin-top: 5px; margin-bottom: 32px; color: #1d51ce;"><span class="prefix" style="display: none;"></span><span class="content">全景上下游拓扑-API</span><span class="suffix"></span></h1> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">调用方输入<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">服务名称</code>、<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">指标量</code>以及<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">时间范围</code>作为&nbsp;API&nbsp;的搜索条件即可获得<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">全景上下游拓扑</code>数据,需要两次调用的&nbsp;DeepFlow&nbsp;API,分别获取到上游和下游的数据如下:</p> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">获取上游数据</p> <pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; color: #376bb4; background-color: #f3f3f3; padding-top: 15px; background: #282c34; border-radius: 5px;">SELECT&nbsp;Avg(`request`),&nbsp;/*&nbsp;需要查看的指标量&nbsp;*/&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pod_service_0,&nbsp;&nbsp;/*&nbsp;客户端服务名称,客户端为&nbsp;POD,则替换为&nbsp;pod_0&nbsp;*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tap_side,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pod_service_1&nbsp;/*&nbsp;服务端服务名称,服务端为&nbsp;POD,则替换为&nbsp;pod_1&nbsp;*/<br>FROM&nbsp;vtap_app_edge_port&nbsp;&nbsp;/*&nbsp;查看应用指标使用&nbsp;vtap_app_edge_port;查看网络指标切换到&nbsp;vtap_flow_edge_port&nbsp;*/<br>WHERE&nbsp;time&gt;=1678760220&nbsp;AND&nbsp;time&lt;=1678762020&nbsp;AND&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pod_service_1=<span class="hljs-string" style="color: #98c379; line-height: 26px;">'deepflow-server'</span>&nbsp;&nbsp;&nbsp;/*&nbsp;需要查看上游数据的服务&nbsp;*/<br>GROUP&nbsp;BY&nbsp;pod_service_0,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tap_side,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pod_service_1,<br></code></pre> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">获取下游数据</p> <pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; color: #376bb4; background-color: #f3f3f3; padding-top: 15px; background: #282c34; border-radius: 5px;">SELECT&nbsp;Avg(`request`),&nbsp;/*&nbsp;需要查看的指标量&nbsp;*/&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pod_service_0,&nbsp;&nbsp;/*&nbsp;客户端服务名称,客户端为&nbsp;POD,则替换为&nbsp;pod_0&nbsp;*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tap_side,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pod_service_1&nbsp;/*&nbsp;服务端服务名称,服务端为&nbsp;POD,则替换为&nbsp;pod_1&nbsp;*/<br>FROM&nbsp;vtap_app_edge_port&nbsp;&nbsp;/*&nbsp;查看应用指标使用&nbsp;vtap_app_edge_port;查看网络指标切换到&nbsp;vtap_flow_edge_port&nbsp;*/<br>WHERE&nbsp;time&gt;=1678760220&nbsp;AND&nbsp;time&lt;=1678762020&nbsp;AND&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pod_service_0=<span class="hljs-string" style="color: #98c379; line-height: 26px;">'deepflow-server'</span>&nbsp;&nbsp;&nbsp;/*&nbsp;需要查看下游数据的服务&nbsp;*/<br>GROUP&nbsp;BY&nbsp;pod_service_0,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tap_side,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;pod_service_1,<br></code></pre> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 34px; color: #1d51ce; margin-bottom: 0; margin-top: calc(2 * 27px);"><span class="prefix" style="display: none;"></span><span class="content">05</span><span class="suffix"></span></h1> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 18px; margin-top: 5px; margin-bottom: 32px; color: #1d51ce;"><span class="prefix" style="display: none;"></span><span class="content">调用链追踪-产品</span><span class="suffix"></span></h1> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">在开始介绍如何增强调用追踪的数据之前,先结合一张图说明一些后续要使用到的术语</p> <figure data-tool="mdnice编辑器" style="margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 0; margin-bottom: 27px;"><img src="https://yunshan-guangzhou.oss-cn-beijing.aliyuncs.com/pub/pic/20230322641b12997f6f0.jpg" alt="数据介绍图" style="display: block; margin: 0 auto; max-width: 100%;"><figcaption style="margin-top: 5px; text-align: center; color: #888; font-size: 14px;">数据介绍图</figcaption></figure> <ul data-tool="mdnice编辑器" style="margin-top: 8px; padding-left: 25px; list-style-type: disc; color: #1d51ce; margin: 0; margin-bottom: 27px;"> <li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">图中&nbsp;A&nbsp;表示应用&nbsp;Span(来源传统&nbsp;APM);S&nbsp;表示网络&nbsp;Span(来源&nbsp;DeepFlow);N&nbsp;表示网络&nbsp;Span(来源&nbsp;DeepFlow)</section></li><li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">图中黑色部分为发起全栈调用追踪的的应用&nbsp;Span,后续统称为&nbsp;<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">应用&nbsp;Span&nbsp;Y</code></section></li><li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">图中蓝色部分为通过&nbsp;<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">应用&nbsp;Span&nbsp;Y</code>&nbsp;追踪的路径中的系统和网络&nbsp;Span</section></li><li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">图中绿色部分为通过&nbsp;<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">应用&nbsp;Span&nbsp;Y</code>&nbsp;追踪的下游未插码的&nbsp;Span</section></li><li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">图中红色部分为通过&nbsp;<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">应用&nbsp;Span&nbsp;Y</code>&nbsp;追踪的上游未插码的&nbsp;Span</section></li></ul> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">接下来将分别来讨论上图中蓝色/绿色/红色部分如何基于&nbsp;SkyWalking&nbsp;产品做&nbsp;UI&nbsp;融合(注:以下产品&nbsp;UI&nbsp;部分仅为示意图):</p> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;"><strong style="font-weight: bold; color: #4e6cb4;">第一步:聚焦需要查看的应用&nbsp;Span</strong>(以下举例通过点击&nbsp;Span,大家可以根据环境的实际情况来定义使用流程)</p> <figure data-tool="mdnice编辑器" style="margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 0; margin-bottom: 27px;"><img src="https://yunshan-guangzhou.oss-cn-beijing.aliyuncs.com/pub/pic/2022090163106732aa4b4.jpg" alt="聚焦需要查看的路径" style="display: block; margin: 0 auto; max-width: 100%;"><figcaption style="margin-top: 5px; text-align: center; color: #888; font-size: 14px;">聚焦需要查看的路径</figcaption></figure> <figure data-tool="mdnice编辑器" style="margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 0; margin-bottom: 27px;"><img src="https://yunshan-guangzhou.oss-cn-beijing.aliyuncs.com/pub/pic/2023032064188109ae578.png" alt="点击全栈调用追踪" style="display: block; margin: 0 auto; max-width: 100%;"><figcaption style="margin-top: 5px; text-align: center; color: #888; font-size: 14px;">点击全栈调用追踪</figcaption></figure> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;"><strong style="font-weight: bold; color: #4e6cb4;">第二步:查看全栈调用拓扑</strong>(增强能力)</p> <figure data-tool="mdnice编辑器" style="margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 0; margin-bottom: 27px;"><img src="https://yunshan-guangzhou.oss-cn-beijing.aliyuncs.com/pub/pic/20230322641b196f4ec5c.jpg" alt="查看全栈调用拓扑" style="display: block; margin: 0 auto; max-width: 100%;"><figcaption style="margin-top: 5px; text-align: center; color: #888; font-size: 14px;">查看全栈调用拓扑</figcaption></figure> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 34px; color: #1d51ce; margin-bottom: 0; margin-top: calc(2 * 27px);"><span class="prefix" style="display: none;"></span><span class="content">06</span><span class="suffix"></span></h1> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 18px; margin-top: 5px; margin-bottom: 32px; color: #1d51ce;"><span class="prefix" style="display: none;"></span><span class="content">调用链追踪-API</span><span class="suffix"></span></h1> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">接下来看下结合&nbsp;DeepFlow&nbsp;的&nbsp;SQL&nbsp;API&nbsp;如何实现,基于前面的术语介绍图,可知传统&nbsp;APM&nbsp;结合&nbsp;DeepFlow&nbsp;的数据来完成全栈调用追踪的能力,需要分蓝色、绿色和红色三部分来实现,接下来将分开介绍这三部分的数据实现。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">蓝色部分:<strong style="font-weight: bold; color: #4e6cb4;">根据&nbsp;应用&nbsp;Span&nbsp;的&nbsp;TraceID&nbsp;+&nbsp;SpanID&nbsp;追踪&nbsp;DeepFlow&nbsp;的系统&nbsp;Span&nbsp;和网络&nbsp;Span</strong>,可以方便的查看某次调用在系统和网络分布消耗的时延,快速定界问题。可以通过&nbsp;TraceID、SpanID&nbsp;作为搜索条件获取&nbsp;DeepFlow&nbsp;的系统和网络&nbsp;Span</p> <figure data-tool="mdnice编辑器" style="margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 0; margin-bottom: 27px;"><img src="https://yunshan-guangzhou.oss-cn-beijing.aliyuncs.com/pub/pic/20230322641b1299c784e.jpg" alt="蓝色部分-追踪图" style="display: block; margin: 0 auto; max-width: 100%;"><figcaption style="margin-top: 5px; text-align: center; color: #888; font-size: 14px;">蓝色部分-追踪图</figcaption></figure> <pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; color: #376bb4; background-color: #f3f3f3; padding-top: 15px; background: #282c34; border-radius: 5px;">SELECT&nbsp;response_duration,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;start_time,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;end_time,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resource_gl0_0,&nbsp;/*&nbsp;客户端&nbsp;*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resource_gl0_1,&nbsp;/*&nbsp;服务端&nbsp;*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tap_port_type,&nbsp;&nbsp;/*&nbsp;eBPF、NIC&nbsp;...&nbsp;*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tap_port,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/*&nbsp;NIC&nbsp;Name&nbsp;*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trace_id,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;span_id<br>FROM&nbsp;l7_flow_log<br>WHERE&nbsp;trace_id&nbsp;=&nbsp;<span class="hljs-string" style="color: #98c379; line-height: 26px;">'c5ad367da7ed41fc97921d91a0584bd8.63.16620935428909473'</span>&nbsp;AND<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;span_id&nbsp;=&nbsp;<span class="hljs-string" style="color: #98c379; line-height: 26px;">'e05ee7a06d674085a16dfea36ed11b98.169.16620935428971714-2'</span>&nbsp;AND&nbsp;/*&nbsp;非必须,精确搜索&nbsp;*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time&nbsp;&gt;=&nbsp;1662093572&nbsp;AND&nbsp;time&nbsp;&lt;=&nbsp;1662095372&nbsp;/*&nbsp;加速搜索&nbsp;*/<br></code></pre> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">此部分的细节部分可以参考<span class="footnote-word" style="font-weight: bold; color: #3f3f3f;">DeepFlow&nbsp;让&nbsp;SkyWalking&nbsp;分布式追踪无盲点</span><sup class="footnote-ref" style="line-height: 0; font-weight: bold; color: #3f3f3f;">[3]</sup>。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">红色部分:<strong style="font-weight: bold; color: #4e6cb4;">增强某个应用&nbsp;Span&nbsp;上游的&nbsp;Span,对于插码范围以外(之前)的部分</strong>,例如追踪出来从未插码的客户端&nbsp;Span</p> <figure data-tool="mdnice编辑器" style="margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 0; margin-bottom: 27px;"><img src="https://yunshan-guangzhou.oss-cn-beijing.aliyuncs.com/pub/pic/20230322641b129a7eae7.jpg" alt="红色部分-追踪原理解释图" style="display: block; margin: 0 auto; max-width: 100%;"><figcaption style="margin-top: 5px; text-align: center; color: #888; font-size: 14px;">红色部分-追踪原理解释图</figcaption></figure> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">对于这部分数据的追踪,需要分几个步骤来逐一进行关联</p> <ul data-tool="mdnice编辑器" style="margin-top: 8px; padding-left: 25px; list-style-type: disc; color: #1d51ce; margin: 0; margin-bottom: 27px;"> <li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">①&nbsp;根据<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">应用&nbsp;Span&nbsp;Y</code>&nbsp;的&nbsp;TraceID&nbsp;+&nbsp;SpanID&nbsp;追踪&nbsp;DeepFlow&nbsp;的系统&nbsp;Span,此时可能会得到多个系统&nbsp;Span,只需要获取与<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">应用&nbsp;Span&nbsp;Y</code>紧邻的<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">系统&nbsp;Span&nbsp;X</code>继续往下追踪即可(可通过总时延最长来判断)</section></li><li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">②&nbsp;获取<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">系统&nbsp;Span&nbsp;X</code>的&nbsp;syscall_trace_id_request&nbsp;作为其他系统&nbsp;Span&nbsp;的搜索条件,得到<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">系统&nbsp;Span&nbsp;Z</code></section></li></ul> <pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; color: #376bb4; background-color: #f3f3f3; padding-top: 15px; background: #282c34; border-radius: 5px;">SELECT&nbsp;response_duration,&nbsp;&nbsp;/*&nbsp;SELECT&nbsp;字段可以根据需求自定义即可*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l7_protocol,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enum(request_type),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;request_resource,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;process_kname_0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;process_kname_1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tap_side,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;req_tcp_seq,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp_tcp_seq,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enum(auto_instance_type_0)&nbsp;AS&nbsp;`client_Enum(auto_instance_type_0)`,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto_instance_0,&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enum(auto_instance_type_1)&nbsp;AS&nbsp;`server_Enum(auto_instance_type_1)`,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto_instance_1,&nbsp;<br>FROM&nbsp;l7_flow_log&nbsp;&nbsp;<br>WHERE&nbsp;time&gt;=1678764261&nbsp;AND&nbsp;/*追踪开始时间,建议设置比系统&nbsp;Span&nbsp;X&nbsp;的开始时间早&nbsp;3min*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time&lt;=1678767861&nbsp;AND&nbsp;/*追踪结束时间,建议设置比系统&nbsp;Span&nbsp;X&nbsp;的结束时间晚&nbsp;3min*//<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(syscall_trace_id_request=16787489195430278)&nbsp;/*&nbsp;16787489195430278&nbsp;为&nbsp;系统&nbsp;Span&nbsp;Y&nbsp;的&nbsp;syscall_trace_id_request&nbsp;*/<br>ORDER&nbsp;BY&nbsp;`end_time`&nbsp;<br><br></code></pre> <ul data-tool="mdnice编辑器" style="margin-top: 8px; padding-left: 25px; list-style-type: disc; color: #1d51ce; margin: 0; margin-bottom: 27px;"> <li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">③&nbsp;获取<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">系统&nbsp;Span&nbsp;Z</code>&nbsp;的&nbsp;req_tcp_seq/resp_tcp_seq&nbsp;作为其他系统&nbsp;Span&nbsp;和网络&nbsp;Span&nbsp;的搜索条件,得到<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">网络&nbsp;Span&nbsp;Z.1/Z.2&nbsp;以及系统&nbsp;Span&nbsp;Q</code>,此处逻辑特别注意:req_tcp_seq&nbsp;!=0&nbsp;&amp;&nbsp;resp_tcp_seq&nbsp;!=0&nbsp;则需要同时满足&nbsp;req_tcp_seq&nbsp;和&nbsp;resp_tcp_seq;如果其中一个为&nbsp;0,则任意满足一个即可</section></li></ul> <pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; color: #376bb4; background-color: #f3f3f3; padding-top: 15px; background: #282c34; border-radius: 5px;">SELECT&nbsp;response_duration,&nbsp;&nbsp;/*&nbsp;SELECT&nbsp;字段可以根据需求自定义即可*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l7_protocol,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enum(request_type),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;request_resource,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;process_kname_0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;process_kname_1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tap_side,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;req_tcp_seq,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp_tcp_seq,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enum(auto_instance_type_0)&nbsp;AS&nbsp;`client_Enum(auto_instance_type_0)`,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto_instance_0,&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enum(auto_instance_type_1)&nbsp;AS&nbsp;`server_Enum(auto_instance_type_1)`,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto_instance_1,&nbsp;<br>FROM&nbsp;l7_flow_log&nbsp;&nbsp;<br>WHERE&nbsp;time&gt;=1678764261&nbsp;AND&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time&lt;=1678767861&nbsp;AND&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(<span class="hljs-built_in" style="color: #e6c07b; line-height: 26px;">type</span>=2&nbsp;AND&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;req_tcp_seq=3575241005&nbsp;AND&nbsp;/*&nbsp;3575241005&nbsp;为系统&nbsp;Span&nbsp;Z&nbsp;的&nbsp;req_tcp_seq*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp_tcp_seq=995863176)&nbsp;/*&nbsp;995863176&nbsp;为系统&nbsp;Span&nbsp;Z&nbsp;的&nbsp;resp_tcp_seq*/<br>ORDER&nbsp;BY&nbsp;`end_time`&nbsp;<br></code></pre> <ul data-tool="mdnice编辑器" style="margin-top: 8px; padding-left: 25px; list-style-type: disc; color: #1d51ce; margin: 0; margin-bottom: 27px;"> <li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">④&nbsp;接下来可继续追踪<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">系统&nbsp;Span&nbsp;Q</code>&nbsp;的上游系统&nbsp;Span,这里将分两种情况,如果上游的系统&nbsp;Span&nbsp;与<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">系统&nbsp;Span&nbsp;Q</code>&nbsp;在同一个线程,则重复步骤&nbsp;[2]/[3]&nbsp;即可,如果在不同线程/进程中,目前仅支持网关设置了&nbsp;X-Request-ID&nbsp;的情况下继续追踪,获取<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">系统&nbsp;Span&nbsp;Q</code>的&nbsp;x-request-id&nbsp;作为查询其他系统&nbsp;Span&nbsp;和网络&nbsp;Span&nbsp;的搜索条件,得到其上游的<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">系统&nbsp;Span&nbsp;M</code></section></li></ul> <pre class="custom" data-tool="mdnice编辑器" style="margin-top: 10px; margin-bottom: 10px; border-radius: 5px; box-shadow: rgba(0, 0, 0, 0.55) 0px 2px 10px;"><span style="display: block; background: url(https://files.mdnice.com/user/3441/876cad08-0422-409d-bb5a-08afec5da8ee.svg); height: 30px; width: 100%; background-size: 40px; background-repeat: no-repeat; background-color: #282c34; margin-bottom: -7px; border-radius: 5px; background-position: 10px 10px;"></span><code class="hljs" style="overflow-x: auto; padding: 16px; display: -webkit-box; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; font-size: 12px; -webkit-overflow-scrolling: touch; color: #376bb4; background-color: #f3f3f3; padding-top: 15px; background: #282c34; border-radius: 5px;">SELECT&nbsp;response_duration,&nbsp;&nbsp;/*&nbsp;SELECT&nbsp;字段可以根据需求自定义即可*/<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;l7_protocol,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enum(request_type),<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;request_resource,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;process_kname_0,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;process_kname_1,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;tap_side,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;req_tcp_seq,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;resp_tcp_seq,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enum(auto_instance_type_0)&nbsp;AS&nbsp;`client_Enum(auto_instance_type_0)`,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto_instance_0,&nbsp;&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Enum(auto_instance_type_1)&nbsp;AS&nbsp;`server_Enum(auto_instance_type_1)`,&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;auto_instance_1,&nbsp;<br>FROM&nbsp;l7_flow_log&nbsp;&nbsp;<br>WHERE&nbsp;time&gt;=1678764261&nbsp;AND&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;time&lt;=1678767861&nbsp;AND&nbsp;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;x_request_id=6e903947-5ef0-4c63-91a8-a2a599171633&nbsp;/*&nbsp;6e903947-5ef0-4c63-91a8-a2a599171633&nbsp;为系统&nbsp;Span&nbsp;Q&nbsp;的&nbsp;x_request_id*/<br>ORDER&nbsp;BY&nbsp;`end_time`&nbsp;<br></code></pre> <ul data-tool="mdnice编辑器" style="margin-top: 8px; padding-left: 25px; list-style-type: disc; color: #1d51ce; margin: 0; margin-bottom: 27px;"> <li><section style="padding: 0; margin-top: 5px; margin-bottom: 5px; text-align: left; font-weight: 500; color: #3f3f3f; line-height: 1.6em; margin: 0;">⑤&nbsp;到此,已经根据上述步骤追踪得到所有的上游&nbsp;Span,接下来将确定父子关系,可直接根据总的响应时延,按从大到小降序排列即可</section></li></ul> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">绿色部分:<strong style="font-weight: bold; color: #4e6cb4;">增强某个应用&nbsp;Span&nbsp;下游的&nbsp;Span,对于插码范围以外(之后)的部分追踪</strong>,例如追踪出来未插码的服务端&nbsp;Span(DNS),此追踪过程与<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">红色部分</code>非常相似,仅步骤&nbsp;②&nbsp;中的<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">syscall_trace_id_request</code>换成<code style="font-size: 14px; word-wrap: break-word; padding: 2px 4px; border-radius: 4px; margin: 0 2px; font-family: Operator Mono, Consolas, Monaco, Menlo, monospace; word-break: break-all; color: #376bb4; background-color: #f3f3f3;">syscall_trace_id_response</code>即可,此处不在赘述。</p> <figure data-tool="mdnice编辑器" style="margin-top: 10px; display: flex; flex-direction: column; justify-content: center; align-items: center; margin: 0; padding: 0; margin-bottom: 27px;"><img src="https://yunshan-guangzhou.oss-cn-beijing.aliyuncs.com/pub/pic/20230322641b12980913c.jpg" alt="绿色部分-追踪图" style="display: block; margin: 0 auto; max-width: 100%;"><figcaption style="margin-top: 5px; text-align: center; color: #888; font-size: 14px;">绿色部分-追踪图</figcaption></figure> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 34px; color: #1d51ce; margin-bottom: 0; margin-top: calc(2 * 27px);"><span class="prefix" style="display: none;"></span><span class="content">07</span><span class="suffix"></span></h1> <h1 data-tool="mdnice编辑器" style="font-weight: bold; margin: 0; padding: 0; font-size: 18px; margin-top: 5px; margin-bottom: 32px; color: #1d51ce;"><span class="prefix" style="display: none;"></span><span class="content">什么是&nbsp;DeepFlow</span><span class="suffix"></span></h1> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;"><span class="footnote-word" style="font-weight: bold; color: #3f3f3f;">DeepFlow</span><sup class="footnote-ref" style="line-height: 0; font-weight: bold; color: #3f3f3f;">[4]</sup>&nbsp;是一款开源的高度自动化的可观测性平台,是为云原生应用开发者建设可观测性能力而量身打造的全栈、全链路、高性能数据引擎。DeepFlow&nbsp;使用&nbsp;eBPF、WASM、OpenTelemetry&nbsp;等新技术,创新的实现了&nbsp;AutoTracing、AutoMetrics、AutoTagging、SmartEncoding&nbsp;等核心机制,帮助开发者提升埋点插码的自动化水平,降低可观测性平台的运维复杂度。利用&nbsp;DeepFlow&nbsp;的可编程能力和开放接口,开发者可以快速将其融入到自己的可观测性技术栈中。</p> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">GitHub&nbsp;地址:https://github.com/deepflowys/deepflow</p> <p data-tool="mdnice编辑器" style="padding-top: 8px; padding-bottom: 8px; margin: 0; padding: 0; font-size: 16px; line-height: 1.6em; margin-bottom: 27px; color: #3f3f3f;">访问&nbsp;<span class="footnote-word" style="font-weight: bold; color: #3f3f3f;">DeepFlow&nbsp;Demo</span><sup class="footnote-ref" style="line-height: 0; font-weight: bold; color: #3f3f3f;">[5]</sup>,体验高度自动化的可观测性新时代。</p> <h3 class="footnotes-sep" data-tool="mdnice编辑器" style="margin-top: 30px; margin-bottom: 15px; font-weight: bold; margin: 0; padding: 0; font-size: 16px; color: #1d51ce; border-left: 3px solid #1d51ce; padding-left: 8px;"><span style="display: block;">参考资料</span></h3> <section class="footnotes" data-tool="mdnice编辑器" style="margin: 0; padding: 0;"> <span id="fn1" class="footnote-item" style="display: flex;"><span class="footnote-num" style="display: inline; width: 10%; background: none; font-size: 80%; opacity: 0.6; line-height: 26px; font-family: ptima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;">[1] </span><p style="padding-top: 8px; padding-bottom: 8px; margin-bottom: 27px; display: inline; font-size: 14px; width: 90%; padding: 0px; margin: 0; line-height: 26px; word-break: break-all; width: calc(100%-50); color: #1d51ce;">统计位置的说明参考&nbsp;DeepFlow&nbsp;官网的线上文档: <em style="font-style: italic; color: #888888;">https://deepflow.io/docs/zh/auto-metrics/metrics-without-instrumentation/</em></p> </span> <span id="fn2" class="footnote-item" style="display: flex;"><span class="footnote-num" style="display: inline; width: 10%; background: none; font-size: 80%; opacity: 0.6; line-height: 26px; font-family: ptima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;">[2] </span><p style="padding-top: 8px; padding-bottom: 8px; margin-bottom: 27px; display: inline; font-size: 14px; width: 90%; padding: 0px; margin: 0; line-height: 26px; word-break: break-all; width: calc(100%-50); color: #1d51ce;">SQL&nbsp;调用参考&nbsp;DeepFlow&nbsp;官网的线上文档: <em style="font-style: italic; color: #888888;">https://deepflow.io/docs/zh/server-integration/query/sql/</em></p> </span> <span id="fn3" class="footnote-item" style="display: flex;"><span class="footnote-num" style="display: inline; width: 10%; background: none; font-size: 80%; opacity: 0.6; line-height: 26px; font-family: ptima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;">[3] </span><p style="padding-top: 8px; padding-bottom: 8px; margin-bottom: 27px; display: inline; font-size: 14px; width: 90%; padding: 0px; margin: 0; line-height: 26px; word-break: break-all; width: calc(100%-50); color: #1d51ce;">DeepFlow&nbsp;让&nbsp;SkyWalking&nbsp;分布式追踪无盲点: <em style="font-style: italic; color: #888888;">https://deepflow.io/blog/007-skywalking-distributed-tracing-without-blind-spots/#0x1-DeepFlow-SQL-API</em></p> </span> <span id="fn4" class="footnote-item" style="display: flex;"><span class="footnote-num" style="display: inline; width: 10%; background: none; font-size: 80%; opacity: 0.6; line-height: 26px; font-family: ptima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;">[4] </span><p style="padding-top: 8px; padding-bottom: 8px; margin-bottom: 27px; display: inline; font-size: 14px; width: 90%; padding: 0px; margin: 0; line-height: 26px; word-break: break-all; width: calc(100%-50); color: #1d51ce;">DeepFlow: <em style="font-style: italic; color: #888888;">https://github.com/deepflowys/deepflow</em></p> </span> <span id="fn5" class="footnote-item" style="display: flex;"><span class="footnote-num" style="display: inline; width: 10%; background: none; font-size: 80%; opacity: 0.6; line-height: 26px; font-family: ptima-Regular, Optima, PingFangSC-light, PingFangTC-light, 'PingFang SC', Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;">[5] </span><p style="padding-top: 8px; padding-bottom: 8px; margin-bottom: 27px; display: inline; font-size: 14px; width: 90%; padding: 0px; margin: 0; line-height: 26px; word-break: break-all; width: calc(100%-50); color: #1d51ce;">DeepFlow&nbsp;Demo: <em style="font-style: italic; color: #888888;">https://deepflow.yunshan.net/docs/zh/install/overview/</em></p> </span> </section> </section>
点赞
收藏

评论区

加载中...

相关推荐

MySQL:[Err] 1292 - Incorrect datetime value: ‘0000-00-00 00:00:00‘ for column ‘CREATE_TIME‘ at row 1

文章目录问题用navicat导入数据时,报错:原因这是因为当前的MySQL不支持datetime为0的情况。解决修改sql\mode:sql\mode:SQLMode定义了MySQL应支持的SQL语法、数据校验等,这样可以更容易地在不同的环境中使用MySQL。全局s

Oracle 分组与拼接字符串同时使用

SELECTT.,ROWNUMIDFROM(SELECTT.EMPLID,T.NAME,T.BU,T.REALDEPART,T.FORMATDATE,SUM(T.S0)S0,MAX(UPDATETIME)CREATETIME,LISTAGG(TOCHAR(

MySQL部分从库上面因为大量的临时表tmp_table造成慢查询

背景描述Time:20190124T00:08:14.70572408:00User@Host:@Id:Schema:sentrymetaLast_errno:0Killed:0Query_time:0.315758Lock_

皕杰报表之UUID

​在我们用皕杰报表工具设计填报报表时,如何在新增行里自动增加id呢?能新增整数排序id吗?目前可以在新增行里自动增加id,但只能用uuid函数增加UUID编码,不能新增整数排序id。uuid函数说明:获取一个UUID,可以在填报表中用来创建数据ID语法:uuid()或uuid(sep)参数说明:sep布尔值,生成的uuid中是否包含分隔符'',缺省为

FLV文件格式

1.        FLV文件对齐方式FLV文件以大端对齐方式存放多字节整型。如存放数字无符号16位的数字300(0x012C),那么在FLV文件中存放的顺序是:|0x01|0x2C|。如果是无符号32位数字300(0x0000012C),那么在FLV文件中的存放顺序是:|0x00|0x00|0x00|0x01|0x2C。2.  

SpringBoot整合Redis乱码原因及解决方案

问题描述:springboot使用springdataredis存储数据时乱码rediskey/value出现\\xAC\\xED\\x00\\x05t\\x00\\x05问题分析:查看RedisTemplate类!(https://oscimg.oschina.net/oscnet/0a85565fa

利用 DeepFlow 为传统 APM 开启全栈追踪能力 - HelloWorld