<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Apache SkyWalking – Metrics</title>
    <link>/tags/metrics/</link>
    <description>Recent content in Metrics on Apache SkyWalking</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Thu, 30 Apr 2026 00:00:00 +0000</lastBuildDate>
    
	  <atom:link href="/tags/metrics/feed.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Blog: Monitoring WeChat and Alipay Mini Programs with SkyWalking</title>
      <link>/blog/2026-04-30-mini-program-monitoring-with-skywalking/</link>
      <pubDate>Thu, 30 Apr 2026 00:00:00 +0000</pubDate>
      <guid>/blog/2026-04-30-mini-program-monitoring-with-skywalking/</guid>
      <description>
        
        
        &lt;p&gt;Mini programs are a major part of the mobile experience in China, but the open-source observability ecosystem has long focused on web browsers and native apps. SkyWalking already covers browser (client-js), iOS, and the server side; mini programs and Android were the remaining gaps. With &lt;a href=&#34;https://github.com/SkyAPM/mini-program-monitor&#34;&gt;SkyAPM/mini-program-monitor&lt;/a&gt; joining the SkyWalking ecosystem, the mini-program half of that gap is closed — one SDK supports both WeChat and Alipay, and the matching OAP-side component IDs, MAL rules, and UI templates are merged on &lt;code&gt;main&lt;/code&gt; and will ship with 10.5.0.&lt;/p&gt;
&lt;p&gt;This post is for teams that already run a SkyWalking backend and want to bring their mini programs into the same observability stack. The interesting parts aren&amp;rsquo;t &lt;em&gt;that&lt;/em&gt; the project exists — they are how the data flows from a mini program to a SkyWalking dashboard, how the two platforms coexist, and what design trade-offs you should know about before rolling this out.&lt;/p&gt;
&lt;h2 id=&#34;data-path&#34;&gt;Data path&lt;/h2&gt;
&lt;p&gt;The SDK uses two protocols:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;OTLP HTTP&lt;/strong&gt; (error logs, performance metrics, request metrics) → OAP &lt;code&gt;/v1/logs&lt;/code&gt;, &lt;code&gt;/v1/metrics&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SkyWalking native&lt;/strong&gt; (distributed tracing segments, optional) → OAP &lt;code&gt;/v3/segments&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Why not a single protocol? OTLP already covers logs and metrics, so there&amp;rsquo;s no point reinventing native endpoints for those. But for tracing, OAP&amp;rsquo;s native &lt;code&gt;SegmentObject&lt;/code&gt; maps more cleanly onto SkyWalking&amp;rsquo;s trace model, and &lt;code&gt;sw8&lt;/code&gt; header propagation to the backend works without any conversion. So traces go native, everything else goes OTLP, and neither side has to translate.&lt;/p&gt;
&lt;p&gt;OTLP defaults to protobuf; JSON is available for debugging. The SDK has zero runtime dependencies.&lt;/p&gt;
&lt;h2 id=&#34;two-platforms-two-independent-layers-and-dashboards&#34;&gt;Two platforms, two independent Layers and dashboards&lt;/h2&gt;
&lt;p&gt;Many teams maintain a WeChat mini program and an Alipay mini program against a shared backend. Rather than collapsing them into a single tagged service, the design promotes each platform to its own Layer — &lt;code&gt;WECHAT_MINI_PROGRAM&lt;/code&gt; and &lt;code&gt;ALIPAY_MINI_PROGRAM&lt;/code&gt; — with its own dashboard set. The SDK tags every signal with a resource attribute &lt;code&gt;miniprogram.platform = wechat | alipay&lt;/code&gt; and assigns each platform its own component ID (WeChat = 10002, Alipay = 10003).&lt;/p&gt;
&lt;p&gt;On the OAP side, the MAL rule&amp;rsquo;s &lt;code&gt;filter&lt;/code&gt; routes data into the right Layer at ingest:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;metricPrefix&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;meter_wechat_mp&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;filter&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;{ tags -&amp;gt; tags.miniprogram_platform == &amp;#39;wechat&amp;#39; }&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The Alipay rule mirrors this with &lt;code&gt;&#39;alipay&#39;&lt;/code&gt;. The two rules are mutually exclusive — no double counting — and produce distinct metric prefixes (&lt;code&gt;meter_wechat_mp_*&lt;/code&gt; vs &lt;code&gt;meter_alipay_mp_*&lt;/code&gt;) that feed each Layer&amp;rsquo;s dashboards. Even when both platforms use the same &lt;code&gt;service.name&lt;/code&gt; (e.g. &lt;code&gt;mini-program-demo&lt;/code&gt;), the UI exposes two completely separate entry points.&lt;/p&gt;
&lt;h2 id=&#34;asymmetric-metric-semantics&#34;&gt;Asymmetric metric semantics&lt;/h2&gt;
&lt;p&gt;This is the design choice I want to highlight. WeChat&amp;rsquo;s base library exposes &lt;code&gt;PerformanceObserver&lt;/code&gt;, which gives you renderer-authoritative timings: app launch, first render, route navigation, script execution, sub-package load — all real measurements. Alipay&amp;rsquo;s base library doesn&amp;rsquo;t offer an equivalent, so the SDK falls back to lifecycle hooks: the &lt;code&gt;App.onLaunch → App.onShow&lt;/code&gt; delta is used as an approximation of launch time, and renderer-level timings simply aren&amp;rsquo;t available.&lt;/p&gt;
&lt;p&gt;So the two MAL rule sets are deliberately not the same:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;WeChat&lt;/strong&gt;: &lt;code&gt;app_launch_duration&lt;/code&gt;, &lt;code&gt;first_render_duration&lt;/code&gt;, &lt;code&gt;route_duration&lt;/code&gt;, &lt;code&gt;script_duration&lt;/code&gt;, &lt;code&gt;package_load_duration&lt;/code&gt;, &lt;code&gt;request_duration_percentile&lt;/code&gt;, &lt;code&gt;request_cpm&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Alipay&lt;/strong&gt;: &lt;code&gt;app_launch_duration&lt;/code&gt;, &lt;code&gt;first_render_duration&lt;/code&gt;, &lt;code&gt;request_duration_percentile&lt;/code&gt;, &lt;code&gt;request_cpm&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The Alipay &lt;code&gt;app_launch_duration&lt;/code&gt; is a lifecycle approximation and is not directly comparable to WeChat&amp;rsquo;s renderer timing — the dashboard tooltip says so explicitly. Putting the two numbers side by side is comparing two different measurement definitions.&lt;/p&gt;
&lt;h2 id=&#34;what-the-sdk-does&#34;&gt;What the SDK does&lt;/h2&gt;
&lt;p&gt;Four signals:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Errors&lt;/strong&gt; — JS exceptions, unhandled promise rejections, and &lt;code&gt;pageNotFound&lt;/code&gt; go out as OTLP logs, following the OTel &lt;code&gt;exception.*&lt;/code&gt; semantic conventions (&lt;code&gt;exception.type&lt;/code&gt;, &lt;code&gt;exception.stacktrace&lt;/code&gt;). Anything downstream that speaks OTLP — SkyWalking, OTel Collector, Grafana — recognizes them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Performance&lt;/strong&gt; — the metrics listed above. OTLP gauge.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Requests&lt;/strong&gt; — &lt;code&gt;wx.request&lt;/code&gt; / &lt;code&gt;my.request&lt;/code&gt; / &lt;code&gt;downloadFile&lt;/code&gt; / &lt;code&gt;uploadFile&lt;/code&gt; are reported as OTLP delta histograms, one batch per &lt;code&gt;flushInterval&lt;/code&gt; (default 5s). The &lt;code&gt;le&lt;/code&gt; bucket labels are already in milliseconds, and the MAL rule explicitly declares &lt;code&gt;MILLISECONDS&lt;/code&gt; to disable the default SECONDS→MS rescale. Failed requests (4xx / 5xx / timeout) additionally emit an error log so you can pivot from a dashboard to a concrete failure.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tracing (opt-in)&lt;/strong&gt; — when enabled, outbound requests get &lt;code&gt;sw8&lt;/code&gt; header injection, and the resulting segments stitch together with backend traces into one end-to-end view. Trace data goes out as SkyWalking &lt;code&gt;SegmentObject&lt;/code&gt;, not OTLP traces.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Two reliability and cardinality details worth calling out:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Persisting events on app hide.&lt;/strong&gt; Mini programs get killed by the framework after some time in background, and weak networks make in-flight events easy to lose. The SDK writes unsent events to &lt;code&gt;wx.setStorage&lt;/code&gt; / &lt;code&gt;my.setStorage&lt;/code&gt; on &lt;code&gt;onAppHide&lt;/code&gt; and restores them on the next launch.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Avoiding cardinality explosions.&lt;/strong&gt; Set &lt;code&gt;serviceInstance&lt;/code&gt; to the app version (e.g. &lt;code&gt;1.4.2&lt;/code&gt;), not a device ID — at a million DAU the device-ID dimension blows up the OAP instance index. For request paths, the SDK exposes &lt;code&gt;urlGroupRules&lt;/code&gt; regex patterns to fold parameterized URLs like &lt;code&gt;/api/user/12345&lt;/code&gt; into &lt;code&gt;/api/user/{id}&lt;/code&gt; so the endpoint dimension doesn&amp;rsquo;t blow up either.&lt;/p&gt;
&lt;h2 id=&#34;what-oap-needs&#34;&gt;What OAP needs&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;re on &lt;code&gt;main&lt;/code&gt; or a release ≥ 10.5.0, the following are already shipped:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;config/component-libraries.yml&lt;/code&gt; registers &lt;code&gt;WeChat-MiniProgram: 10002&lt;/code&gt; and &lt;code&gt;AliPay-MiniProgram: 10003&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;config/otel-rules/miniprogram/&lt;/code&gt; holds four MAL rules — service-scoped and instance-scoped for each platform&lt;/li&gt;
&lt;li&gt;&lt;code&gt;config/ui-initialized-templates/wechat_mini_program/&lt;/code&gt; and &lt;code&gt;alipay_mini_program/&lt;/code&gt; carry root / service / instance / endpoint dashboards&lt;/li&gt;
&lt;li&gt;&lt;code&gt;config/ui-initialized-templates/menu.yaml&lt;/code&gt; registers both layers under the Mobile menu group&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The only thing left is enabling the OTel receiver and giving the SDK an OTLP HTTP port it can reach. SkyWalking OAP binds its OTLP HTTP handler onto the receiver-sharing-server port, and that port defaults to &lt;code&gt;0&lt;/code&gt; — meaning it&amp;rsquo;s folded into the core REST port (12800). If you want the SDK to use the standard OTLP HTTP port 4318, set the sharing port to 4318:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker run -d --name sw-oap &lt;span style=&#34;color:#0a3069&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  -p 11800:11800 -p 12800:12800 -p 4318:4318 &lt;span style=&#34;color:#0a3069&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  -e &lt;span style=&#34;color:#953800&#34;&gt;SW_STORAGE&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;banyandb &lt;span style=&#34;color:#0a3069&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  -e &lt;span style=&#34;color:#953800&#34;&gt;SW_STORAGE_BANYANDB_TARGETS&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;banyandb:17912 &lt;span style=&#34;color:#0a3069&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  -e &lt;span style=&#34;color:#953800&#34;&gt;SW_OTEL_RECEIVER&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;default &lt;span style=&#34;color:#0a3069&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  -e &lt;span style=&#34;color:#953800&#34;&gt;SW_RECEIVER_SHARING_REST_PORT&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;4318&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;\
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  apache/skywalking-oap-server:latest
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;All receivers (OTLP, native segment, browser perf, log report) move to 4318 together, while GraphQL stays on 12800 for the UI.&lt;/p&gt;
&lt;p&gt;Minimal SDK config:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-js&#34; data-lang=&#34;js&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#cf222e&#34;&gt;import&lt;/span&gt; &lt;span style=&#34;color:#1f2328&#34;&gt;MiniProgramMonitor&lt;/span&gt; &lt;span style=&#34;color:#1f2328&#34;&gt;from&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#39;mini-program-monitor&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;MiniProgramMonitor&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;init&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;({&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#1f2328&#34;&gt;service&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#39;mini-program-demo&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#1f2328&#34;&gt;serviceInstance&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#39;1.4.2&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;          &lt;span style=&#34;color:#57606a&#34;&gt;// Recommended: app version
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#1f2328&#34;&gt;collector&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#39;http://your-oap:4318&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#1f2328&#34;&gt;enable&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#1f2328&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#1f2328&#34;&gt;error&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#cf222e&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#1f2328&#34;&gt;perf&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#cf222e&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#1f2328&#34;&gt;request&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#cf222e&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#1f2328&#34;&gt;tracing&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#cf222e&#34;&gt;false&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;                  &lt;span style=&#34;color:#57606a&#34;&gt;// Off by default; enable as needed
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#1f2328&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;});&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;WeChat and Alipay use the same config — the SDK detects the platform at runtime and tags the data accordingly.&lt;/p&gt;
&lt;h2 id=&#34;compatibility&#34;&gt;Compatibility&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;WeChat base library ≥ 2.11&lt;/li&gt;
&lt;li&gt;Alipay base library ≥ 2.0&lt;/li&gt;
&lt;li&gt;Apache SkyWalking OAP &lt;code&gt;main&lt;/code&gt; or ≥ 10.5.0, with the OTLP HTTP receiver enabled&lt;/li&gt;
&lt;li&gt;Any other OTLP-compatible backend (OpenTelemetry Collector, Grafana, etc.) also works, but you won&amp;rsquo;t get the SkyWalking-specific cross-platform dashboards&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;whats-next&#34;&gt;What&amp;rsquo;s next&lt;/h2&gt;
&lt;p&gt;To get involved, head over to &lt;a href=&#34;https://github.com/SkyAPM/mini-program-monitor&#34;&gt;SkyAPM/mini-program-monitor&lt;/a&gt; and open an issue or PR. The repo also ships a &lt;code&gt;make preview&lt;/code&gt; target that boots OAP, the UI, and both platform simulators locally — handy if you want to play with it end-to-end.&lt;/p&gt;
&lt;p&gt;Android end-user experience monitoring is still a gap in the SkyWalking ecosystem; contributors interested in closing that one are very welcome.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Blog: Query SkyWalking and Zipkin Traces with TraceQL and Visualize in Grafana</title>
      <link>/blog/2026-04-08-traceql/</link>
      <pubDate>Wed, 08 Apr 2026 00:00:00 +0000</pubDate>
      <guid>/blog/2026-04-08-traceql/</guid>
      <description>
        
        
        &lt;h1 id=&#34;query-skywalking-and-zipkin-traces-with-traceql-and-visualize-in-grafana&#34;&gt;Query SkyWalking and Zipkin Traces with TraceQL and Visualize in Grafana&lt;/h1&gt;
&lt;p&gt;Apache SkyWalking introduced &lt;strong&gt;TraceQL&lt;/strong&gt; support in version &lt;strong&gt;10.4.0&lt;/strong&gt;, implementing
&lt;a href=&#34;https://grafana.com/docs/tempo/v2.10.x/api_docs/&#34;&gt;Grafana Tempo&amp;rsquo;s HTTP query APIs&lt;/a&gt; so that
Grafana can query and visualize traces stored in SkyWalking without any additional plugins.
This means you can now use the familiar Grafana Tempo data source to search, filter, and
drill into both &lt;strong&gt;SkyWalking native traces&lt;/strong&gt; and &lt;strong&gt;Zipkin-compatible traces&lt;/strong&gt; — all served
by your existing SkyWalking OAP server.&lt;/p&gt;
&lt;h2 id=&#34;architecture-overview&#34;&gt;Architecture Overview&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;┌────────────────────┐         Tempo HTTP API           ┌─────────────────────────────┐
│                    │  ──── /skywalking/api/search ──► │  SkyWalking Native Backend  │
│      Grafana       │                                  │  (Query Traces V2 API)      │
│  (Tempo Data Src)  │                                  ├─────────────────────────────┤
│                    │  ──── /zipkin/api/search ──────► │  Zipkin-Compatible Backend  │
└────────────────────┘                                  └──────────┬──────────────────┘
                                                                   │
                                                        ┌──────────▼──────────────────┐
                                                        │    SkyWalking OAP Server    │
                                                        │  ┌───────────────────────┐  │
                                                        │  │   TraceQL Service     │  │
                                                        │  │  (port 3200)          │  │
                                                        │  └───────────────────────┘  │
                                                        │  ┌───────────────────────┐  │
                                                        │  │  Storage (BanyanDB /  │  │
                                                        │  │  Elasticsearch / …)   │  │
                                                        │  └───────────────────────┘  │
                                                        └─────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The TraceQL Service sits inside the OAP server and exposes the Tempo-compatible HTTP API on
port &lt;code&gt;3200&lt;/code&gt; (default). It converts traces from their native format into
&lt;a href=&#34;https://github.com/grafana/tempo/blob/main/pkg/tempopb/tempo.proto&#34;&gt;Tempo&amp;rsquo;s format&lt;/a&gt;,
where the trace detail part (&lt;code&gt;Trace&lt;/code&gt; message) reuses OTLP &lt;code&gt;Trace&lt;/code&gt; definitions.&lt;/p&gt;
&lt;h2 id=&#34;limitations-and-supported-traceql-features&#34;&gt;Limitations and Supported TraceQL Features&lt;/h2&gt;
&lt;p&gt;TraceQL is a rich query language, but SkyWalking currently implements a practical subset.
The following features are &lt;strong&gt;supported&lt;/strong&gt;:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Feature&lt;/th&gt;
          &lt;th&gt;Examples&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Spanset filter&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;{resource.service.name=&amp;quot;frontend&amp;quot;}&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Resource attributes&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;resource.service.name&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Span attributes&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;span.http.method&lt;/code&gt;, &lt;code&gt;span.http.status_code&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Intrinsic fields&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;duration&lt;/code&gt;, &lt;code&gt;name&lt;/code&gt;, &lt;code&gt;status&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Comparison operators&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;=&lt;/code&gt;, &lt;code&gt;&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;gt;=&lt;/code&gt;, &lt;code&gt;&amp;lt;&lt;/code&gt;, &lt;code&gt;&amp;lt;=&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Compound conditions&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;{resource.service.name=&amp;quot;frontend&amp;quot; &amp;amp;&amp;amp; duration&amp;gt;100ms}&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Duration units&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;us&lt;/code&gt;/&lt;code&gt;µs&lt;/code&gt;, &lt;code&gt;ms&lt;/code&gt;, &lt;code&gt;s&lt;/code&gt;, &lt;code&gt;m&lt;/code&gt;, &lt;code&gt;h&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The following features are &lt;strong&gt;not yet supported&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Spanset logical operations (&lt;code&gt;{...} AND {...}&lt;/code&gt;, &lt;code&gt;{...} OR {...}&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Pipeline operations (&lt;code&gt;|&lt;/code&gt; operator)&lt;/li&gt;
&lt;li&gt;Aggregate functions (&lt;code&gt;count()&lt;/code&gt;, &lt;code&gt;avg()&lt;/code&gt;, &lt;code&gt;max()&lt;/code&gt;, &lt;code&gt;min()&lt;/code&gt;, &lt;code&gt;sum()&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;Regular expression matching (&lt;code&gt;=~&lt;/code&gt;, &lt;code&gt;!~&lt;/code&gt;)&lt;/li&gt;
&lt;li&gt;&lt;code&gt;event&lt;/code&gt; and &lt;code&gt;link&lt;/code&gt; scopes&lt;/li&gt;
&lt;li&gt;&lt;code&gt;kind&lt;/code&gt; intrinsic field&lt;/li&gt;
&lt;li&gt;Streaming mode (must be disabled in the Grafana Tempo data source settings)&lt;/li&gt;
&lt;/ul&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important&lt;/strong&gt;: SkyWalking native trace support in TraceQL is based on the
&lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/api/query-protocol/#trace-v2&#34;&gt;Query Traces V2 API&lt;/a&gt;.
Currently, only &lt;strong&gt;BanyanDB&lt;/strong&gt; storage implements this API. Other storage backends
(e.g., Elasticsearch, MySQL, PostgreSQL) do not support SkyWalking native trace queries via TraceQL.
Zipkin-compatible traces are &lt;strong&gt;not&lt;/strong&gt; subject to this restriction.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;trace-format-conversion&#34;&gt;Trace Format Conversion&lt;/h2&gt;
&lt;p&gt;Since the trace detail part of Tempo&amp;rsquo;s format reuses
&lt;a href=&#34;https://opentelemetry.io/docs/reference/specification/protocol/&#34;&gt;OTLP Trace&lt;/a&gt; definitions,
the conversion descriptions below refer to OTLP field names (e.g., span kind, status code).&lt;/p&gt;
&lt;h3 id=&#34;skywalking-native-trace&#34;&gt;SkyWalking Native Trace&lt;/h3&gt;
&lt;h4 id=&#34;trace-id-encoding&#34;&gt;Trace ID Encoding&lt;/h4&gt;
&lt;p&gt;SkyWalking native trace IDs are arbitrary strings (e.g.,
&lt;code&gt;2a2e04e8d1114b14925c04a6321ca26c.38.17739924187687539&lt;/code&gt;), while Grafana Tempo requires
pure hex-encoded trace IDs. The TraceQL Service encodes each UTF-8 byte of the original trace
ID as two lowercase hex characters:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;Original:  2a2e04e8d1114b14925c04a6321ca26c.38.17739924187687539
Encoded:   32613265303465386431313134623134393235633034613633323163613236632e33382e3137373339393234313837363837353339
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This encoded hex trace ID is what appears in all API responses and in Grafana. When you click a
trace ID in Grafana, the TraceQL Service automatically decodes it back to the original SkyWalking
trace ID for the internal query.&lt;/p&gt;
&lt;h4 id=&#34;span-kind-mapping&#34;&gt;Span Kind Mapping&lt;/h4&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;SkyWalking Span Type&lt;/th&gt;
          &lt;th&gt;OTLP Span Kind&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;Entry&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;SPAN_KIND_SERVER&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;Exit&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;SPAN_KIND_CLIENT&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;Local&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;SPAN_KIND_INTERNAL&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h4 id=&#34;status-mapping&#34;&gt;Status Mapping&lt;/h4&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;SkyWalking &lt;code&gt;isError&lt;/code&gt;&lt;/th&gt;
          &lt;th&gt;OTLP Status Code&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;true&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;STATUS_CODE_ERROR&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;false&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;STATUS_CODE_OK&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h4 id=&#34;spanattachedevents&#34;&gt;SpanAttachedEvents&lt;/h4&gt;
&lt;p&gt;SkyWalking &lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/concepts-and-designs/event/&#34;&gt;SpanAttachedEvents&lt;/a&gt; are converted to OTLP span events,
with &lt;code&gt;tags&lt;/code&gt; mapped as string attributes and &lt;code&gt;summary&lt;/code&gt; mapped as numeric attributes (serialized as strings).&lt;/p&gt;
&lt;h3 id=&#34;zipkin-trace&#34;&gt;Zipkin Trace&lt;/h3&gt;
&lt;h4 id=&#34;span-kind-mapping-1&#34;&gt;Span Kind Mapping&lt;/h4&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Zipkin Span Kind&lt;/th&gt;
          &lt;th&gt;OTLP Span Kind&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;CLIENT&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;SPAN_KIND_CLIENT&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;SERVER&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;SPAN_KIND_SERVER&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;PRODUCER&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;SPAN_KIND_PRODUCER&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;CONSUMER&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;SPAN_KIND_CONSUMER&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h4 id=&#34;status-mapping-1&#34;&gt;Status Mapping&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;If the &lt;code&gt;otel.status_code&lt;/code&gt; tag is present, it is used directly.&lt;/li&gt;
&lt;li&gt;Otherwise, if the &lt;code&gt;error&lt;/code&gt; tag equals &lt;code&gt;true&lt;/code&gt;, the status is &lt;code&gt;STATUS_CODE_ERROR&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;If neither tag is present, the status defaults to &lt;code&gt;STATUS_CODE_UNSET&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&#34;endpoint-and-annotation-mapping&#34;&gt;Endpoint and Annotation Mapping&lt;/h4&gt;
&lt;p&gt;Zipkin endpoint fields are mapped to OTLP attributes (e.g., &lt;code&gt;localEndpoint.ipv4&lt;/code&gt; → &lt;code&gt;net.host.ip&lt;/code&gt;),
and Zipkin annotations are converted to OTLP span events.&lt;/p&gt;
&lt;p&gt;For the full conversion details, see the &lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/api/traceql-service/&#34;&gt;TraceQL Service documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;how-to-enable-traceql&#34;&gt;How to Enable TraceQL&lt;/h2&gt;
&lt;h3 id=&#34;step-1-enable-the-traceql-module&#34;&gt;Step 1: Enable the TraceQL Module&lt;/h3&gt;
&lt;p&gt;By default, the TraceQL module is &lt;strong&gt;disabled&lt;/strong&gt; (&lt;code&gt;selector: ${SW_TRACEQL:-}&lt;/code&gt;). To enable it, set
the selector to &lt;code&gt;default&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# In application.yml&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;traceQL&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;selector&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;${SW_TRACEQL:default}&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;default&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;enableDatasourceSkywalking&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;${SW_TRACEQL_ENABLE_DATASOURCE_SKYWALKING:true}&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;enableDatasourceZipkin&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;${SW_TRACEQL_ENABLE_DATASOURCE_ZIPKIN:true}&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or via environment variables:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6639ba&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#953800&#34;&gt;SW_TRACEQL&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;default
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6639ba&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#953800&#34;&gt;SW_TRACEQL_ENABLE_DATASOURCE_SKYWALKING&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#6639ba&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6639ba&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#953800&#34;&gt;SW_TRACEQL_ENABLE_DATASOURCE_ZIPKIN&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#6639ba&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;step-2-enable-the-zipkin-receiver-for-zipkin-traces-only&#34;&gt;Step 2: Enable the Zipkin Receiver (for Zipkin traces only)&lt;/h3&gt;
&lt;p&gt;If you want to query Zipkin traces, you also need to enable the Zipkin receiver so that
SkyWalking can ingest Zipkin trace data:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# In application.yml&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;receiver-zipkin&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;selector&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;${SW_RECEIVER_ZIPKIN:default}&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;default&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;searchableTracesTags&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;${SW_ZIPKIN_SEARCHABLE_TAG_KEYS:http.method}&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;sampleRate&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;${SW_ZIPKIN_SAMPLE_RATE:10000}&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;restHost&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;${SW_RECEIVER_ZIPKIN_REST_HOST:0.0.0.0}&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;restPort&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;${SW_RECEIVER_ZIPKIN_REST_PORT:9411}&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or via environment variable:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6639ba&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#953800&#34;&gt;SW_RECEIVER_ZIPKIN&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;default
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;full-configuration-reference&#34;&gt;Full Configuration Reference&lt;/h3&gt;
&lt;p&gt;For the complete list of all configuration options and their default values, see the
&lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/api/traceql-service/#configuration&#34;&gt;Configuration section of the TraceQL Service documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;configuring-grafana-tempo-data-source&#34;&gt;Configuring Grafana Tempo Data Source&lt;/h2&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Prerequisite&lt;/strong&gt;: Grafana &lt;strong&gt;12 or later&lt;/strong&gt; is required.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Each trace backend (SkyWalking native / Zipkin) needs its own Tempo data source in Grafana,
because each is served under a different context path.&lt;/p&gt;
&lt;h3 id=&#34;context-paths&#34;&gt;Context Paths&lt;/h3&gt;
&lt;p&gt;The two backends are served under separate context paths on the same port:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Backend&lt;/th&gt;
          &lt;th&gt;Default Context Path&lt;/th&gt;
          &lt;th&gt;Env Variable&lt;/th&gt;
          &lt;th&gt;Full Default URL&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;SkyWalking native&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;/skywalking&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;SW_TRACEQL_REST_CONTEXT_PATH_SKYWALKING&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;http://&amp;lt;oap-host&amp;gt;:3200/skywalking&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Zipkin&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;/zipkin&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;SW_TRACEQL_REST_CONTEXT_PATH_ZIPKIN&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;http://&amp;lt;oap-host&amp;gt;:3200/zipkin&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id=&#34;setting-up-the-skywalking-data-source&#34;&gt;Setting Up the SkyWalking Data Source&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;In Grafana, go to &lt;strong&gt;Configuration → Data Sources → Add data source&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Choose &lt;strong&gt;Tempo&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set the URL to &lt;code&gt;http://&amp;lt;oap-host&amp;gt;:3200/skywalking&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Disable the Streaming option&lt;/strong&gt; (SkyWalking does not support streaming mode).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&#34;grafana-tempo-datasource-streaming.png&#34; alt=&#34;Disable Streaming&#34;&gt;&lt;/p&gt;
&lt;ol start=&#34;5&#34;&gt;
&lt;li&gt;Save and test the data source.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&#34;grafana-tempo-skywalking-datasource.png&#34; alt=&#34;SkyWalking Data Source&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;setting-up-the-zipkin-data-source&#34;&gt;Setting Up the Zipkin Data Source&lt;/h3&gt;
&lt;p&gt;Same as above, but set the URL to &lt;code&gt;http://&amp;lt;oap-host&amp;gt;:3200/zipkin&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;grafana-tempo-zipkin-datasource.png&#34; alt=&#34;Zipkin Data Source&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;configuring-trace-list-result-tags&#34;&gt;Configuring Trace List Result Tags&lt;/h2&gt;
&lt;p&gt;When you search for traces in Grafana, the trace list panel shows a summary of each trace.
The &lt;code&gt;tracesListResultTags&lt;/code&gt; configuration controls &lt;strong&gt;which span tags are included in the search
result&lt;/strong&gt; and displayed as columns in the trace list.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Env Variable&lt;/th&gt;
          &lt;th&gt;Default Value&lt;/th&gt;
          &lt;th&gt;Purpose&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;SW_TRACEQL_ZIPKIN_TRACES_LIST_RESULT_TAGS&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;http.method,error&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Tags shown for Zipkin traces&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&lt;code&gt;SW_TRACEQL_SKYWALKING_TRACES_LIST_RESULT_TAGS&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;&lt;code&gt;http.method,http.status_code,rpc.status_code,db.type,db.instance,mq.queue,mq.topic,mq.broker&lt;/code&gt;&lt;/td&gt;
          &lt;td&gt;Tags shown for SkyWalking traces&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Note that &lt;code&gt;service.name&lt;/code&gt; and &lt;code&gt;span.kind&lt;/code&gt; are &lt;strong&gt;always included&lt;/strong&gt; regardless of this setting.&lt;/p&gt;
&lt;p&gt;These tags appear as attribute columns in the Grafana Tempo trace search results, making it
easier to identify and group traces at a glance:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;SkyWalking native trace list:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;grafana-tempo-skywalking-trace-list.png&#34; alt=&#34;SkyWalking Trace List&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Zipkin trace list:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;grafana-tempo-zipkin-trace-list.png&#34; alt=&#34;Zipkin Trace List&#34;&gt;&lt;/p&gt;
&lt;p&gt;You can customize these tags based on your application&amp;rsquo;s instrumentation. For example, if your
services heavily use messaging, you might add &lt;code&gt;mq.destination&lt;/code&gt; or &lt;code&gt;messaging.system&lt;/code&gt; to the list.&lt;/p&gt;
&lt;h2 id=&#34;building-a-trace-dashboard-in-grafana&#34;&gt;Building a Trace Dashboard in Grafana&lt;/h2&gt;
&lt;h3 id=&#34;skywalking-native-trace-dashboard&#34;&gt;SkyWalking Native Trace Dashboard&lt;/h3&gt;
&lt;h4 id=&#34;step-1-explore-and-save&#34;&gt;Step 1: Explore and Save&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Go to the &lt;strong&gt;Explore&lt;/strong&gt; page in Grafana.&lt;/li&gt;
&lt;li&gt;Select the Tempo data source you configured for SkyWalking (e.g., &lt;code&gt;SkyWalkingTraceQL&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;Run a test query, then click &lt;strong&gt;Add to dashboard&lt;/strong&gt; and save it as &lt;code&gt;SkyWalking Trace&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&#34;grafana-tempo-skywalking-explore.png&#34; alt=&#34;SkyWalking Explore&#34;&gt;&lt;/p&gt;
&lt;h4 id=&#34;step-2-configure-variables&#34;&gt;Step 2: Configure Variables&lt;/h4&gt;
&lt;p&gt;Add dashboard variables so users can filter traces dynamically (e.g., by service name):&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;grafana-tempo-skywalking-variables.png&#34; alt=&#34;SkyWalking Variables&#34;&gt;&lt;/p&gt;
&lt;h4 id=&#34;step-3-add-a-trace-panel&#34;&gt;Step 3: Add a Trace Panel&lt;/h4&gt;
&lt;ol&gt;
&lt;li&gt;Choose a &lt;strong&gt;Table&lt;/strong&gt; chart (or edit the panel you saved).&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;Query type&lt;/strong&gt; to &lt;code&gt;Search&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Set the &lt;strong&gt;Service Name&lt;/strong&gt; query condition to the variable &lt;code&gt;$Service&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Add other query conditions as needed (e.g., duration, span name, tags).&lt;/li&gt;
&lt;li&gt;Test and save.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&#34;grafana-tempo-skywalking-panel.png&#34; alt=&#34;SkyWalking Panel&#34;&gt;&lt;/p&gt;
&lt;h4 id=&#34;step-4-view-trace-details&#34;&gt;Step 4: View Trace Details&lt;/h4&gt;
&lt;p&gt;Click any trace ID in the trace panel to jump to the Explore page showing the full trace
waterfall view with all spans, tags, and events:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;grafana-tempo-skywalking-trace-detail.png&#34; alt=&#34;SkyWalking Trace Detail&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;zipkin-trace-dashboard&#34;&gt;Zipkin Trace Dashboard&lt;/h3&gt;
&lt;p&gt;The setup for Zipkin traces is identical to SkyWalking native traces — just use the Zipkin
Tempo data source you configured (e.g., &lt;code&gt;ZipkinTraceQL&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Zipkin trace detail view:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;grafana-tempo-zipkin-trace-detail.png&#34; alt=&#34;Zipkin Trace Detail&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;summary&#34;&gt;Summary&lt;/h2&gt;
&lt;p&gt;With TraceQL support in SkyWalking 10.4.0, you can now leverage Grafana&amp;rsquo;s powerful Tempo
data source to query and visualize both SkyWalking native traces and Zipkin-compatible traces.
The key points to remember:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Enable the TraceQL module&lt;/strong&gt; by setting &lt;code&gt;SW_TRACEQL=default&lt;/code&gt; and enabling the desired backends.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Configure separate Tempo data sources&lt;/strong&gt; in Grafana for each backend (&lt;code&gt;/skywalking&lt;/code&gt; and &lt;code&gt;/zipkin&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Disable the Streaming option&lt;/strong&gt; in the Grafana Tempo data source settings.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Customize result tags&lt;/strong&gt; via &lt;code&gt;SW_TRACEQL_SKYWALKING_TRACES_LIST_RESULT_TAGS&lt;/code&gt; and &lt;code&gt;SW_TRACEQL_ZIPKIN_TRACES_LIST_RESULT_TAGS&lt;/code&gt; to control what&amp;rsquo;s shown in search results.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SkyWalking native trace queries require BanyanDB&lt;/strong&gt; storage (Zipkin traces work with all storage backends).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;For the complete API reference and conversion details, see the
&lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/api/traceql-service/&#34;&gt;TraceQL Service documentation&lt;/a&gt;.
For Grafana integration details, see
&lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/setup/backend/ui-grafana/#use-grafana-as-the-ui&#34;&gt;Use Grafana As The UI&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Blog: Monitoring LLM Applications with SkyWalking 10.4: Insights into Performance and Cost</title>
      <link>/blog/2026-04-05-virtual-genai-monitoring/</link>
      <pubDate>Sun, 05 Apr 2026 00:00:00 +0000</pubDate>
      <guid>/blog/2026-04-05-virtual-genai-monitoring/</guid>
      <description>
        
        
        &lt;h1 id=&#34;the-problem-as-applications-consume-llms-monitoring-leaves-a-blind-spot&#34;&gt;The Problem: As Applications &amp;ldquo;Consume&amp;rdquo; LLMs, Monitoring Leaves a Blind Spot&lt;/h1&gt;
&lt;p&gt;With the deep penetration of Generative AI (GenAI) into enterprise workflows, developers face a challenging paradox: while powerful LLM capabilities are easily integrated via &lt;code&gt;Spring AI&lt;/code&gt; or &lt;code&gt;OpenAI SDKs&lt;/code&gt;, the actual performance and reliability of these calls remain largely invisible.&lt;/p&gt;
&lt;h3 id=&#34;1-the-black-box-of-cost-and-performance-is-the-expensive-model-worth-it&#34;&gt;1. The &amp;ldquo;Black Box&amp;rdquo; of Cost and Performance: Is the Expensive Model Worth It?&lt;/h3&gt;
&lt;p&gt;Facing high LLM bills, organizations often only see a total sum paid to a provider, but cannot calculate the &amp;ldquo;ROI&amp;rdquo; within the application.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Blind Upgrades:&lt;/strong&gt; You might switch to a premium flagship model for a better experience. But in your specific business scenario, does paying several times more per token actually yield lower latency or a faster &lt;strong&gt;TTFT (Time to First Token)&lt;/strong&gt;?&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lack of Real-World Benchmarks:&lt;/strong&gt; Official benchmarks mean little without your real-world business requests. You need to know which model achieves the perfect balance between &amp;ldquo;Token/Cost Consumption&amp;rdquo; and &amp;ldquo;Response Speed&amp;rdquo; under your actual prompt lengths and concurrency levels.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;2-the-vanishing-golden-timeout&#34;&gt;2. The Vanishing &amp;ldquo;Golden Timeout&amp;rdquo;&lt;/h3&gt;
&lt;p&gt;Many teams set timeouts for LLM calls arbitrarily (e.g., 30s or 60s).&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Too Short:&lt;/strong&gt; During peak periods or long-text generation, requests are frequently interrupted, causing business failure rates to soar.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Too Long:&lt;/strong&gt; If a provider hangs, requests pile up in memory, blocking execution threads and potentially leading to the collapse of the entire Java application or microservice cluster.
Only by mastering the &lt;strong&gt;P99/P95 Latency&lt;/strong&gt; can you set rational timeout policies based on data rather than intuition.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;3-the-overlooked-experience-killer-ttft&#34;&gt;3. The Overlooked Experience Killer: TTFT&lt;/h3&gt;
&lt;p&gt;In GenAI scenarios, a user&amp;rsquo;s perception of speed depends less on the total duration of the conversation and more on &lt;strong&gt;&amp;ldquo;when the first word appears.&amp;rdquo;&lt;/strong&gt; * A streaming response with a 10s total duration but a &lt;strong&gt;500ms TTFT&lt;/strong&gt; feels instantaneous.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A non-streaming response with a 5s total duration but a &lt;strong&gt;4s TTFT&lt;/strong&gt; feels &amp;ldquo;frozen.&amp;rdquo;
If your observability system only tracks total latency, you miss the core UX metric that explains why users complain about &amp;ldquo;AI slowness.&amp;rdquo;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;p&gt;&lt;strong&gt;SkyWalking 10.4: A &amp;ldquo;Digital Dashboard&amp;rdquo;&lt;/strong&gt;&lt;br&gt;
From the Application Perspective The &lt;strong&gt;Virtual GenAI&lt;/strong&gt; capability introduced in Apache SkyWalking 10.4 fills this &amp;ldquo;observability vacuum.&amp;rdquo; It avoids reliance on external gateways by using application-side probes (like the Java Agent) to collect the most authentic data from the client&amp;rsquo;s perspective.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Precise Latency Distribution:&lt;/strong&gt; Multi-dimensional metrics (P50, P90, P99) help visualize LLM fluctuations to inform dynamic timeout strategies.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Core UX Metric — TTFT Monitoring:&lt;/strong&gt; Native support for first-token latency in streaming calls.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Multi-dimensional Model Profiling:&lt;/strong&gt; Aligns token usage, estimated cost, and performance across Providers and Models, helping you choose the most cost-effective solution for your specific needs.&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h1 id=&#34;virtual-genai-observability&#34;&gt;Virtual GenAI Observability&lt;/h1&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Virtual GenAI&lt;/strong&gt; represents Generative AI service nodes detected by probe plugins. All performance metrics are based on the &lt;strong&gt;GenAI Client Perspective&lt;/strong&gt;.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;For instance, the &lt;strong&gt;Spring AI plugin&lt;/strong&gt; in the Java Agent detects the response latency of a Chat Completion request. SkyWalking then visualizes these in the dashboard:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Traffic &amp;amp; Success Rate&lt;/strong&gt; (CPM &amp;amp; SLA)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Latency &amp;amp; TTFT&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Token Usage&lt;/strong&gt; (Input/Output)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Estimated Cost&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Screenshots:&lt;/strong&gt;
&lt;img src=&#34;provider-dashboard-1.png&#34; alt=&#34;provider-dashboard-1.png&#34;&gt;
&lt;img src=&#34;provider-dashboard-2.png&#34; alt=&#34;provider-dashboard-2.png&#34;&gt;
&lt;img src=&#34;provider-dashboard-3.png&#34; alt=&#34;provider-dashboard-3.png&#34;&gt;
&lt;img src=&#34;model-dashboard-1.png&#34; alt=&#34;model-dashboard-1.png&#34;&gt;
&lt;img src=&#34;model-dashboard-2.png&#34; alt=&#34;model-dashboard-2.png&#34;&gt;
&lt;img src=&#34;model-dashboard-3.png&#34; alt=&#34;model-dashboard-3.png&#34;&gt;&lt;/p&gt;
&lt;h1 id=&#34;how-it-works&#34;&gt;How It Works&lt;/h1&gt;
&lt;p&gt;When the SkyWalking Java Agent or OTLP probes intercept calls to mainstream AI frameworks (e.g., Spring AI, OpenAI SDK), they report Trace data to the SkyWalking OAP.
The OAP aggregates and computes this data to generate performance metrics for both &lt;strong&gt;Providers&lt;/strong&gt; and &lt;strong&gt;Models&lt;/strong&gt;, which are then rendered in the built-in Virtual-GenAI dashboards.&lt;/p&gt;
&lt;h1 id=&#34;installation--configuration&#34;&gt;Installation &amp;amp; Configuration&lt;/h1&gt;
&lt;h2 id=&#34;requirements&#34;&gt;Requirements&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;SkyWalking Java Agent:&lt;/strong&gt; &amp;gt;= 9.7&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;SkyWalking OAP:&lt;/strong&gt; &amp;gt;= 10.4&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;semantic-conventions--compatibility&#34;&gt;Semantic Conventions &amp;amp; Compatibility&lt;/h2&gt;
&lt;p&gt;SkyWalking Virtual GenAI follows &lt;strong&gt;OpenTelemetry GenAI Semantic Conventions&lt;/strong&gt;. OAP identifies GenAI-related Spans based on:&lt;/p&gt;
&lt;h3 id=&#34;skywalking-java-agent&#34;&gt;SkyWalking Java Agent&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Spans must be of type Exit, have the SpanLayer attribute set to GENAI, and contain the gen_ai.response.model tag.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;otlp--zipkin-probes&#34;&gt;OTLP / Zipkin Probes&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Spans must contain the &lt;code&gt;gen_ai.response.model&lt;/code&gt; tag.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For details, refer to the E2E configurations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/apache/skywalking/blob/master/test/e2e-v2/cases/virtual-genai/docker-compose.yml&#34;&gt;SkyWalking Java Agent Reporting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/apache/skywalking/blob/master/test/e2e-v2/cases/otlp-virtual-genai/docker-compose.yml&#34;&gt;Probe Reporting OTLP Data&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/apache/skywalking/blob/master/test/e2e-v2/cases/zipkin-virtual-genai/docker-compose.yml&#34;&gt;Probe Reporting Zipkin Data&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;hr&gt;
&lt;h1 id=&#34;genai-estimated-cost-configuration&#34;&gt;GenAI Estimated Cost Configuration&lt;/h1&gt;
&lt;h2 id=&#34;overview&#34;&gt;Overview&lt;/h2&gt;
&lt;p&gt;SkyWalking provides a built-in &lt;a href=&#34;https://github.com/apache/skywalking/blob/master/oap-server/server-starter/src/main/resources/gen-ai-config.yml&#34;&gt;GenAI Billing Configuration File&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;This file defines how SkyWalking maps model names from Trace data to their corresponding providers and estimates the token cost for each LLM call. The estimated cost is displayed in the SkyWalking UI alongside trace and metric data, helping users intuitively understand the financial impact of their GenAI usage.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Important:&lt;/strong&gt; The pricing in this file is intended for cost estimation only and must not be treated as actual billing or invoice amounts. Users are advised to regularly verify the latest rates on the providers&amp;rsquo; official pricing pages.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;configuration-structure&#34;&gt;Configuration Structure&lt;/h2&gt;
&lt;h3 id=&#34;top-level-fields&#34;&gt;Top-level Fields&lt;/h3&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Field&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Type&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Description&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;last-updated&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;date&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;The last update date of the pricing data. All prices are based on public billing standards announced by providers prior to this date.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;providers&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;list&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;List of GenAI provider definitions. Each entry contains matching rules and specific model pricing information.&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id=&#34;provider-definition&#34;&gt;Provider Definition&lt;/h3&gt;
&lt;p&gt;Each entry under &lt;code&gt;providers&lt;/code&gt; defines a GenAI provider:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;providers&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;provider&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&amp;lt;provider-name&amp;gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;prefix-match&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;- &amp;lt;prefix-1&amp;gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;- &amp;lt;prefix-2&amp;gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;models&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&amp;lt;model-name&amp;gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;aliases&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;&amp;lt;alias-1&amp;gt;, &amp;lt;alias-2&amp;gt;]&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;input-estimated-cost-per-m&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&amp;lt;cost&amp;gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;output-estimated-cost-per-m&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&amp;lt;cost&amp;gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Field&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Type&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Required&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Description&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;provider&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Yes&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;The provider identifier (e.g., &lt;code&gt;openai&lt;/code&gt;, &lt;code&gt;anthropic&lt;/code&gt;, &lt;code&gt;gemini&lt;/code&gt;). It is displayed as the Virtual GenAI service name in SkyWalking.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;prefix-match&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;list[string]&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Yes&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;A list of prefixes used to match model names to this provider. If a model name in the Trace data starts with any of these prefixes, it will be mapped to this provider.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;models&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;list[model]&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;No&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;A list of model definitions containing pricing information. If omitted, the system can still identify the provider but will not perform cost estimation.&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h3 id=&#34;model-definition&#34;&gt;Model Definition&lt;/h3&gt;
&lt;p&gt;Each entry under &lt;code&gt;models&lt;/code&gt; defines the pricing for a specific model:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Field&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Type&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Required&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Description&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;name&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;string&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Yes&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;The standard model name used for matching.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;aliases&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;list[string]&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;No&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Alternative names that should resolve to the same billing entry. This is useful when providers use different naming conventions (see the &amp;ldquo;Model Aliases&amp;rdquo; section).&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;input-estimated-cost-per-m&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;float&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;No&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Estimated cost per 1,000,000 (one million) input (Prompt) tokens. The default unit is USD.&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;output-estimated-cost-per-m&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;float&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;No&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Estimated cost per 1,000,000 (one million) output (Completion) tokens. The default unit is USD.&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;model-matching-mechanism&#34;&gt;Model Matching Mechanism&lt;/h2&gt;
&lt;h3 id=&#34;provider-level-prefix-matching&#34;&gt;Provider-Level Prefix Matching&lt;/h3&gt;
&lt;p&gt;When SkyWalking receives a Trace containing a GenAI call, it determines the &lt;strong&gt;Provider&lt;/strong&gt; based on the following priority order:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;gen_ai.provider.name&lt;/code&gt; tag&lt;/strong&gt;: This tag is retrieved first. It follows the latest &lt;code&gt;OpenTelemetry&lt;/code&gt; GenAI semantic conventions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;gen_ai.system&lt;/code&gt; tag&lt;/strong&gt;: If the above tag is missing, the system falls back to this legacy tag. Note: This tag is only parsed when processing OTLP or Zipkin format data, primarily for compatibility with older versions of libraries like the Python auto-instrumentation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Prefix Matching&lt;/strong&gt;: If neither of the above tags exists, &lt;code&gt;SkyWalking&lt;/code&gt; reads the &lt;code&gt;prefix-match&lt;/code&gt; rules defined in &lt;code&gt;gen-ai-config.yml&lt;/code&gt; and attempts to identify the provider by matching the &lt;strong&gt;Model Name&lt;/strong&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;provider&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;openai&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;prefix-match&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;- gpt&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Any model name starting with &lt;strong&gt;gpt&lt;/strong&gt; (such as &lt;strong&gt;gpt-4o&lt;/strong&gt;, &lt;strong&gt;gpt-4.1-mini&lt;/strong&gt;, or &lt;strong&gt;gpt-5-nano&lt;/strong&gt;) will be mapped to the &lt;strong&gt;openai&lt;/strong&gt; provider.
A single provider can have multiple prefixes:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;provider&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;tencent&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;prefix-match&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;- hunyuan&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;- Tencent&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;model-level-longest-prefix-matching&#34;&gt;Model-level Longest-Prefix Matching&lt;/h3&gt;
&lt;p&gt;Once the provider is determined, SkyWalking uses a Trie-based longest-prefix matching algorithm to find the best billing entry. This is crucial because model names returned in provider API responses often include version numbers or timestamps, differing from the base model name in the config.
Example OpenAI config:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;models&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;gpt-4o&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;input-estimated-cost-per-m&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;2.5&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;output-estimated-cost-per-m&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;10.0&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;gpt-4o-mini&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;input-estimated-cost-per-m&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;0.15&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;output-estimated-cost-per-m&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;0.6&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Matching behavior:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Model Name in Trace&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Matched Configuration Entry&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Reason&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gpt-4o&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gpt-4o&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Exact match&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gpt-4o-2024-08-06&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gpt-4o&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Longest prefix is &lt;code&gt;gpt-4o&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gpt-4o-mini&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gpt-4o-mini&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Exact match (Longer prefix &lt;code&gt;gpt-4o-mini&lt;/code&gt; takes priority over &lt;code&gt;gpt-4o&lt;/code&gt;)&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gpt-4o-mini-2024-07-18&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gpt-4o-mini&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Longest prefix is &lt;code&gt;gpt-4o-mini&lt;/code&gt;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;This mechanism ensures versioned API model names map to the correct pricing tier without requiring exact full names in the configuration file.&lt;/p&gt;
&lt;h3 id=&#34;model-aliases&#34;&gt;Model Aliases&lt;/h3&gt;
&lt;p&gt;Some providers use different naming conventions across API responses and documentation. For example, Anthropic&amp;rsquo;s model might appear as &lt;code&gt;claude-4-sonnet&lt;/code&gt; or &lt;code&gt;claude-sonnet-4&lt;/code&gt;. The aliases field supports both formats under a single billing entry:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;claude-4-sonnet&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;aliases&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;claude-sonnet-4]&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;input-estimated-cost-per-m&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;3.0&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;output-estimated-cost-per-m&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;15.0&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Under this configuration, &lt;code&gt;claude-4-sonnet&lt;/code&gt; and &lt;code&gt;claude-sonnet-4&lt;/code&gt; (as well as any versioned variants, such as &lt;code&gt;claude-sonnet-4-20250514&lt;/code&gt;) will resolve to the same &lt;strong&gt;billing entry&lt;/strong&gt;.&lt;br&gt;
&lt;strong&gt;Note:&lt;/strong&gt; Aliases also participate in &lt;strong&gt;longest prefix matching&lt;/strong&gt;. Therefore, &lt;code&gt;claude-sonnet-4-20250514&lt;/code&gt; will match the alias &lt;code&gt;claude-sonnet-4&lt;/code&gt;, which in turn resolves to the pricing information for &lt;code&gt;claude-4-sonnet&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;custom-configuration&#34;&gt;Custom Configuration&lt;/h2&gt;
&lt;h3 id=&#34;adding-a-new-provider&#34;&gt;Adding a New Provider&lt;/h3&gt;
&lt;p&gt;To add a provider that is not included in the default configuration:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;providers&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# ... Existing providers ...&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;provider&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;ollama&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;prefix-match&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;- mymodel&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;models&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;mymodel-large&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;input-estimated-cost-per-m&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;1.0&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;output-estimated-cost-per-m&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;5.0&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;name&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;mymodel-small&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;input-estimated-cost-per-m&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;0.1&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;output-estimated-cost-per-m&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;0.5&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;For OTLP/Zipkin data, a dedicated estimated tag has been added. You can now view the cost of each GenAI call directly on the UI.
&lt;img src=&#34;otlp-estimated-tag.png&#34; alt=&#34;otlp-estimated-tag&#34;&gt;&lt;/p&gt;
&lt;h1 id=&#34;main-metrics&#34;&gt;Main Metrics&lt;/h1&gt;
&lt;h2 id=&#34;1provider-level&#34;&gt;1.Provider Level&lt;/h2&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Metric ID&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Description&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Meaning&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_provider_cpm&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Calls Per Minute&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Requests per minute (Throughput)&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_provider_sla&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Success Rate&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Request success rate&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_provider_resp_time&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Avg Response Time&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Average response time&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_provider_latency_percentile&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Latency Percentiles&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Response time percentiles (P50, P75, P90, P95, P99)&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_provider_input_tokens_sum/avg&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Input Token Usage&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Total and average input token usage&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_provider_output_tokens_sum/avg&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Output Token Usage&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Total and average output token usage&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_provider_total_estimated_cost/avg&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Estimated Cost&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Total estimated cost and average cost per call&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;2-model-level&#34;&gt;2. Model Level&lt;/h2&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Metric ID&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Description&lt;/th&gt;
          &lt;th style=&#34;text-align: left&#34;&gt;Meaning&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_model_call_cpm&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Calls Per Minute&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Requests per minute for this specific model&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_model_sla&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Success Rate&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Model-specific request success rate&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_model_latency_avg/percentile&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Latency&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Average and percentiles of model response duration&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_model_ttft_avg/percentile&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;TTFT&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Time to First Token (Streaming only)&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_model_input_tokens_sum/avg&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Input Token Usage&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Detailed input token consumption for the model&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_model_output_tokens_sum/avg&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Output Token Usage&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Detailed output token consumption for the model&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;&lt;code&gt;gen_ai_model_total_estimated_cost/avg&lt;/code&gt;&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Estimated Cost&lt;/td&gt;
          &lt;td style=&#34;text-align: left&#34;&gt;Estimated total cost and average cost for the model&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id=&#34;recommended-usage-scenarios&#34;&gt;Recommended Usage Scenarios&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Performance Evaluation: Use Latency and Time to First Token (TTFT) metrics to analyze model inference efficiency and the end-user interaction experience.&lt;/li&gt;
&lt;li&gt;Token Monitoring: Real-time monitoring of Input and Output token consumption to analyze resource utilization across different business scenarios.&lt;/li&gt;
&lt;li&gt;Cost Alerting: Set alert thresholds based on Estimated Cost or token consumption to promptly detect abnormal calls and prevent budget overruns.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Blog: Monitoring Flink with SkyWalking</title>
      <link>/blog/2024-04-19-flink-monitoring-by-skywalking/</link>
      <pubDate>Fri, 25 Apr 2025 00:00:00 +0000</pubDate>
      <guid>/blog/2024-04-19-flink-monitoring-by-skywalking/</guid>
      <description>
        
        
        &lt;h1 id=&#34;background&#34;&gt;Background&lt;/h1&gt;
&lt;p&gt;&lt;a href=&#34;https://flink.apache.org/&#34;&gt;Apache Flink&lt;/a&gt; is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments, perform computations at in-memory speed and at any scale.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://skywalking.apache.org/&#34;&gt;Apache SkyWalking&lt;/a&gt; is an application performance monitor tool for distributed systems, especially designed for microservices, cloud native and container-based (Kubernetes) architectures.&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;https://opentelemetry.io/&#34;&gt;OpenTelemetry&lt;/a&gt; is a collection of APIs, SDKs, and tools. Use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) to help you analyze your software’s performance and behavior.&lt;/p&gt;
&lt;p&gt;Since &lt;code&gt;SkyWalking&lt;/code&gt; 10.3, a new out-of-the-box feature has been introduced that enables Flink monitoring data to be visualized on the SkyWalking UI via the OpenTelemetry Collector, which gathers metrics from Flink endpoints.&lt;/p&gt;
&lt;h1 id=&#34;development&#34;&gt;Development&lt;/h1&gt;
&lt;h2 id=&#34;preparation&#34;&gt;Preparation&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/apache/skywalking&#34;&gt;SkyWalking OAP,v10.3 +&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/apache/flink&#34;&gt;Flink v2.0-preview1 +&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/open-telemetry/opentelemetry-collector-contrib&#34;&gt;OpenTelemetry-collector v0.87+&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;process&#34;&gt;Process&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;Set up &lt;code&gt;SkyWalking&lt;/code&gt; oap and UI.&lt;/li&gt;
&lt;li&gt;Set up the &lt;code&gt;Flink&lt;/code&gt; cluster By configuring &lt;code&gt;jobmanager&lt;/code&gt; and &lt;code&gt;taskmanager&lt;/code&gt; to expose prometheus http endpoints.&lt;/li&gt;
&lt;li&gt;Set up &lt;code&gt;OpenTelemetry-collector&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Run your job.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;data-flow&#34;&gt;Data flow&lt;/h2&gt;
&lt;p&gt;&lt;img src=&#34;data-flow.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;configuration&#34;&gt;Configuration&lt;/h2&gt;
&lt;h3 id=&#34;docker-compose&#34;&gt;docker-compose&lt;/h3&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;version: &amp;#34;3&amp;#34;

services:
  oap:
    extends:
      file: ../../script/docker-compose/base-compose.yml
      service: oap
    ports:
      - &amp;#34;12800:12800&amp;#34;
    networks:
      - e2e

  banyandb:
    extends:
      file: ../../script/docker-compose/base-compose.yml
      service: banyandb
    ports:
      - 17912

  jobmanager:
    image: flink:2.0-preview1
    environment:
      - |
        FLINK_PROPERTIES=
        jobmanager.rpc.address: jobmanager
        metrics.reporter.prom.factory.class: org.apache.flink.metrics.prometheus.PrometheusReporterFactory
        metrics.reporter.prom.port: 9260
    ports:
      - &amp;#34;8081:8081&amp;#34;
      - &amp;#34;9260:9260&amp;#34;
    command: jobmanager
    healthcheck:
      test: [&amp;#34;CMD&amp;#34;, &amp;#34;curl&amp;#34;, &amp;#34;-f&amp;#34;, &amp;#34;http://localhost:8081&amp;#34;]
      interval: 30s
      timeout: 10s
      retries: 3
    networks:
      - e2e

  taskmanager:
    image: flink:2.0-preview1
    environment:
      - |
        FLINK_PROPERTIES=
        jobmanager.rpc.address: jobmanager
        metrics.reporter.prom.factory.class: org.apache.flink.metrics.prometheus.PrometheusReporterFactory
        metrics.reporter.prom.port: 9261
    depends_on:
      jobmanager:
        condition: service_healthy
    ports:
      - &amp;#34;9261:9261&amp;#34;
    command: taskmanager
    healthcheck:
      test: [&amp;#34;CMD&amp;#34;, &amp;#34;curl&amp;#34;, &amp;#34;-f&amp;#34;, &amp;#34;http://localhost:9261/metrics&amp;#34;]
      interval: 30s
      timeout: 10s
      retries: 3
    networks:
      - e2e

  executeJob:
    image: flink:2.0-preview1
    depends_on:
      taskmanager:
        condition: service_healthy
    command: &amp;gt;
      bash -c &amp;#34;
      ./bin/flink run -m jobmanager:8081 examples/streaming/WindowJoin.jar&amp;#34;
    networks:
      - e2e

  otel-collector:
    image: otel/opentelemetry-collector:${OTEL_COLLECTOR_VERSION}
    networks:
      - e2e
    command: [ &amp;#34;--config=/etc/otel-collector-config.yaml&amp;#34; ]
    volumes:
      - ./otel-collector-config.yaml:/etc/otel-collector-config.yaml
    expose:
      - 55678
    depends_on:
      oap:
        condition: service_healthy

networks:
  e2e:
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you plan to expose metrics data using the pushGateway pattern,
please refer to the &lt;a href=&#34;https://nightlies.apache.org/flink/flink-docs-release-2.0-preview1/docs/deployment/metric_reporters/#prometheuspushgateway&#34;&gt;documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h3 id=&#34;opentelemetry-collector&#34;&gt;OpenTelemetry-collector&lt;/h3&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;receivers:
  prometheus:
    config:
      scrape_configs:
        - job_name: &amp;#34;flink-jobManager-monitoring&amp;#34;
          scrape_interval: 30s
          static_configs:
            - targets: [&amp;#39;jobmanager:9260&amp;#39;]
              labels:
                cluster: flink-cluster
          relabel_configs:
            - source_labels: [ __address__ ]
              target_label: jobManager_node
              replacement: $$1
          metric_relabel_configs:
            - source_labels: [ job_name ]
              action: replace
              target_label: flink_job_name
              replacement: $$1
            - source_labels: [ ]
              target_label: job_name
              replacement: flink-jobManager-monitoring

        - job_name: &amp;#34;flink-taskManager-monitoring&amp;#34;
          scrape_interval: 30s
          static_configs:
            - targets: [ &amp;#34;taskmanager:9261&amp;#34; ]
              labels:
                cluster: flink-cluster
          relabel_configs:
            - source_labels: [ __address__ ]
              regex: (.+)
              target_label: taskManager_node
              replacement: $$1
          metric_relabel_configs:
            - source_labels: [ job_name ]
              action: replace
              target_label: flink_job_name
              replacement: $$1
            - source_labels: [ ]
              target_label: job_name
              replacement: flink-taskManager-monitoring

exporters:
  otlp:
    endpoint: oap:11800
    tls:
      insecure: true

processors:
  batch:
service:
  pipelines:
    metrics:
      receivers:
        - prometheus
      processors:
        - batch
      exporters:
        - otlp
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Warning:&lt;br&gt;
Please do not edit the value of the &lt;code&gt;job_name&lt;/code&gt; configuration, otherwise &lt;code&gt;SkyWalking&lt;/code&gt; will not handle these data.&lt;br&gt;
&lt;code&gt;oap&lt;/code&gt; means the address of your &lt;code&gt;SkyWalking oap&lt;/code&gt; address,please replace it accordingly.&lt;br&gt;
Since the original &lt;code&gt;Flink metrics&lt;/code&gt; contain the  &lt;code&gt;job_name&lt;/code&gt; labels, and SkyWalking relies on the &lt;code&gt;job_name&lt;/code&gt; label to handle OpenTelemetry data,
to avoid conflicts, we use &lt;code&gt;metric_relabel_configs&lt;/code&gt; to rename the original &lt;code&gt;job_name&lt;/code&gt; label to &lt;code&gt;flink_job_name&lt;/code&gt;.&lt;/p&gt;
&lt;h1 id=&#34;metrics-definition&#34;&gt;Metrics Definition&lt;/h1&gt;
&lt;p&gt;Monitoring metrics involve in &lt;code&gt;Cluster Metrics&lt;/code&gt;, &lt;code&gt;TaskManager Metrics&lt;/code&gt;, and &lt;code&gt;Job Metrics&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;cluster-metrics&#34;&gt;Cluster Metrics&lt;/h2&gt;
&lt;p&gt;&lt;img src=&#34;cluster-dashboard-1.png&#34; alt=&#34;&#34;&gt;
&lt;img src=&#34;cluster-dashboard-2.png&#34; alt=&#34;&#34;&gt;
&lt;img src=&#34;cluster-dashboard-3.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Cluster Metrics&lt;/code&gt; mainly focuses on statistics from the perspective of the entire cluster, as well as displaying JVM-related metrics of the JobManager, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Running Jobs&lt;/code&gt;：The number of currently running jobs.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;TaskManagers&lt;/code&gt;：The number of TaskManagers.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Task Managers Slots Total&lt;/code&gt;：The total number of TaskManager slots.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Task Managers Slots Available&lt;/code&gt;：The number of available TaskManager slots.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;JVM CPU Load&lt;/code&gt;：The CPU load of the JobManager&amp;rsquo;s JVM.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;taskmanager-metrics&#34;&gt;TaskManager Metrics&lt;/h2&gt;
&lt;p&gt;&lt;img src=&#34;broker-dashboard-1.png&#34; alt=&#34;&#34;&gt;
&lt;img src=&#34;broker-dashboard-2.png&#34; alt=&#34;&#34;&gt;
&lt;img src=&#34;broker-dashboard-3.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;TaskManager Metrics&lt;/code&gt; mainly focuses on statistics from the perspective of individual TaskManager nodes, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;JVM Memory Heap Used&lt;/code&gt;：The amount of JVM heap memory used on the TaskManager node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;JVM Memory Heap Available&lt;/code&gt;：The amount of JVM heap memory available on the TaskManager node.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NumRecordsIn&lt;/code&gt;：The number of records received per minute by the TaskManager.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NumBytesInPerSecond&lt;/code&gt;：The number of bytes received per second by the TaskManager.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;IsBackPressured&lt;/code&gt;：Indicates whether the TaskManager node is under backpressure.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;IdleTimeMsPerSecond&lt;/code&gt;：The idle time per second of the TaskManager node.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;job-metrics&#34;&gt;Job Metrics&lt;/h2&gt;
&lt;p&gt;&lt;img src=&#34;topic-dashboard-1.png&#34; alt=&#34;&#34;&gt;
&lt;img src=&#34;topic-dashboard-2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;Job Metrics&lt;/code&gt;mainly focuses on statistics from the perspective of running jobs, such as:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;Job RunningTime&lt;/code&gt;：The duration for which the job has been running.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Job Restart Number&lt;/code&gt;：The number of times the job has been restarted.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;Checkpoints Failed&lt;/code&gt;：The number of failed checkpoints.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;NumBytesInPerSecond&lt;/code&gt;：The number of bytes received per second by the job.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;You can find explanations for each metric in the tip of the corresponding chart.&lt;br&gt;
&lt;img src=&#34;tip.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h1 id=&#34;references&#34;&gt;References&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://nightlies.apache.org/flink/flink-docs-release-2.0-preview1/docs/deployment/metric_reporters/#prometheus&#34;&gt;Flink Prometheus&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/setup/backend/backend-flink-monitoring/&#34;&gt;SkyWalking Flink Monitoring&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Blog: New Features of SkyWalking Go 0.2.0</title>
      <link>/blog/2023-07-31-skywalking-go-0.2.0-release/</link>
      <pubDate>Mon, 31 Jul 2023 00:00:00 +0000</pubDate>
      <guid>/blog/2023-07-31-skywalking-go-0.2.0-release/</guid>
      <description>
        
        
        &lt;h1 id=&#34;announcing-apache-skywalking-go-020&#34;&gt;Announcing Apache SkyWalking Go 0.2.0&lt;/h1&gt;
&lt;p&gt;I&amp;rsquo;m excited to announce the release of Apache SkyWalking Go 0.2.0! This version packs several awesome new features that I&amp;rsquo;ll overview below.&lt;/p&gt;
&lt;h1 id=&#34;log-reporting&#34;&gt;Log Reporting&lt;/h1&gt;
&lt;p&gt;The log reporting feature allows the Go agent to automatically collect log content from supported logging frameworks like &lt;a href=&#34;https://github.com/sirupsen/logrus&#34;&gt;logrus&lt;/a&gt; and &lt;a href=&#34;https://pkg.go.dev/go.uber.org/zap&#34;&gt;zap&lt;/a&gt;.
The logs are organized and sent to the SkyWalking backend for visualization. You can see how the logs appear for each service in the SkyWalking UI:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;reported_logging.png&#34; alt=&#34;Reported Logging&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;making-logs-searchable&#34;&gt;Making Logs Searchable&lt;/h2&gt;
&lt;p&gt;You can configure certain log fields to make them searchable in SkyWalking. Set the &lt;code&gt;SW_AGENT_LOG_REPORTER_LABEL_KEYS&lt;/code&gt; environment variable to include additional fields beyond the default log level.&lt;/p&gt;
&lt;p&gt;For example, with logrus:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-go&#34; data-lang=&#34;go&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#f6f8fa;background-color:#82071e&#34;&gt;#&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;define&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;log&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;with&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;fields&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;logrus&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;.&lt;/span&gt;&lt;span style=&#34;color:#6639ba&#34;&gt;WithField&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;module&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;test-service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;).&lt;/span&gt;&lt;span style=&#34;color:#6639ba&#34;&gt;Info&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;(&lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;test log&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;)&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;metrics-reporting&#34;&gt;Metrics Reporting&lt;/h2&gt;
&lt;p&gt;The agent can now collect and report custom metrics data from &lt;code&gt;runtime/metrics&lt;/code&gt; to the backend. Supported metrics are documented &lt;a href=&#34;https://pkg.go.dev/runtime/metrics#hdr-Metric_key_format&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;metrics.png&#34; alt=&#34;Runtime Metrics&#34;&gt;&lt;/p&gt;
&lt;h1 id=&#34;automatic-instrumentation&#34;&gt;Automatic Instrumentation&lt;/h1&gt;
&lt;p&gt;In 0.1.0, you had to manually integrate the agent into your apps. Now, the new commands can automatically analyze and instrument projects at a specified path, no code changes needed!
Try using the following command to import &lt;code&gt;skywalking-go&lt;/code&gt; into your project:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# inject to project at current path&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;skywalking-go-agent -inject&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;./ -all
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Or you can still use the original manual &lt;a href=&#34;https://github.com/apache/skywalking-go/blob/main/docs/en/setup/gobuild.md#22-code-dependency&#34;&gt;approach&lt;/a&gt; if preferred.&lt;/p&gt;
&lt;h1 id=&#34;get-it-now&#34;&gt;Get It Now!&lt;/h1&gt;
&lt;p&gt;Check out the &lt;a href=&#34;https://skywalking.apache.org/events/release-apache-skwaylking-go-0.2.0/&#34;&gt;CHANGELOG&lt;/a&gt; for the full list of additions and fixes. I encourage you to try out SkyWalking Go 0.2.0 today! Let me know if you have any feedback.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Blog: Build Grafana dashboards for Apache SkyWalking -- Native PromQL Support</title>
      <link>/blog/2023-03-17-build-grafana-dashboards-for-apache-skywalking-native-promql-support/</link>
      <pubDate>Thu, 16 Mar 2023 00:00:00 +0000</pubDate>
      <guid>/blog/2023-03-17-build-grafana-dashboards-for-apache-skywalking-native-promql-support/</guid>
      <description>
        
        
        &lt;h2 id=&#34;background&#34;&gt;Background&lt;/h2&gt;
&lt;p&gt;As an application performance monitoring tool for distributed systems, Apache SkyWalking provides monitoring, tracing, diagnosing capabilities for distributed system in Cloud Native architecture.
&lt;a href=&#34;https://prometheus.io/docs/introduction/overview/#what-is-prometheus&#34;&gt;Prometheus&lt;/a&gt; is an open-source systems monitoring and alerting toolkit with an active ecosystem.
Especially Prometheus metrics receive widespread support through &lt;a href=&#34;https://prometheus.io/docs/instrumenting/exporters/#exporters-and-integrations&#34;&gt;exporters and integrations&lt;/a&gt;.
&lt;a href=&#34;https://prometheus.io/docs/prometheus/latest/querying/basics/#querying-prometheus&#34;&gt;PromQL&lt;/a&gt; as Prometheus Querying Language containing a set of expressions and expose HTTP APIs to read metrics.&lt;/p&gt;
&lt;p&gt;SkyWalking supports to ingest Prometheus metrics through &lt;a href=&#34;https://opentelemetry.io/ecosystem/integrations/&#34;&gt;OpenTelemetry collector&lt;/a&gt; and through the aggregate calculation of these metrics
to provide a variety of systems monitoring, such as Linux Monitoring and Kubernetes monitoring.
SkyWalking already provides &lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/ui/readme/&#34;&gt;native UI&lt;/a&gt; and &lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/api/query-protocol/&#34;&gt;GraphQL API&lt;/a&gt; for users.
But as designed to provide wider ecological integration capabilities, since 9.4.0, it provides PromQL Service, the third-party systems or visualization platforms that already support PromQL (such as Grafana),
could obtain metrics through it. SkyWalking users will benefit from it when they integrate with different systems.&lt;/p&gt;
&lt;h2 id=&#34;what-is-promql-service-in-skywalking&#34;&gt;What is PromQL Service in SkyWalking?&lt;/h2&gt;
&lt;p&gt;PromQL Service is a query engine on the top of SkyWalking native GraphQL query, with additional query stage calculation capabilities powered by Prometheus expressions.
It can accept PromQL HTTP API requests, parse Prometheus expressions, and transform between Prometheus metrics and SkyWalking metrics.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;img_1.png#pic_left&#34; alt=&#34;PromQL Service architecture&#34;&gt;&lt;/p&gt;
&lt;p&gt;The PromQL Service follows all PromQL&amp;rsquo;s protocols and grammar and users can use it as they would with PromQL.
As SkyWalking is fundamentally different from Prometheus in terms of metric classification, format, storage, etc. PromQL Service doesn&amp;rsquo;t have to implement the full PromQL feature.
Refer to the documentation for the &lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/api/promql-service/#promql-service&#34;&gt;detail&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;skywalking-basic-concepts&#34;&gt;SkyWalking Basic Concepts&lt;/h2&gt;
&lt;p&gt;Here are some basic concepts and differences from Prometheus that users need to understand in order to use the PromQL service:
Prometheus metrics specify the naming format and structure, the actual metric names and labels are determined by the client provider, and the details are stored.
The user aggregates and calculates the metrics using the expression in PromQL.
Unlike Prometheus, SkyWalking&amp;rsquo;s metric mechanism is built around the following core concepts with a hierarchical structure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Layer: represents an abstract framework in computer science, such as Operating System(OS_LINUX layer), Kubernetes(k8s
layer). This layer would be the owner of different services detected from different technologies. All Layers definitions can be found &lt;a href=&#34;https://github.com/apache/skywalking/blob/master/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/analysis/Layer.java&#34;&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Service: Represents a set/group of workloads which provides the same behaviors for incoming requests.&lt;/li&gt;
&lt;li&gt;Service Instance: An individual workload in the Service group.&lt;/li&gt;
&lt;li&gt;Endpoint: A path in a service for incoming requests.&lt;/li&gt;
&lt;li&gt;Process: An operating system process. In some scenarios, a &lt;code&gt;service instance&lt;/code&gt; is not a process, such as a pod Kubernetes could contain multiple processes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The metric name and properties (labels) are configured by the SkyWalking OAP server based on the data source as well as OAL and MAL.
SkyWalking provides the ability to down-sampling time series metrics, and generate different time bucket data (minute, hour, day).&lt;/p&gt;
&lt;p&gt;The SkyWalking metric stream is as follows:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;img_3.png#pic_left&#34; alt=&#34;SkyWalking metrics stream&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;traffic&#34;&gt;Traffic&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The metadata of the
Service/ServiceRelation/Instance/ServiceInstanceRelation/Endpoint/EndpointRelation/Process/ProcessRelation.
Include names, layers, properties, relations between them, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;metric&#34;&gt;Metric&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Name: metric name, configuration from OAL and MAL.&lt;/li&gt;
&lt;li&gt;Entity: represents the metrics&amp;rsquo; belonging and used for the query.
An Entity will contain the following information depending on the &lt;code&gt;Scope&lt;/code&gt;：
Scope represents the metrics level and in query stage represents the Scope catalog,
Scope catalog provides high-dimension classifications for all scopes as a hierarchy structure.&lt;/li&gt;
&lt;/ul&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;Scope&lt;/th&gt;
          &lt;th&gt;Entity Info&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Service&lt;/td&gt;
          &lt;td&gt;Service(include layer info)&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;ServiceInstance&lt;/td&gt;
          &lt;td&gt;Service, ServiceInstance&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Endpoint&lt;/td&gt;
          &lt;td&gt;Service, Endpoint&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;ServiceRelation&lt;/td&gt;
          &lt;td&gt;Service, DestService&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;ServiceInstanceRelation&lt;/td&gt;
          &lt;td&gt;ServiceInstance, DestServiceInstance&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;EndpointRelation&lt;/td&gt;
          &lt;td&gt;Endpoint, DestEndpoint&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Process&lt;/td&gt;
          &lt;td&gt;Service, ServiceInstance, Process&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;ProcessRelation&lt;/td&gt;
          &lt;td&gt;Process,  ServiceInstance, DestProcess&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;Value:&lt;/li&gt;
&lt;/ul&gt;
&lt;ol&gt;
&lt;li&gt;single value: long.&lt;/li&gt;
&lt;li&gt;labeled value: text, &lt;code&gt;label1,value1|label2,value2|...&lt;/code&gt;, such as &lt;code&gt;L2 aggregation,5000 | L1 aggregation,8000&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;ul&gt;
&lt;li&gt;TimeBucket: the time is accurate to minute, hour, day.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;how-to-use-promql-service&#34;&gt;How to use PromQL Service&lt;/h2&gt;
&lt;h3 id=&#34;setup&#34;&gt;Setup&lt;/h3&gt;
&lt;p&gt;PromQL Service is enabled by default after v9.4.0, so no additional configuration is required.
The default ports, for example, can be configured by using OAP environment variables:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;restHost: ${SW_PROMQL_REST_HOST:0.0.0.0}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;restPort: ${SW_PROMQL_REST_PORT:9090}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;restContextPath: ${SW_PROMQL_REST_CONTEXT_PATH:/}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;restMaxThreads: ${SW_PROMQL_REST_MAX_THREADS:200}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;restIdleTimeOut: ${SW_PROMQL_REST_IDLE_TIMEOUT:30000}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;restAcceptQueueSize: ${SW_PROMQL_REST_QUEUE_SIZE:0}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;use-prometheus-expression&#34;&gt;Use Prometheus expression&lt;/h3&gt;
&lt;p&gt;PromQL matches metric through the Prometheus expression. Here is a typical Prometheus metric.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;img_2.png#pic_left&#34; alt=&#34;Prometheus metric&#34;&gt;&lt;/p&gt;
&lt;p&gt;To match the metric, the Prometheus expression is as follows:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;img_4.png#pic_left&#34; alt=&#34;Prometheus expression&#34;&gt;&lt;/p&gt;
&lt;p&gt;In the PromQL Service, these reserved labels would be parsed as the metric name and entity info fields with other labels for the query. The mappings are as follows.&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;SkyWalking Concepts&lt;/th&gt;
          &lt;th&gt;Prometheus expression&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Metric name&lt;/td&gt;
          &lt;td&gt;Metric name&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Layer&lt;/td&gt;
          &lt;td&gt;Label&lt;layer&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Service&lt;/td&gt;
          &lt;td&gt;Label&lt;service&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;ServiceInstance&lt;/td&gt;
          &lt;td&gt;Label&amp;lt;service_instance&amp;gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Endpoint&lt;/td&gt;
          &lt;td&gt;Label&lt;endpoint&gt;&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;&amp;hellip;&lt;/td&gt;
          &lt;td&gt;&amp;hellip;&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;For example, the following expressions are used to match query metrics: service_cpm, service_instance_cpm, endpoint_cpm&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;service_cpm{service=&amp;#39;agent::songs&amp;#39;, layer=&amp;#39;GENERAL&amp;#39;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;service_instance_cpm{service=&amp;#39;agent::songs&amp;#39;, service_instance=&amp;#39;agent::songs_instance_1&amp;#39;, layer=&amp;#39;GENERAL&amp;#39;}
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;endpoint_cpm{service=&amp;#39;agent::songs&amp;#39;, endpoint=&amp;#39;GET:/songs&amp;#39;, layer=&amp;#39;GENERAL&amp;#39;} 
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;typical-query-example&#34;&gt;Typical Query Example&lt;/h3&gt;
&lt;p&gt;At here, we take the &lt;a href=&#34;https://skywalking.apache.org/docs/skywalking-showcase/next/readme/&#34;&gt;SkyWalking Showcase&lt;/a&gt; deployment as the playground to demonstrate how to use PromQL for SkyWalking metrics.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;img_5.png&#34; alt=&#34;Example Services&#34;&gt;&lt;/p&gt;
&lt;p&gt;The following examples can be used to query the metadata and metrics of services through PromQL Service.&lt;/p&gt;
&lt;h4 id=&#34;get-metrics-names&#34;&gt;Get metrics names&lt;/h4&gt;
&lt;p&gt;Query:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;http://localhost:9099/api/v1/label/__name__/values
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Result:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;status&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;success&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;data&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;meter_mysql_instance_qps&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;service_cpm&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;envoy_cluster_up_rq_active&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;instance_jvm_class_loaded_class_count&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;k8s_cluster_memory_requests&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;meter_vm_memory_used&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;meter_apisix_sv_bandwidth_unmatched&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;meter_vm_memory_total&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#f6f8fa;background-color:#82071e&#34;&gt;...&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#1f2328&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;select-a-metric-and-get-the-labels&#34;&gt;Select a metric and get the labels&lt;/h4&gt;
&lt;p&gt;Query:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;http://localhost:9099/api/v1/labels?match[]=service_cpm
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Result:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;status&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;success&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;data&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;layer&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;top_n&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;order&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#1f2328&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;get-services-from-a-specific-layer&#34;&gt;Get services from a specific layer&lt;/h4&gt;
&lt;p&gt;Query:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;http://127.0.0.1:9099/api/v1/series?match[]=service_traffic{layer=&amp;#39;GENERAL&amp;#39;}&amp;amp;start=1677479336&amp;amp;end=1677479636
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Result:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;status&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;success&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;data&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#1f2328&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;__name__&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;service_traffic&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;agent::songs&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;scope&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;Service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;layer&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;GENERAL&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#1f2328&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#1f2328&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;__name__&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;service_traffic&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;agent::recommendation&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;scope&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;Service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;layer&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;GENERAL&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#1f2328&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#1f2328&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;__name__&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;service_traffic&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;agent::app&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;scope&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;Service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;layer&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;GENERAL&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#1f2328&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#1f2328&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;__name__&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;service_traffic&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;agent::gateway&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;scope&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;Service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;layer&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;GENERAL&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#1f2328&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#1f2328&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;__name__&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;service_traffic&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;agent::frontend&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;scope&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;Service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;            &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;layer&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;GENERAL&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#1f2328&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#1f2328&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h4 id=&#34;query-specific-metric-for-a-service&#34;&gt;Query specific metric for a service&lt;/h4&gt;
&lt;p&gt;Query:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;http://127.0.0.1:9099/api/v1/query?query=service_cpm{service=&amp;#39;agent::songs&amp;#39;, layer=&amp;#39;GENERAL&amp;#39;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Result:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-json&#34; data-lang=&#34;json&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;status&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;success&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;data&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#1f2328&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;resultType&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;vector&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;result&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#1f2328&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;metric&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#1f2328&#34;&gt;{&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;__name__&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;service_cpm&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;layer&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;GENERAL&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;scope&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;Service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;service&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;agent::songs&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#1f2328&#34;&gt;},&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#0550ae&#34;&gt;&amp;#34;value&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt; &lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#0550ae&#34;&gt;1679559960&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;,&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;          &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;6&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;        &lt;span style=&#34;color:#1f2328&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;      &lt;span style=&#34;color:#1f2328&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;    &lt;span style=&#34;color:#1f2328&#34;&gt;]&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;  &lt;span style=&#34;color:#1f2328&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;}&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;About the &lt;code&gt;range query&lt;/code&gt; and different &lt;code&gt;metrics type for query&lt;/code&gt; can refer to the document &lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/api/promql-service&#34;&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;build-grafana-dashboard&#34;&gt;Build Grafana Dashboard&lt;/h2&gt;
&lt;p&gt;From the above, we know the mechanism and how to query from PromQL Service, now we can build the Grafana Dashboard for the above service example.
&lt;strong&gt;Note&lt;/strong&gt;: All the following configurations are based on Grafana version 9.1.0.&lt;/p&gt;
&lt;p&gt;SkyWalking Showcase provides dashboards files such as services of &lt;code&gt;General&lt;/code&gt; and &lt;code&gt;Service Mesh&lt;/code&gt; layers，
we can quickly create a dashboard for the &lt;code&gt;General&lt;/code&gt; layer service by importing the dashboard JSON file.&lt;/p&gt;
&lt;p&gt;After the Grafana application is deployed, follow the steps below:&lt;/p&gt;
&lt;h3 id=&#34;configure-data-source&#34;&gt;Configure Data Source&lt;/h3&gt;
&lt;p&gt;First, we need to create a data source:
In the data source config panel, chose &lt;code&gt;Prometheus&lt;/code&gt; and set the URL to the OAP server address, the default port is &lt;code&gt;9090&lt;/code&gt;.
Here set the data source name &lt;code&gt;SkyWalking&lt;/code&gt; in case there are multiple Prometheus data sources.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;datasource.jpg&#34; alt=&#34;datasource.jpg&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;import-dashboard-file&#34;&gt;Import Dashboard File&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a dashboard folder named &lt;code&gt;SkyWalking&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;dashboard-folder.jpg&#34; alt=&#34;dashboard-folder.jpg&#34;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Import the dashboard file into Grafana, there are two ways to get the file:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;From &lt;a href=&#34;https://github.com/apache/skywalking-showcase/tree/main/deploy/platform/config/promql/dashboards&#34;&gt;SkyWalking Showcase&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Go to SkyWaking Demo: &lt;a href=&#34;https://skywalking.apache.org/#demo&#34;&gt;Preview metrics on Grafana&lt;/a&gt;, and export it from the &lt;code&gt;General Service&lt;/code&gt; dashboard.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&#34;dashboard-import.jpg&#34; alt=&#34;dashboard-import.jpg&#34;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Done! Now we can see the dashboard is working, the services are in the drop-down list and the metrics are displayed on the panels.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;dashboard.jpg&#34; alt=&#34;dashboard.jpg&#34;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;This is an easy way to build, but we need to know how it works if we want to customize it.&lt;/p&gt;
&lt;h3 id=&#34;how-the-dashboard-works&#34;&gt;How the dashboard works&lt;/h3&gt;
&lt;h4 id=&#34;dashboard-settings&#34;&gt;Dashboard Settings&lt;/h4&gt;
&lt;p&gt;Open the &lt;code&gt;Settings-Variables&lt;/code&gt; we can see the following variables:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;dashboard-variables.jpg&#34; alt=&#34;dashboard-variables.jpg&#34;&gt;&lt;/p&gt;
&lt;p&gt;Let&amp;rsquo;s look at what each variable does:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;$DS_SkyWalking&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is a data source ty variable that specifies the Prometheus data source which was defined earlier as &lt;code&gt;SkyWalking&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;v-DS_SkyWalking.jpg&#34; alt=&#34;v-DS_SkyWalking.jpg&#34;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;$layer&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is a constant type because in the &amp;lsquo;General Service&amp;rsquo; dashboard, all services belong to the &amp;lsquo;GENERAL&amp;rsquo; layer, so they can be used directly in each query
&lt;strong&gt;Note&lt;/strong&gt; When you customize other layers, this value must be defined in the &lt;code&gt;Layer&lt;/code&gt; mentioned above.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;v-layer.jpg&#34; alt=&#34;v-layer.jpg&#34;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;$service&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Query type variable, to get all service names under this layer for the drop-down list.&lt;/p&gt;
&lt;p&gt;Query expression:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;label_values(service_traffic{layer=&amp;#39;$layer&amp;#39;}, service)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The query expression will query HTTP API &lt;code&gt;/api/v1/series&lt;/code&gt; for service metadata in &lt;code&gt;$layer&lt;/code&gt; and fetch the service name according to the label(service).&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;v-service.jpg&#34; alt=&#34;v-service.jpg&#34;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;$service_instance&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Same as the &lt;code&gt;$service&lt;/code&gt; is a query variable that is used to select all instances of the service in the drop-down list.&lt;/p&gt;
&lt;p&gt;Query expression:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;label_values(instance_traffic{layer=&amp;#39;$layer&amp;#39;, service=&amp;#39;$service&amp;#39;}, service_instance)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The query expression here not only specifies the &lt;code&gt;$layer&lt;/code&gt; but also contains the variable &lt;code&gt;$service&lt;/code&gt;, which is used to correlate with the services for the drop-down list.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;$endpoint&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Same as the &lt;code&gt;$service&lt;/code&gt; is a query variable that is used to select all endpoints of the service in the drop-down list.&lt;/p&gt;
&lt;p&gt;Query expression:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;label_values(endpoint_traffic{layer=&amp;#39;$layer&amp;#39;, service=&amp;#39;$service&amp;#39;, keyword=&amp;#39;$endpoint_keyword&amp;#39;, limit=&amp;#39;$endpoint_limit&amp;#39;}, endpoint)
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The query expression here specifies the &lt;code&gt;$layer&lt;/code&gt; and &lt;code&gt;$service&lt;/code&gt; which are used to correlate with the services for the drop-down list. And also
accept variables &lt;code&gt;$endpoint_keyword&lt;/code&gt; and &lt;code&gt;$endpoint_limit&lt;/code&gt; as filtering condition.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;$endpoint_keyword&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;A text type variable that the user can input to filter the return value of &lt;code&gt;$endpoint&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;v-endpoint_keyword.jpg&#34; alt=&#34;v-endpoint_keyword.jpg&#34;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;$endpoint_limit&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Custom type, which the user can select to limit the maximum number of returned endpoints.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;v-endpoint_limit.jpg&#34; alt=&#34;v-endpoint_limit.jpg&#34;&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h4 id=&#34;panel-configurations&#34;&gt;Panel Configurations&lt;/h4&gt;
&lt;p&gt;There are several typical metrics panels on this dashboard, let&amp;rsquo;s see how it&amp;rsquo;s configured.&lt;/p&gt;
&lt;h5 id=&#34;common-value-metrics&#34;&gt;Common Value Metrics&lt;/h5&gt;
&lt;p&gt;Select &lt;code&gt;Time series chart&lt;/code&gt; panel &lt;code&gt;Service Apdex&lt;/code&gt; and click &lt;code&gt;edit&lt;/code&gt;.
&lt;img src=&#34;panel-common-value.jpg&#34; alt=&#34;panel-common-value.jpg&#34;&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Query expression
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;service_apdex{service=&amp;#39;$service&amp;#39;, layer=&amp;#39;$layer&amp;#39;} / 10000
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;The metric scope is &lt;code&gt;Service&lt;/code&gt;, add labels &lt;code&gt;service&lt;/code&gt; and &lt;code&gt;layer&lt;/code&gt; for the match, and the label value used the variables configured above.
The calculation &lt;code&gt;Divided by 10000&lt;/code&gt; is used for matching the result units.
The document for the query can refer to &lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/api/promql-service/#common-value-metrics&#34;&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;Query options --&amp;gt; Min interval = 1m&lt;/code&gt;, because the metrics min time bucket in SkyWalking is 1m.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;Connect null values --&amp;gt; Always&lt;/code&gt; and &lt;code&gt;Show points --&amp;gt; Always&lt;/code&gt; because when the query interval &amp;gt; 1 hour or 1 day SkyWalking returns
the hour/day step metrics values.&lt;/li&gt;
&lt;/ol&gt;
&lt;h5 id=&#34;labeled-value-metrics&#34;&gt;Labeled Value Metrics&lt;/h5&gt;
&lt;p&gt;Select &lt;code&gt;Time series chart&lt;/code&gt; panel &lt;code&gt;Service Response Time Percentile&lt;/code&gt; and click &lt;code&gt;edit&lt;/code&gt;.
&lt;img src=&#34;panel-labeled-value.jpg&#34; alt=&#34;panel-labeled-value.jpg&#34;&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Query expression
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;service_percentile{service=&amp;#39;$service&amp;#39;, layer=&amp;#39;$layer&amp;#39;, labels=&amp;#39;0,1,2,3,4&amp;#39;, relabels=&amp;#39;P50,P75,P90,P95,P99&amp;#39;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;The metric scope is &lt;code&gt;Service&lt;/code&gt;, add labels &lt;code&gt;service&lt;/code&gt; and &lt;code&gt;layer&lt;/code&gt; for the match, and the label value used the variables configured above.
Add &lt;code&gt;labels=&#39;0,1,2,3,4&#39;&lt;/code&gt; filter the result label, and add&lt;code&gt;relabels=&#39;P50,P75,P90,P95,P99&#39;&lt;/code&gt; rename the result label.
The document for the query can refer to &lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/api/promql-service/#labeled-value-metrics&#34;&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;Query options --&amp;gt; Min interval = 1m&lt;/code&gt;, because the metrics min time bucket in SkyWalking is 1m.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;Connect null values --&amp;gt; Always&lt;/code&gt; and &lt;code&gt;Show points --&amp;gt; Always&lt;/code&gt; because when the query interval &amp;gt; 1 hour or 1 day SkyWalking returns
the hour/day step metrics values.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;Legend&lt;/code&gt; to &lt;code&gt;{{label}}&lt;/code&gt; for show up.&lt;/li&gt;
&lt;/ol&gt;
&lt;h5 id=&#34;sort-metrics&#34;&gt;Sort Metrics&lt;/h5&gt;
&lt;p&gt;Select &lt;code&gt;Time series chart&lt;/code&gt; panel &lt;code&gt;Service Response Time Percentile&lt;/code&gt; and click &lt;code&gt;edit&lt;/code&gt;.
&lt;img src=&#34;panel-sort-metric.jpg&#34; alt=&#34;panel-sort-metric.jpg&#34;&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Query expression
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-text&#34; data-lang=&#34;text&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;service_instance_cpm{parent_service=&amp;#39;$service&amp;#39;, layer=&amp;#39;$layer&amp;#39;, top_n=&amp;#39;10&amp;#39;, order=&amp;#39;DES&amp;#39;}
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;The expression is used for query the sore metrics under service, so add labels &lt;code&gt;parent_service&lt;/code&gt; and &lt;code&gt;layer&lt;/code&gt; for the match.
Add &lt;code&gt;top_n=&#39;10&#39;&lt;/code&gt; and &lt;code&gt;order=&#39;DES&#39;&lt;/code&gt; filter the result.
The document for the query can refer to &lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/api/promql-service/#sort-metrics&#34;&gt;here&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;Query options --&amp;gt; Min interval = 1m&lt;/code&gt;, because the metrics min time bucket in SkyWalking is 1m.&lt;/li&gt;
&lt;li&gt;Set the &lt;code&gt;Calculation --&amp;gt; Latest*&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;Legend&lt;/code&gt; to &lt;code&gt;{{service_instance}}&lt;/code&gt; for show up.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In this article, we introduced what is the PromQL Service in SkyWalking and its background.
Detailed how to use PromQL Service and the basic concepts related to SkyWalking, and show how to use PromQL Service to build Grafana dashboards for SkyWalking.&lt;/p&gt;
&lt;p&gt;In the future, there will be more integrations by leveraging this protocol, such as CI/CD, HPA (scaling), etc.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Blog: eBPF enhanced HTTP observability - L7 metrics and tracing</title>
      <link>/blog/ebpf-enhanced-http-observability-l7-metrics-and-tracing/</link>
      <pubDate>Thu, 12 Jan 2023 00:00:00 +0000</pubDate>
      <guid>/blog/ebpf-enhanced-http-observability-l7-metrics-and-tracing/</guid>
      <description>
        
        
        &lt;p&gt;&lt;img src=&#34;banner.jpg&#34; alt=&#34;banner&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;background&#34;&gt;Background&lt;/h2&gt;
&lt;p&gt;Apache SkyWalking is an open-source Application Performance Management system that helps users collect and aggregate logs, traces, metrics, and events for display on a UI. In the &lt;a href=&#34;/blog/diagnose-service-mesh-network-performance-with-ebpf/&#34;&gt;previous article&lt;/a&gt;, we introduced how to use Apache SkyWalking Rover to analyze the network performance issue in the service mesh environment. However, in business scenarios, users often rely on mature layer 7 protocols, such as HTTP, for interactions between systems. In this article, we will discuss how to use eBPF techniques to analyze performance bottlenecks of layer 7 protocols and how to enhance the tracing system using network sampling.&lt;/p&gt;
&lt;p&gt;This article will show how to use &lt;a href=&#34;https://github.com/apache/skywalking&#34;&gt;Apache SkyWalking&lt;/a&gt; with &lt;a href=&#34;https://ebpf.io/what-is-ebpf/&#34;&gt;eBPF&lt;/a&gt; to enhance metrics and traces in HTTP observability.&lt;/p&gt;
&lt;h2 id=&#34;http-protocol-analysis&#34;&gt;HTTP Protocol Analysis&lt;/h2&gt;
&lt;p&gt;HTTP is one of the most common Layer 7 protocols and is usually used to provide services to external parties and for inter-system communication. In the following sections, we will show how to identify and analyze HTTP/1.x protocols.&lt;/p&gt;
&lt;h3 id=&#34;protocol-identification&#34;&gt;Protocol Identification&lt;/h3&gt;
&lt;p&gt;In HTTP/1.x, the client and server communicate through a single file descriptor (FD) on each side. Figure 1 shows the process of communication involving the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Connect/accept: The client establishes a connection with the HTTP server, or the server accepts a connection from the client.&lt;/li&gt;
&lt;li&gt;Read/write (multiple times): The client or server reads and writes HTTPS requests and responses. A single request-response pair occurs within the same connection on each side.&lt;/li&gt;
&lt;li&gt;Close: The client and server close the connection.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;To obtain HTTP content, it’s necessary to read it from the second step of this process. As defined in the &lt;a href=&#34;http://rfc-editor.org/rfc/rfc2068.html&#34;&gt;RFC&lt;/a&gt;, the content is contained within the data of the Layer 4 protocol and can be obtained by parsing the data. The request and response pair can be correlated because they both occur within the same connection on each side.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f1.png&#34; alt=&#34;Figure 1: HTTP communication timeline.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 1: HTTP communication timeline.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;http-pipeline&#34;&gt;HTTP Pipeline&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/HTTP_pipelining&#34;&gt;HTTP pipelining&lt;/a&gt; is a feature of HTTP/1.1 that enables multiple HTTP requests to be sent over a single TCP connection without waiting for the corresponding responses. This feature is important because it ensures that the order of the responses on the server side matches the order of the requests.&lt;/p&gt;
&lt;p&gt;Figure 2 illustrates how this works. Consider the following scenario: an HTTP client sends multiple requests to a server, and the server responds by sending the HTTP responses in the same order as the requests. This means that the first request sent by the client will receive the first response from the server, the second request will receive the second response, and so on.&lt;/p&gt;
&lt;p&gt;When designing HTTP parsing, we should follow this principle by adding request data to a list and removing the first item when parsing a response. This ensures that the responses are processed in the correct order.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f2.png&#34; alt=&#34;Figure 2: HTTP/1.1  pipeline.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 2: HTTP/1.1  pipeline.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;metrics&#34;&gt;Metrics&lt;/h3&gt;
&lt;p&gt;Based on the identification of the HTTP content and process topology diagram mentioned in the previous article, we can combine these two to generate process-to-process metrics data.&lt;/p&gt;
&lt;p&gt;Figure 3 shows the metrics that currently support the analysis between the two processes. Based on the HTTP request and response data, we can analyze the following data:&lt;/p&gt;
&lt;table&gt;
  &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;&lt;strong&gt;Metrics Name&lt;/strong&gt;&lt;/th&gt;
          &lt;th&gt;&lt;strong&gt;Type&lt;/strong&gt;&lt;/th&gt;
          &lt;th&gt;&lt;strong&gt;Unit&lt;/strong&gt;&lt;/th&gt;
          &lt;th&gt;&lt;strong&gt;Description&lt;/strong&gt;&lt;/th&gt;
      &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
      &lt;tr&gt;
          &lt;td&gt;Request CPM(Call Per Minute)&lt;/td&gt;
          &lt;td&gt;Counter&lt;/td&gt;
          &lt;td&gt;count&lt;/td&gt;
          &lt;td&gt;The HTTP request count&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Response Status CPM(Call Per Minute)&lt;/td&gt;
          &lt;td&gt;Counter&lt;/td&gt;
          &lt;td&gt;count&lt;/td&gt;
          &lt;td&gt;The count of per HTTP response status code&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Request Package Size&lt;/td&gt;
          &lt;td&gt;Counter/Histogram&lt;/td&gt;
          &lt;td&gt;Byte&lt;/td&gt;
          &lt;td&gt;The request package size&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Response Package Size&lt;/td&gt;
          &lt;td&gt;Counter/Histogram&lt;/td&gt;
          &lt;td&gt;Byte&lt;/td&gt;
          &lt;td&gt;The response package size&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Client Duration&lt;/td&gt;
          &lt;td&gt;Counter/Histogram&lt;/td&gt;
          &lt;td&gt;Millisecond&lt;/td&gt;
          &lt;td&gt;The duration of single HTTP response on the client side&lt;/td&gt;
      &lt;/tr&gt;
      &lt;tr&gt;
          &lt;td&gt;Server Duration&lt;/td&gt;
          &lt;td&gt;Counter/Histogram&lt;/td&gt;
          &lt;td&gt;Millisecond&lt;/td&gt;
          &lt;td&gt;The duration of single HTTP response on the server side&lt;/td&gt;
      &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;img src=&#34;f3.png&#34; alt=&#34;Figure 3: Process-to-process metrics.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 3: Process-to-process metrics.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;http-and-trace&#34;&gt;HTTP and Trace&lt;/h2&gt;
&lt;p&gt;During the HTTP process, if we unpack the HTTP requests and responses from raw data, we can use this data to correlate with the existing tracing system.&lt;/p&gt;
&lt;h3 id=&#34;trace-context-identification&#34;&gt;Trace Context Identification&lt;/h3&gt;
&lt;p&gt;In order to track the flow of requests between multiple services, the trace system usually creates a trace context when a request enters a service and passes it along to other services during the request-response process. For example, when an HTTP request is sent to another server, the trace context is included in the request header.&lt;/p&gt;
&lt;p&gt;Figure 4 displays the raw content of an HTTP request intercepted by Wireshark. The trace context information generated by the Zipkin Tracing system can be identified by the “X-B3” prefix in the header. By using eBPF to intercept the trace context in the HTTP header, we can connect the current request with the trace system.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f4.png&#34; alt=&#34;Figure 4: View of HTTP headers in Wireshark.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 4: View of HTTP headers in Wireshark.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;trace-event&#34;&gt;Trace Event&lt;/h3&gt;
&lt;p&gt;We have added the concept of an &lt;em&gt;event&lt;/em&gt; to traces. An event can be attached to a span and consists of start and end times, tags, and summaries, allowing us to attach any desired information to the Trace.&lt;/p&gt;
&lt;p&gt;When performing eBPF network profiling, two events can be generated based on the request-response data. Figure 5 illustrates what happens when a service performs an HTTP request with profiling. The trace system generates &lt;em&gt;trace context&lt;/em&gt; information and sends it in the request. When the service executes in the kernel, we can generate an event for the corresponding trace span by interacting with the request-response data and execution time in the kernel space.&lt;/p&gt;
&lt;p&gt;Previously, we could only observe the execution status in the user space. However, by combining traces and eBPF technologies, we can now also get more information about the current trace in the kernel space, which would impact less performance for the target service if we do similar things in the tracing SDK and agent.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f5.png&#34; alt=&#34;Figure 5: Logical view of profiling an HTTP request and response.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 5: Logical view of profiling an HTTP request and response.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;sampling&#34;&gt;Sampling&lt;/h3&gt;
&lt;p&gt;To ensure efficient data storage and minimize unnecessary data sampling, we use a sampling mechanism for traces in our system. This mechanism triggers sampling only when certain conditions are met. We also provide a list of the top &lt;em&gt;N&lt;/em&gt; traces, which allows users to quickly access the relevant request information for a specific trace.&lt;/p&gt;
&lt;p&gt;To help users easily identify and analyze relevant events, we offer three different sampling rules:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Slow Traces&lt;/strong&gt;: Sampling is triggered when the response time for a request exceeds a specified threshold.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Response Status [400, 500)&lt;/strong&gt;: Sampling is triggered when the response status code is greater than or equal to 400 and less than 500.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Response Status [500, 600)&lt;/strong&gt;: Sampling is triggered when the response status code is greater than or equal to 500 and less than 600.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;In addition, we recognize that not all request or response raw data may be necessary for analysis. For example, users may be more interested in requesting data when trying to identify performance issues, while they may be more interested in response data when troubleshooting errors. As such, we also provide configuration options for request or response events to allow users to specify which type of data they would like to sample.&lt;/p&gt;
&lt;h2 id=&#34;profiling-in-a-service-mesh&#34;&gt;Profiling in a Service Mesh&lt;/h2&gt;
&lt;p&gt;The SkyWalking and SkyWalking Rover projects have already implemented the HTTP protocol &lt;em&gt;analyze&lt;/em&gt; and &lt;em&gt;trace&lt;/em&gt; associations. How do they perform when running in a service mesh environment?&lt;/p&gt;
&lt;h3 id=&#34;deployment&#34;&gt;Deployment&lt;/h3&gt;
&lt;p&gt;Figure 6 demonstrates the deployment of SkyWalking and SkyWalking Rover in a service mesh environment. SkyWalking Rover is deployed as a DaemonSet on each machine where a service is located and communicates with the SkyWalking backend cluster. It automatically recognizes the services on the machine and reports metadata information to the SkyWalking backend cluster. When a new network profiling task arises, SkyWalking Rover senses the task and analyzes the designated processes, collecting and aggregating network data before ultimately reporting it back to the SkyWalking backend service.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f6.png&#34; alt=&#34;Figure 6: SkyWalking rover deployment topology in a service mesh.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 6: SkyWalking rover deployment topology in a service mesh.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;tracing-systems&#34;&gt;Tracing Systems&lt;/h3&gt;
&lt;p&gt;Starting from version 9.3.0, the SkyWalking backend fully supports all functions in the Zipkin server. Therefore, the SkyWalking backend can collect traces from both the SkyWalking and Zipkin protocols. Similarly, SkyWalking Rover can identify and analyze trace context in both the SkyWalking and Zipkin trace systems. In the following two sections, network analysis results will be displayed in the SkyWalking and Zipkin UI respectively.&lt;/p&gt;
&lt;h4 id=&#34;skywalking&#34;&gt;SkyWalking&lt;/h4&gt;
&lt;p&gt;When SkyWalking performs network profiling, similar to the TCP metrics in the &lt;a href=&#34;/blog/diagnose-service-mesh-network-performance-with-ebpf/&#34;&gt;previous article&lt;/a&gt;, the SkyWalking UI will first display the topology between processes. When you open the dashboard of the line representing the traffic metrics between processes, you can see the metrics of HTTP traffic from the “HTTP/1.x” tab and the sampled HTTP requests with tracing in the “HTTP Requests” tab.&lt;/p&gt;
&lt;p&gt;As shown in Figure 7, there are three lists in the tab, each corresponding to a condition in the event sampling rules. Each list displays the traces that meet the pre-specified conditions. When you click on an item in the trace list, you can view the complete trace.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f7.png&#34; alt=&#34;Figure 7: Sampled HTTP requests within tracing context.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 7: Sampled HTTP requests within tracing context.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When you click on an item in the trace list, you can quickly view the specified trace. In Figure 8, we can see that in the current service-related span, there is a tag with a number indicating how many HTTP events are related to that trace span.&lt;/p&gt;
&lt;p&gt;Since we are in a service mesh environment, each service involves interacting with Envoy. Therefore, the current span includes Envoy’s request and response information. Additionally, since the current service has both incoming and outgoing requests, there are events in the corresponding span.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f8.png&#34; alt=&#34;Figure 8: Events in the trace detail.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 8: Events in the trace detail.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When the span is clicked, the details of the span will be displayed. If there are events in the current span, the relevant event information will be displayed on a time axis. As shown in Figure 9, there are a total of 6 related events in the current Span. Each event represents a data sample of an HTTP request/response. One of the events spans multiple time ranges, indicating a longer system call time. It may be due to a blocked system call, depending on the implementation details of the HTTP request in different languages. This can also help us query the possible causes of errors.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f9.png&#34; alt=&#34;Figure 9: Events in one trace span.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 9: Events in one trace span.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Finally, we can click on a specific event to see its complete information. As shown in Figure 10, it displays the sampling information of a request, including the SkyWalking trace context protocol contained in the request header from the HTTP raw data. The raw request data allows you to quickly re-request the request to solve any issues.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f10.png&#34; alt=&#34;Figure 10: The detail of the event.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 10: The detail of the event.&lt;/em&gt;&lt;/p&gt;
&lt;h4 id=&#34;zipkin&#34;&gt;Zipkin&lt;/h4&gt;
&lt;p&gt;Zipkin is one of the most widely used distributed tracing systems in the world. SkyWalking can function as an &lt;a href=&#34;https://zipkin.io/pages/extensions_choices.html&#34;&gt;alternative server&lt;/a&gt; to provide advanced features for Zipkin users. Here, we use this way to bring the feature into the Zipkin ecosystem out-of-box. The new events would also be treated as a kind of Zipkin’s tags and annotations.&lt;/p&gt;
&lt;p&gt;To add events to a Zipkin span, we need to do the following:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Split the start and end times of each event into two annotations with a canonical name.&lt;/li&gt;
&lt;li&gt;Add the sampled HTTP raw data from the event to the Zipkin span tags, using the same event name for corresponding purposes.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Figures 11 and 12 show annotations and tags in the same span. In these figures, we can see that the span includes at least two events with the same event name and sequence suffix (e.g., “Start/Finished HTTP Request/Response Sampling-x” in the figure). Both events have separate timestamps to represent their relative times within the span. In the tags, the data content of the corresponding event is represented by the event name and sequence number, respectively.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f11.png&#34; alt=&#34;Figure 11: Event timestamp in the Zipkin span annotation.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 11: Event timestamp in the Zipkin span annotation.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f12.png&#34; alt=&#34;Figure 12: Event raw data in the Zipkin span tag.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 12: Event raw data in the Zipkin span tag.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;demo&#34;&gt;Demo&lt;/h2&gt;
&lt;p&gt;In this section, we demonstrate how to perform network profiling in a service mesh and complete metrics collection and HTTP raw data sampling. To follow along, you will need a running Kubernetes environment.&lt;/p&gt;
&lt;h3 id=&#34;deploy-skywalking-showcase&#34;&gt;Deploy SkyWalking Showcase&lt;/h3&gt;
&lt;p&gt;SkyWalking Showcase contains a complete set of example services and can be monitored using SkyWalking. For more information, please check the &lt;a href=&#34;https://skywalking.apache.org/docs/skywalking-showcase/next/readme/&#34;&gt;official documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In this demo, we only deploy service, the latest released SkyWalking OAP, and UI.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6639ba&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#953800&#34;&gt;SW_OAP_IMAGE&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;apache/skywalking-oap-server:9.3.0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6639ba&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#953800&#34;&gt;SW_UI_IMAGE&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;apache/skywalking-ui:9.3.0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6639ba&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#953800&#34;&gt;SW_ROVER_IMAGE&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;apache/skywalking-rover:0.4.0
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6639ba&#34;&gt;export&lt;/span&gt; &lt;span style=&#34;color:#953800&#34;&gt;FEATURE_FLAGS&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;mesh-with-agent,single-node,elasticsearch,rover
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;make deploy.kubernetes
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After deployment is complete, please run the following script to open SkyWalking UI: http://localhost:8080/.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;kubectl port-forward svc/ui 8080:8080 --namespace default
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;start-network-profiling-task&#34;&gt;Start Network Profiling Task&lt;/h3&gt;
&lt;p&gt;Currently, we can select the specific instances that we wish to monitor by clicking the &lt;strong&gt;Data Plane&lt;/strong&gt; item in the &lt;strong&gt;Service Mesh&lt;/strong&gt; panel and the &lt;strong&gt;Service&lt;/strong&gt; item in the &lt;strong&gt;Kubernetes&lt;/strong&gt; panel.&lt;/p&gt;
&lt;p&gt;In figure 13, we have selected an instance with a list of tasks in the network profiling tab.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f13.png&#34; alt=&#34;Figure 13: Network Profiling tab in the Data Plane.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 13: Network Profiling tab in the Data Plane.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When we click the Start button, as shown in Figure 14, we need to specify the sampling rules for the profiling task. The sampling rules consist of one or more rules, each of which is distinguished by a different URI regular expression. When the HTTP request URI matches the regular expression, the rule is used. If the URI regular expression is empty, the default rule is used. Using multiple rules can help us make different sampling configurations for different requests.&lt;/p&gt;
&lt;p&gt;Each rule has three parameters to determine if sampling is needed:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Minimal Request Duration (ms)&lt;/strong&gt;: requests with a response time exceeding the specified time will be sampled.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sampling response status code between 400 and 499&lt;/strong&gt;: all status codes in the range [400-499) will be sampled.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sampling response status code between 500 and 599&lt;/strong&gt;: all status codes in the range [500-599) will be sampled.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Once the sampling configuration is complete, we can create the task.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f14.png&#34; alt=&#34;Figure 14: Create network profiling task page.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 14: Create network profiling task page.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;done&#34;&gt;Done!&lt;/h3&gt;
&lt;p&gt;After a few seconds, you will see the process topology appear on the right side of the page.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f15.png&#34; alt=&#34;Figure 15&#34;&gt;&lt;/p&gt;
&lt;p&gt;When you click on the line between processes, you can view the data between the two processes, which is divided into three tabs:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;TCP&lt;/strong&gt;: displays TCP-related metrics.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HTTP/1.x&lt;/strong&gt;: displays metrics in the HTTP 1 protocol.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;HTTP Requests&lt;/strong&gt;: displays the analyzed request and saves it to a list according to the sampling rule.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;img src=&#34;f16.png&#34; alt=&#34;Figure 16: TCP metrics in a network profiling task.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 16: TCP metrics in a network profiling task.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f17.png&#34; alt=&#34;Figure 17: HTTP/1.x metrics in a network profiling task.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 17: HTTP/1.x metrics in a network profiling task.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f18.png&#34; alt=&#34;Figure 18: HTTP sampled requests in a network profiling task.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 18: HTTP sampled requests in a network profiling task.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In this article, we detailed the overview of how to analyze the Layer 7 HTTP/1.x protocol in network analysis, and how to associate it with existing trace systems. This allows us to extend the scope of data we can observe from just user space to also include kernel-space data.&lt;/p&gt;
&lt;p&gt;In the future, we will delve further into the analysis of kernel data, such as collecting information on TCP packet size, transmission frequency, network card, and help on enhancing distributed tracing from another perspective.&lt;/p&gt;
&lt;h2 id=&#34;additional-resources&#34;&gt;Additional Resources&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/apache/skywalking&#34;&gt;SkyWalking Github Repo ›&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/apache/skywalking-rover&#34;&gt;SkyWalking Rover Github Repo ›&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://skywalking.apache.org/docs/skywalking-rover/next/readme/&#34;&gt;SkyWalking Rover Documentation ›&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://skywalking.apache.org/blog/diagnose-service-mesh-network-performance-with-ebpf/&#34;&gt;Diagnose Service Mesh Network Performance with eBPF blog post &amp;gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/concepts-and-designs/profiling/&#34;&gt;SkyWalking Profiling Documentation &amp;gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://skywalking.apache.org/docs/main/next/en/api/x-process-propagation-headers-v3/&#34;&gt;SkyWalking Trace Context Propagation &amp;gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://github.com/openzipkin/b3-propagation&#34;&gt;Zipkin Trace Context Propagation &amp;gt;&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://www.rfc-editor.org/rfc/rfc2068.html&#34;&gt;RFC - Hypertext Transfer Protocol – HTTP/1.1 &amp;gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;

      </description>
    </item>
    
    <item>
      <title>Blog: Boost Root Cause Analysis Quickly With SkyWalking’s New Trace-Metrics Association Feature</title>
      <link>/blog/boost-root-cause-analysis-quickly-with-skywalking-new-trace-metrics-association-feature/</link>
      <pubDate>Mon, 19 Dec 2022 00:00:00 +0000</pubDate>
      <guid>/blog/boost-root-cause-analysis-quickly-with-skywalking-new-trace-metrics-association-feature/</guid>
      <description>
        
        
        &lt;p&gt;&lt;img src=&#34;banner.jpg&#34; alt=&#34;Banner&#34;&gt;&lt;/p&gt;
&lt;p&gt;Observability for modern distributed applications work is critical for understanding how they behave under a variety of conditions and for troubleshooting and resolving issues when they arise. Traces, metrics, and logs are regarded as fundamental parts of the observability stack. Traces are the footprints of distributed system executions, meanwhile, metrics measure system performance with numbers in the timeline. Essentially, they measure the performance from two dimensions. Being able to quickly visualize the connection between traces and corresponding metrics makes it possible to quickly diagnose which process flows are correlated to potentially pathological behavior. This powerful new capability is now &lt;a href=&#34;https://skywalking.apache.org/events/release-apache-skywalking-apm-9.3.0/&#34;&gt;available in SkyWalking 9.3.0&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The SkyWalking project started only with tracing, with a focus on 100% sampling-based metrics and topology analysis since 2018. When users face anomaly trends of time-series metrics, like a peak on the line chart, or histogram shows a larger gap between p95 and p95, the immediate question is, why is this happening? One of SkyWalking&amp;rsquo;s latest features, the &lt;strong&gt;trace-metric association&lt;/strong&gt;, makes it much easier to answer that question and to address the root cause.&lt;/p&gt;
&lt;h2 id=&#34;how-are-metrics-generated&#34;&gt;How Are Metrics Generated?&lt;/h2&gt;
&lt;p&gt;SkyWalking provides three ways to calculate metrics:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Metrics built from trace spans, depending on the span’s layer, kind, and tags.&lt;/li&gt;
&lt;li&gt;Metrics extracted from logs—a kind of keyword and tags-based metrics extraction.&lt;/li&gt;
&lt;li&gt;Metrics reported from mature and mainstream metrics/meter systems, such as OpenTelemetry, Prometheus, and Zabbix.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Tracing tracks the processes of requests between an application&amp;rsquo;s services. Most systems that generate traffic and performance-related metrics also generate tracing data, either from server-side trace-based aggregations or through client SDKs.&lt;/p&gt;
&lt;h2 id=&#34;use-skywalking-to-reduce-the-traditional-cost-of-trace-indexing&#34;&gt;Use SkyWalking to Reduce the Traditional Cost of Trace Indexing&lt;/h2&gt;
&lt;p&gt;Tracing data and visualization are critical troubleshooting tools for both developers and operators alike because of how helpful they are in locating issue boundaries. But, because it has traditionally been difficult to find associations between metrics and traces, teams have added increasingly more tags into the spans, and search through various combinations. This trend of increased instrumentation and searching has required increased infrastructure investment to support this kind of search. SkyWalking&amp;rsquo;s metrics and tracing association capabilities can help reduce the cost of indexing and searching that data.&lt;/p&gt;
&lt;h2 id=&#34;find-the-associated-trace&#34;&gt;Find the Associated Trace&lt;/h2&gt;
&lt;p&gt;When looking for association between metrics and traces, the kind of metrics we&amp;rsquo;re dealing with determines their relationships to traces. Let’s review the standard request &lt;em&gt;rate, error, and duration (RED)&lt;/em&gt; metrics to see how it works.&lt;/p&gt;
&lt;h3 id=&#34;success-rate-metrics&#34;&gt;Success Rate Metrics&lt;/h3&gt;
&lt;p&gt;The success rate is determined by the return code, RPC response code, or exceptions of the process. When the success rate decreases, looking for errors in the traces of this service or pod are the first place to look to find clues.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f1.jpg&#34; alt=&#34;Figure 1: The success rate graph from SkyWalking&amp;rsquo;s 9.3.0 dashboard with the option to view related traces at a particular time.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 1: The success rate graph from SkyWalking&amp;rsquo;s 9.3.0 dashboard with the option to view related traces at a particular time.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Drilling down from the peak of the success rate, SkyWalking lists all traces and their error status that were collected in this particular minute (Figure 2):&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f2.jpg&#34; alt=&#34;Figure 2: SkyWalking shows related traces with an error status.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 2: SkyWalking shows related traces with an error status.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Requests to &lt;em&gt;/test&lt;/em&gt; can be located from the trace, and the span’s tag indicates a 404 response code of the HTTP request.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f3.jpg&#34; alt=&#34;Figure 3: A detail view of a request to http://frontend/test showing that the URI doesn&amp;rsquo;t exist.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 3: A detail view of a request to http://frontend/test showing that the URI doesn&amp;rsquo;t exist.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;By looking at the trace data, it becomes immediately clear that the drop in success rate is caused by requests to a nonexistent URI.&lt;/p&gt;
&lt;h3 id=&#34;average-response-time&#34;&gt;Average Response Time&lt;/h3&gt;
&lt;p&gt;The average response time metric provides a general overview of service performance. When average response time is unstable, this usually means that the system is facing serious performance impacts.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f4.jpg&#34; alt=&#34;Figure 4: SkyWalking&amp;rsquo;s query UI for searching for related traces showing traces for requests that exceed a particular duration threshold.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 4: SkyWalking&amp;rsquo;s query UI for searching for related traces showing traces for requests that exceed a particular duration threshold.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When you drill down from this metric, this query condition (Figure 4) will reveal the slowest traces of the service in this specific minute. Notice, at least 168ms is added as a condition automatically, to avoid scanning a large number of rows in the Database.&lt;/p&gt;
&lt;h3 id=&#34;apdex&#34;&gt;Apdex&lt;/h3&gt;
&lt;p&gt;Apdex—the Application Performance Index—is a measure of response time based against a set threshold. It measures the ratio of satisfactory response times to unsatisfactory response times (Figure 5). The response time is measured from an asset request to completed delivery back to the requestor.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f5.jpg&#34; alt=&#34;Figure 5: The Apdex formula&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 5: The Apdex formula&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;A user defines a response time tolerating threshold &lt;em&gt;T&lt;/em&gt;. All responses handled in &lt;em&gt;T&lt;/em&gt; or less time satisfy the user.&lt;/p&gt;
&lt;p&gt;For example, if &lt;em&gt;T&lt;/em&gt; is 1.2 seconds and a response completes in 0.5 seconds, then the user is satisfied. All responses greater than 1.2 seconds dissatisfy the user. Responses greater than 4.8 seconds frustrate the user.&lt;/p&gt;
&lt;p&gt;When the Apdex score decreases, we need to find related traces from two perspectives: slow traces and error status traces. SkyWalking&amp;rsquo;s new related tracing features offers a quick way to view both (Figure 6) directly from the Apdex graph.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f6.jpg&#34; alt=&#34;Figure 6: Show slow trace and error status traces from the Apdex graph&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 6: Show slow trace and error status traces from the Apdex graph&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;service-response-time&#34;&gt;Service Response Time&lt;/h3&gt;
&lt;p&gt;Percentile MetricThe percentile graph (Figure 7) provides p50, p75, p90, p95, and p99 latency ranks to measure the long-tail issues of service performance.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f7.jpg&#34; alt=&#34;Figure 7: The service response time percentile graph helps to highlight long-tail issues of service performance.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 7: The service response time percentile graph helps to highlight long-tail issues of service performance.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;This percentile graph shows a typical long-tail issue. P99 latency is four times slower than the P95. When we use the association, we see the traces with latency between P95 - P99 and P99 - Infinity.&lt;/p&gt;
&lt;p&gt;The traces of requests causing this kind of long-tail phenomena are automatically listing from there.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f8.jpg&#34; alt=&#34;Figure 8: Query parameters to search for traces based on latency.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 8: Query parameters to search for traces based on latency.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;are-more-associations-available&#34;&gt;Are More Associations Available?&lt;/h2&gt;
&lt;p&gt;SkyWalking provides more than just associations between between traces and metrics to help you find possible causal relationships and to avoid looking for the proverbial needle in a haystack.&lt;/p&gt;
&lt;p&gt;Currently, SkyWalking 9.3.0 offers two more associations: &lt;strong&gt;metric-to-metric&lt;/strong&gt; associations and &lt;strong&gt;event-to-metric&lt;/strong&gt; associations.&lt;/p&gt;
&lt;h3 id=&#34;metric-to-metric-associations&#34;&gt;Metric-to-metric Associations&lt;/h3&gt;
&lt;p&gt;There are dozens of metrics on the dashboard—which is great for getting a complete picture of application behavior. During a typical performance issue, the peaks of multiple metrics are affected simultaneously. But, trying to correlate peaks across all of these graphs can be difficult&amp;hellip;&lt;/p&gt;
&lt;p&gt;Now in SkyWalking 9.3.0, when you click the peak of one graph, the pop-out box lets you see associated metrics.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f9.jpg&#34; alt=&#34;Figure 9: SkyWalking&amp;rsquo;s option to view associated metrics.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 9: SkyWalking&amp;rsquo;s option to view associated metrics.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;When you choose that option, all associated metrics graphs will show axis pointers (the dotted vertical lines) in all associated graphs like in Figure 10. This makes it easier to correlate the peaks in different graphs with each other. Often, these correlated peaks with have the same root cause.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f10.jpg&#34; alt=&#34;Figure 10: Axis pointers (vertical dotted lines) show associations between peaks across multiple metrics graphs.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 10: Axis pointers (vertical dotted lines) show associations between peaks across multiple metrics graphs.&lt;/em&gt;&lt;/p&gt;
&lt;h3 id=&#34;event-to-metric-associations&#34;&gt;Event-to-Metric Associations&lt;/h3&gt;
&lt;p&gt;SkyWalking provides the event concept to associate possible service performance impacted by the infrastructure, such as new deployment even from k8s. Or, the anomaly had been detected by alerting or integrated AIOps engine.&lt;/p&gt;
&lt;p&gt;The event to metrics association is also automatically, it could cover the time range of the event on the metric graphs(blue areas). If the area of event and peaks are matched, most likely this event covered this anomaly.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f11.jpg&#34; alt=&#34;Figure 11: SkyWalking&amp;rsquo;s event to metric association view.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 11: SkyWalking&amp;rsquo;s event to metric association view.&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;skywalking-makes-it-easier-and-faster-to-find-root-causes&#34;&gt;SkyWalking Makes it Easier and Faster to Find Root Causes&lt;/h2&gt;
&lt;p&gt;SkyWalking now makes it easy to find associations between metrics, events, and traces, ultimately making it possible to identify root causes and fix problems fast. The associations we&amp;rsquo;ve discussed in this article are available out-of-box in the SkyWalking 9.3.0 release.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;f12.jpg&#34; alt=&#34;Figure 12: Just click on the dots to see related traces and metrics associations.&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Figure 12: Just click on the dots to see related traces and metrics associations.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Click the dots on any metric graph, and you will see a &lt;em&gt;View Related Traces&lt;/em&gt; item pop-out if this metric has logical mapping traces.&lt;/p&gt;
&lt;h2 id=&#34;conclusion&#34;&gt;Conclusion&lt;/h2&gt;
&lt;p&gt;In this blog, we took a look at the newly-added association feature between metrics and traces. With this new visualization, it&amp;rsquo;s now much easier to find key traces to identify root cause of issues.Associations in SkyWalking can go even deeper. Associations from metrics to traces is not the end of diagnosing system bottleneck. In the next post, we will introduce an eBPF powered trace enhancement where you’ll be able to see HTTP request and response details associated with tracing spans from network profiling. Stay tuned.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Blog: Apache ShenYu(incubating) plugin implementation principles and observability practices</title>
      <link>/blog/2022-05-08-apache-shenyuincubating-integrated-skywalking-practice-observability/</link>
      <pubDate>Sun, 08 May 2022 00:00:00 +0000</pubDate>
      <guid>/blog/2022-05-08-apache-shenyuincubating-integrated-skywalking-practice-observability/</guid>
      <description>
        
        
        &lt;h3 id=&#34;content&#34;&gt;Content&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href=&#34;#1.-Introduction-of-SkyWalking-and-ShenYu&#34;&gt;Introduction of SkyWalking and ShenYu&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#2.-Apache-ShenYu-plugin-implementation-principle&#34;&gt;Apache ShenYu plugin implementation principle&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#3.-Adding-generalized-call-tracking-to-the-gRPC-plugin-and-keeping-it-compatible&#34;&gt;Adding generalized call tracking to the gRPC plugin and keeping it compatible&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#4.-ShenYu-Gateway-Observability-Practice&#34;&gt;ShenYu Gateway Observability Practice&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;#5.-Summary&#34;&gt;Summary&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;1-introduction-of-skywalking-and-shenyu&#34;&gt;1. Introduction of SkyWalking and ShenYu&lt;/h2&gt;
&lt;h3 id=&#34;11-skywalking&#34;&gt;1.1 SkyWalking&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/hutaishi/skywalking&#34;&gt;SkyWalking&lt;/a&gt; is an Application Performance Monitoring (APM) and Observability Analysis Platform (OAP) for microservices, distributed systems, and cloud natives,
Has powerful features that provide a multi-dimensional means of application performance analysis, including distributed topology diagrams, application performance metrics, distributed link tracing, log correlation analysis and alerts. Also has a very rich ecology. Widely used in various companies and open source projects.&lt;/p&gt;
&lt;h3 id=&#34;12-apache-shenyu-incubating&#34;&gt;1.2 Apache ShenYu (incubating)&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://github.com/apache/incubator-shenyu&#34;&gt;Apache ShenYu (incubating)&lt;/a&gt;
High-performance,multi-protocol,extensible,responsive API Gateway. Compatible with a variety of mainstream framework systems, support hot plug,
users can customize the development, meet the current situation and future needs of users in a variety of scenarios, experienced the temper of large-scale scenes.
Rich protocol support: &lt;code&gt;Http&lt;/code&gt;, &lt;code&gt;Spring Cloud&lt;/code&gt;, &lt;code&gt;gRPC&lt;/code&gt;, &lt;code&gt;Dubbo&lt;/code&gt;, &lt;code&gt;SOFARPC&lt;/code&gt;, &lt;code&gt;Motan&lt;/code&gt;, &lt;code&gt;Tars&lt;/code&gt;, etc.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;shenyu-arch.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;2-apache-shenyu-plugin-implementation-principle&#34;&gt;2. Apache ShenYu plugin implementation principle&lt;/h2&gt;
&lt;p&gt;ShenYu&amp;rsquo;s asynchrony is a little different from previous exposure to asynchrony, it is a full-link asynchrony, the execution of each plug-in is asynchronous, and thread switching is not a single fixed situation (and the individual plug-in implementation is related).
The gateway initiates service calls of various protocol types, and the existing SkyWalking plugins create ExitSpan (synchronous or asynchronous) when they initiate service calls.  The gateway receives the request and creates an asynchronous EntrySpan.
The asynchronous EntrySpan needs to be concatenated with the synchronous or asynchronous ExitSpan, otherwise the link will be broken.&lt;/p&gt;
&lt;p&gt;There are 2 types of tandem solutions：&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Snapshot Delivery&lt;/strong&gt;:&lt;br&gt;
Pass the snapshot after creating the EntrySpan to the thread that created the ExitSpan in some way.&lt;br&gt;
Currently this approach is used in the asynchronous WebClient plugin, which can receive asynchronous snapshots. shenYu proxy Http service or SpringCloud service is to achieve span concatenation through snapshot passing.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;LocalSpan transit&lt;/strong&gt;:&lt;br&gt;
Other RPC class plugins do not receive snapshots for concatenation like Asynchronous WebClient. Although you can modify other RPC plugins to receive snapshots for concatenation, it is not recommended or necessary to do so.
This can be achieved by creating a LocalSpan in the thread where the ExitSpan is created, and then connecting the asynchronous EntrySpan and LocalSpan by &lt;code&gt;snapshot passing&lt;/code&gt;. This can be done without changing the original plugin code.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The span connection is shown below:&lt;br&gt;
&lt;img src=&#34;span-connect.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;You may ask if it is possible to create LocalSpan inside a generic plugin, instead of creating one separately for ShenYu RPC plugin?
The answer is no, because you need to ensure that LocalSpan and ExitSpan are in the same thread, and ShenYu is fully linked asynchronously. The code to create LocalSpan is reused in the implementation.&lt;/p&gt;
&lt;h2 id=&#34;3-adding-generalized-call-tracking-to-the-grpc-plugin-and-keeping-it-compatible&#34;&gt;3. Adding generalized call tracking to the gRPC plugin and keeping it compatible&lt;/h2&gt;
&lt;p&gt;The existing SkyWalking gRPC plugin only supports calls initiated by way of stubs. For the gateway there is no proto file, the gateway takes generalized calls (not through stubs), so tracing RPC requests, you will find that the link will break at the gateway node.
In this case, it is necessary to make the gRPC plugin support generalized calls, while at the same time needing to remain compatible and not affect the original tracing method. This is achieved by determining whether the request parameter is a DynamicMessage, and if it is not, then the original tracing logic through the stub is used.
If not, then the original tracing logic via stubs is used, and if not, then the generalized call tracing logic is used. The other compatibility is the difference between the old and new versions of gRPC, as well as the compatibility of various cases of obtaining server-side IP, for those interested in the source code.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;grpc-generic-call.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;4-shenyu-gateway-observability-practice&#34;&gt;4. ShenYu Gateway Observability Practice&lt;/h2&gt;
&lt;p&gt;The above explains the principle of SkyWalking ShenYu plug-in implementation, the following deployment application to see the effect. SkyWalking powerful, in addition to the link tracking requires the development of plug-ins, other powerful features out of the box.
Here only describe the link tracking and application performance analysis part, if you want to experience the power of SkyWalking features, please refer to the &lt;a href=&#34;https://skywalking.apache.org/&#34;&gt;SkyWalking official documentation&lt;/a&gt;.&lt;br&gt;
Version description:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;skywalking-java: &lt;code&gt;8.11.0-SNAPSHOT&lt;/code&gt; source code build. Note: The shenyu plugin will be released in version 8.11.0, and will probably release it initially in May or June. the Java agent is in the regular release phase.&lt;/li&gt;
&lt;li&gt;skywalking: &lt;code&gt;9.0.0&lt;/code&gt; V9 version&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Usage instructions:&lt;br&gt;
SkyWalking is designed to be very easy to use. Please refer to the official documentation for configuring and activating the shenyu plugin.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;https://skywalking.apache.org/docs/main/latest/readme/&#34;&gt;SkyWalking Documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&#34;https://skywalking.apache.org/docs/skywalking-java/latest/readme/&#34;&gt;SkyWalking Java Agent Documentation&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;41-sending-requests-to-the-gateway&#34;&gt;4.1 Sending requests to the gateway&lt;/h3&gt;
&lt;p&gt;Initiate various service requests to the gateway via the &lt;code&gt;postman&lt;/code&gt; client or &lt;code&gt;other means&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&#34;42-request-topology-diagram&#34;&gt;4.2 Request Topology Diagram&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;topology.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;img src=&#34;topology2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h3 id=&#34;43-request-trace-in-the-case-of-grpc&#34;&gt;4.3 Request Trace (in the case of gRPC)&lt;/h3&gt;
&lt;h4 id=&#34;normal-trace&#34;&gt;Normal Trace：&lt;/h4&gt;
&lt;p&gt;&lt;img src=&#34;grpc-ok.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h4 id=&#34;abnormal-trace&#34;&gt;Abnormal Trace：&lt;/h4&gt;
&lt;p&gt;&lt;img src=&#34;grpc-error.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Click on the link node to see the corresponding node information and exception information&lt;/p&gt;
&lt;h4 id=&#34;service-provider-span&#34;&gt;Service Provider Span&lt;/h4&gt;
&lt;p&gt;&lt;img src=&#34;grpc-error-span.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h4 id=&#34;gateway-request-span&#34;&gt;Gateway request span&lt;/h4&gt;
&lt;p&gt;&lt;img src=&#34;gateway-error-span.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;44-service-metrics-monitoring&#34;&gt;4.4 Service Metrics Monitoring&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;overview.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;45-gateway-background-metrics-monitoring&#34;&gt;4.5 Gateway background metrics monitoring&lt;/h3&gt;
&lt;h4 id=&#34;database-monitoring&#34;&gt;Database Monitoring:&lt;/h4&gt;
&lt;p&gt;&lt;img src=&#34;database.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h4 id=&#34;thread-pool-and-connection-pool-monitoring&#34;&gt;Thread pool and connection pool monitoring:&lt;/h4&gt;
&lt;p&gt;&lt;img src=&#34;img.png&#34; alt=&#34;img.png&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;46-jvm-monitoring&#34;&gt;4.6 JVM Monitoring&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;jvm.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;47-endpoint-analysis&#34;&gt;4.7 Endpoint Analysis&lt;/h3&gt;
&lt;p&gt;&lt;img src=&#34;endpoint.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;48-exception-log-and-exception-link-analysis&#34;&gt;4.8 Exception log and exception link analysis&lt;/h3&gt;
&lt;p&gt;&lt;a href=&#34;https://skywalking.apache.org/docs/skywalking-java/latest/en/setup/service-agent/java-agent/application-toolkit-logback-1.x/&#34;&gt;See official documentation for log configuration&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Log monitoring
&lt;img src=&#34;log-trace.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Distributed link trace details corresponding to exception logs
&lt;img src=&#34;log-trace-detail.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;5-summary&#34;&gt;5. Summary&lt;/h2&gt;
&lt;p&gt;SkyWalking has very comprehensive support for metrics, link tracing, and logging in observability, and is powerful, easy to use, and designed for large distributed systems, microservices, cloud-native, container architectures, and has a rich ecosystem.
Using SkyWalking to provide powerful observability support for Apache ShenYu (incubating) gives ShenYu a boost. Finally, if you are interested in high-performance responsive gateways, you can follow
&lt;a href=&#34;https://github.com/apache/incubator-shenyu&#34;&gt;Apache ShenYu (incubating)&lt;/a&gt;.
Also, thanks to SkyWalking such an excellent open source software to the industry contributions.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Blog: SkyWalking 8.4 provides infrastructure monitoring</title>
      <link>/blog/2021-02-07-infrastructure-monitoring/</link>
      <pubDate>Mon, 08 Feb 2021 00:00:00 +0000</pubDate>
      <guid>/blog/2021-02-07-infrastructure-monitoring/</guid>
      <description>
        
        
        &lt;p&gt;&lt;img src=&#34;apache-skywalking.jpeg&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Origin: &lt;a href=&#34;https://www.tetrate.io/blog/skywalking-8-4-provides-infrastucture-monitoring-for-vms/&#34;&gt;Tetrate.io blog&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 id=&#34;background&#34;&gt;Background&lt;/h2&gt;
&lt;p&gt;Apache SkyWalking&amp;ndash; the APM tool for distributed systems&amp;ndash;  has historically focused on providing observability around tracing and metrics, but service performance is often affected by the host. The newest release, SkyWalking 8.4.0, introduces a new  feature for monitoring  virtual machines. Users can easily detect possible problems from the dashboard&amp;ndash; for example, when CPU usage is overloaded, when there’s not enough memory or disk space, or when the network status is unhealthy, etc.&lt;/p&gt;
&lt;h2 id=&#34;how-it-works&#34;&gt;How it works&lt;/h2&gt;
&lt;p&gt;SkyWalking leverages Prometheus and OpenTelemetry for collecting metrics data as we did for Istio control panel metrics; Prometheus is mature and widely used, and we expect to see increased adoption of the new CNCF project, OpenTelemetry. The SkyWalking OAP Server receives these metrics data of OpenCensus format from OpenTelemetry. The process is as follows:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;how-it-works.png&#34; alt=&#34;The monitring work process&#34;&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Prometheus Node Exporter collects metrics data from the VMs.&lt;/li&gt;
&lt;li&gt;OpenTelemetry Collector fetches metrics from Node Exporters via Prometheus Receiver,  and pushes metrics to SkyWalking OAP Server via the OpenCensus GRPC Exporter.&lt;/li&gt;
&lt;li&gt;The SkyWalking OAP Server parses the expression with &lt;a href=&#34;https://github.com/apache/skywalking/blob/master/docs/en/concepts-and-designs/mal.md&#34;&gt;MAL&lt;/a&gt; to filter/calculate/aggregate and store the results. The expression rules are in &lt;code&gt;/config/otel-oc-rules/vm.yaml&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;We can now see the data on the SkyWalking WebUI dashboard.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;what-to-monitor&#34;&gt;What to monitor&lt;/h2&gt;
&lt;p&gt;SkyWalking provides default monitoring metrics including:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;CPU Usage (%)&lt;/li&gt;
&lt;li&gt;Memory RAM Usage (MB)&lt;/li&gt;
&lt;li&gt;Memory Swap Usage (MB)&lt;/li&gt;
&lt;li&gt;CPU Average Used&lt;/li&gt;
&lt;li&gt;CPU Load&lt;/li&gt;
&lt;li&gt;Memory RAM (total/available/used MB)&lt;/li&gt;
&lt;li&gt;Memory Swap (total/free MB)&lt;/li&gt;
&lt;li&gt;File System Mount point Usage (%)&lt;/li&gt;
&lt;li&gt;Disk R/W (KB/s)&lt;/li&gt;
&lt;li&gt;Network Bandwidth Usage (receive/transmit KB/s)&lt;/li&gt;
&lt;li&gt;Network Status (tcp_curr_estab/tcp_tw/tcp_alloc/sockets_used/udp_inuse)&lt;/li&gt;
&lt;li&gt;File fd Allocated&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The following is how it looks when we monitor Linux:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;monitoring-screen-shot1.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;monitoring-screen-shot2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;how-to-use&#34;&gt;How to use&lt;/h2&gt;
&lt;p&gt;To enable this feature, we need to install Prometheus Node Exporter and OpenTelemetry Collector and activate the VM monitoring rules in SkyWalking OAP Server.&lt;/p&gt;
&lt;h3 id=&#34;install-prometheus-node-exporter&#34;&gt;Install Prometheus Node Exporter&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;wget https://github.com/prometheus/node_exporter/releases/download/v1.0.1/node_exporter-1.0.1.linux-amd64.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;tar xvfz node_exporter-1.0.1.linux-amd64.tar.gz
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#6639ba&#34;&gt;cd&lt;/span&gt; node_exporter-1.0.1.linux-amd64
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;./node_exporter
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In linux Node Exporter  exposes metrics on port &lt;code&gt;9100&lt;/code&gt; by default. When it is running, we can get the metrics  from the &lt;code&gt;/metrics&lt;/code&gt; endpoint. Use a web browser or command &lt;code&gt;curl&lt;/code&gt; to verify.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;curl http://localhost:9100/metrics
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;We should see all the metrics from the output like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# TYPE go_gc_duration_seconds summary&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go_gc_duration_seconds&lt;span style=&#34;color:#0550ae&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#953800&#34;&gt;quantile&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;0&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;}&lt;/span&gt; 7.7777e-05
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go_gc_duration_seconds&lt;span style=&#34;color:#0550ae&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#953800&#34;&gt;quantile&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;0.25&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;}&lt;/span&gt; 0.000113756
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go_gc_duration_seconds&lt;span style=&#34;color:#0550ae&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#953800&#34;&gt;quantile&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;0.5&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;}&lt;/span&gt; 0.000127199
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go_gc_duration_seconds&lt;span style=&#34;color:#0550ae&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#953800&#34;&gt;quantile&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;0.75&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;}&lt;/span&gt; 0.000147778
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go_gc_duration_seconds&lt;span style=&#34;color:#0550ae&#34;&gt;{&lt;/span&gt;&lt;span style=&#34;color:#953800&#34;&gt;quantile&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;=&lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;1&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;}&lt;/span&gt; 0.000371894
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go_gc_duration_seconds_sum 0.292994058
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;go_gc_duration_seconds_count &lt;span style=&#34;color:#0550ae&#34;&gt;2029&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Note: We only need to install Node Exporter,  rather than Prometheus server.
If you want to get more information about Prometheus Node Exporter  see: &lt;a href=&#34;https://prometheus.io/docs/guides/node-exporter/&#34;&gt;https://prometheus.io/docs/guides/node-exporter/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;install-opentelemetry-collector&#34;&gt;Install OpenTelemetry Collector&lt;/h3&gt;
&lt;p&gt;We can quickly install a OpenTelemetry Collector instance by using &lt;code&gt;docker-compose&lt;/code&gt; with the following steps:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Create a directory to store the configuration files, like &lt;code&gt;/usr/local/otel&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Create &lt;code&gt;docker-compose.yaml&lt;/code&gt; and &lt;code&gt;otel-collector-config.yaml&lt;/code&gt; in this directory represented below:&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;code&gt;docker-compose.yaml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;version&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;2&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;services&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# Collector&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;otel-collector&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# Specify the image to start the container from&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;image&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;otel/opentelemetry-collector:0.19.0&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# Set the  otel-collector configfile &lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;command&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;--config=/etc/otel-collector-config.yaml&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;]&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# Mapping the configfile to host directory&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;volumes&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;- ./otel-collector-config.yaml:/etc/otel-collector-config.yaml&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;ports&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;13133:13133&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# health_check extension&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;- &lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;55678&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;       &lt;/span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# OpenCensus receiver&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;&lt;code&gt;otel-collector-config.yaml&lt;/code&gt;&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-yaml&#34; data-lang=&#34;yaml&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;extensions&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;health_check&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# A receiver is how data gets into the OpenTelemetry Collector&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;receivers&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# Set Prometheus Receiver to collects metrics from targets&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# It’s supports the full set of Prometheus configuration&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;prometheus&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;config&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;scrape_configs&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;        &lt;/span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;job_name&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#39;otel-collector&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;scrape_interval&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;10s&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;          &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;static_configs&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;              &lt;/span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# Replace the IP to your VMs‘s IP which has installed Node Exporter&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;            &lt;/span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;targets&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#39;vm1:9100&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;]&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; 
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;            &lt;/span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;targets&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#39;vm2:9100&amp;#39;&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;]&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;            &lt;/span&gt;- &lt;span style=&#34;color:#0550ae&#34;&gt;targets&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;‘vm3:9100&amp;#39; ]&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;processors&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;batch&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# An exporter is how data gets sent to different systems/back-ends&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;exporters&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# Exports metrics via gRPC using OpenCensus format&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;opencensus&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;endpoint&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#0a3069&#34;&gt;&amp;#34;docker.for.mac.host.internal:11800&amp;#34;&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#57606a&#34;&gt;# The OAP Server address&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;insecure&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#cf222e&#34;&gt;true&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;logging&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;logLevel&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;debug&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;service&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;pipelines&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;    &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;metrics&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;receivers&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;prometheus]&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;processors&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;batch]&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;      &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;exporters&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;logging, opencensus]&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;&lt;span style=&#34;color:#fff&#34;&gt;  &lt;/span&gt;&lt;span style=&#34;color:#0550ae&#34;&gt;extensions&lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;:&lt;/span&gt;&lt;span style=&#34;color:#fff&#34;&gt; &lt;/span&gt;&lt;span style=&#34;color:#1f2328&#34;&gt;[&lt;/span&gt;health_check]&lt;span style=&#34;color:#fff&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ol start=&#34;3&#34;&gt;
&lt;li&gt;In this  directory use command &lt;code&gt;docker-compose&lt;/code&gt; to start up the container:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;docker-compose up -d
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After the container is up and running, you should see metrics already exported in the logs:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; style=&#34;background-color:#f7f7f7;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Metric &lt;span style=&#34;color:#57606a&#34;&gt;#165&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Descriptor:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-&amp;gt; Name: node_network_receive_compressed_total
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-&amp;gt; Description: Network device statistic receive_compressed.
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-&amp;gt; Unit:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-&amp;gt; DataType: DoubleSum
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-&amp;gt; IsMonotonic: &lt;span style=&#34;color:#6639ba&#34;&gt;true&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-&amp;gt; AggregationTemporality: AGGREGATION_TEMPORALITY_CUMULATIVE
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;DoubleDataPoints &lt;span style=&#34;color:#57606a&#34;&gt;#0&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Data point labels:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-&amp;gt; device: ens4
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;StartTime: &lt;span style=&#34;color:#0550ae&#34;&gt;1612234754364000000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Timestamp: &lt;span style=&#34;color:#0550ae&#34;&gt;1612235563448000000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Value: 0.000000
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;DoubleDataPoints &lt;span style=&#34;color:#57606a&#34;&gt;#1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Data point labels:
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;-&amp;gt; device: lo
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;StartTime: &lt;span style=&#34;color:#0550ae&#34;&gt;1612234754364000000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Timestamp: &lt;span style=&#34;color:#0550ae&#34;&gt;1612235563448000000&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;Value: 0.000000
&lt;/span&gt;&lt;/span&gt;&lt;span style=&#34;display:flex;&#34;&gt;&lt;span&gt;...
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you want to get more information about OpenTelemetry Collector  see: &lt;a href=&#34;https://opentelemetry.io/docs/collector/&#34;&gt;https://opentelemetry.io/docs/collector/&lt;/a&gt;&lt;/p&gt;
&lt;h3 id=&#34;set-up-skywalking-oap-server&#34;&gt;Set up SkyWalking OAP Server&lt;/h3&gt;
&lt;p&gt;To activate the oc handler and vm relevant rules, set your environment variables:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SW_OTEL_RECEIVER=default
SW_OTEL_RECEIVER_ENABLED_OC_RULES=vm
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Note: If there are other rules already activated , you can add vm with use &lt;code&gt;,&lt;/code&gt; as a separator.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;SW_OTEL_RECEIVER_ENABLED_OC_RULES=vm,oap
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Start the SkyWalking OAP Server.&lt;/p&gt;
&lt;h3 id=&#34;done&#34;&gt;Done!&lt;/h3&gt;
&lt;p&gt;After all of the above steps are completed, check out the SkyWalking WebUI.  Dashboard &lt;code&gt;VM&lt;/code&gt; provides the default metrics of all observed virtual machines.
Note: Clear the browser local cache if you used it to access deployments of  previous SkyWalking versions.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;monitoring-screen-shot3.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;additional-resources&#34;&gt;Additional Resources&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Read more about the &lt;a href=&#34;https://github.com/apache/skywalking/blob/v8.4.0/changes/changes-8.4.0.md&#34;&gt;SkyWalking 8.4 release highlights&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Get more SkyWalking updates on &lt;a href=&#34;https://twitter.com/ASFSkyWalking&#34;&gt;Twitter&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
  </channel>
</rss>
