<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Development on HUATUO Documentation</title>
    <link>https://docs.huatuo.tech/en/v2.2.0/development/</link>
    <description>Recent content in Development on HUATUO Documentation</description>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Mon, 13 Apr 2026 11:22:12 -0400</lastBuildDate>
    <atom:link href="https://docs.huatuo.tech/en/v2.2.0/development/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Collection Framework</title>
      <link>https://docs.huatuo.tech/en/v2.2.0/development/mode/</link>
      <pubDate>Sun, 11 Jan 2026 00:00:00 +0000</pubDate>
      <guid>https://docs.huatuo.tech/en/v2.2.0/development/mode/</guid>
      <description>&lt;p&gt;HuaTuo framework provides three data collection modes: &lt;code&gt;autotracing&lt;/code&gt;, &lt;code&gt;event&lt;/code&gt;, and &lt;code&gt;metrics&lt;/code&gt;, covering different monitoring scenarios, helping users gain comprehensive insights into system performance.&lt;/p&gt;&#xA;&lt;h3 id=&#34;collection-mode-comparison&#34;&gt;Collection Mode Comparison&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#collection-mode-comparison&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;table&gt;&#xA;  &lt;thead&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;th&gt;Mode&lt;/th&gt;&#xA;          &lt;th&gt;Type&lt;/th&gt;&#xA;          &lt;th&gt;Trigger Condition&lt;/th&gt;&#xA;          &lt;th&gt;Data Output&lt;/th&gt;&#xA;          &lt;th&gt;Use Case&lt;/th&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/thead&gt;&#xA;  &lt;tbody&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;Autotracing&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Event-driven&lt;/td&gt;&#xA;          &lt;td&gt;Triggered on system anomalies&lt;/td&gt;&#xA;          &lt;td&gt;ES + Local Storage, Prometheus (optional)&lt;/td&gt;&#xA;          &lt;td&gt;Non-routine operations, triggered on anomalies&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;Event&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Event-driven&lt;/td&gt;&#xA;          &lt;td&gt;Continuously running, triggered on preset thresholds&lt;/td&gt;&#xA;          &lt;td&gt;ES + Local Storage, Prometheus (optional)&lt;/td&gt;&#xA;          &lt;td&gt;Continuous operations, directly dump context&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;      &lt;tr&gt;&#xA;          &lt;td&gt;&lt;strong&gt;Metrics&lt;/strong&gt;&lt;/td&gt;&#xA;          &lt;td&gt;Metric collection&lt;/td&gt;&#xA;          &lt;td&gt;Passive collection&lt;/td&gt;&#xA;          &lt;td&gt;Prometheus format&lt;/td&gt;&#xA;          &lt;td&gt;Monitoring system metrics&lt;/td&gt;&#xA;      &lt;/tr&gt;&#xA;  &lt;/tbody&gt;&#xA;&lt;/table&gt;&#xA;&lt;h3 id=&#34;autotracing&#34;&gt;Autotracing&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#autotracing&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Type&lt;/strong&gt;: Event-driven (tracing).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Function&lt;/strong&gt;: Automatically tracks system anomalies and dump context when anomalies occur.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Features&lt;/strong&gt;:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When a system anomaly occurs, &lt;code&gt;autotracing&lt;/code&gt; is triggered automatically to dump relevant context.&lt;/li&gt;&#xA;&lt;li&gt;Data is stored to ES in real-time and stored locally for subsequent analysis and troubleshooting. It can also be monitored in Prometheus format for statistics and alerts.&lt;/li&gt;&#xA;&lt;li&gt;Suitable for scenarios with high performance overhead, such as triggering captures when metrics exceed a threshold or rise too quickly.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Integrated Features&lt;/strong&gt;: CPU anomaly tracking (cpu idle), D-state tracking (dload), container contention (waitrate), memory burst allocation (memburst), disk anomaly tracking (iotracer).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;event&#34;&gt;Event&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#event&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Type&lt;/strong&gt;: Event-driven (tracing).&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Function&lt;/strong&gt;: Continuously operates within the system context, directly dump context when preset thresholds are met.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Features&lt;/strong&gt;:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Unlike &lt;code&gt;autotracing&lt;/code&gt;, &lt;code&gt;event&lt;/code&gt; continuously operates within the system context, rather than being triggered by anomalies.&lt;/li&gt;&#xA;&lt;li&gt;Data is also stored to ES and locally, and can be monitored in Prometheus format.&lt;/li&gt;&#xA;&lt;li&gt;Suitable for continuous monitoring and real-time analysis, enabling timely detection of abnormal behaviors. The performance impact of &lt;code&gt;event&lt;/code&gt; collection is negligible.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Integrated Features&lt;/strong&gt;: Soft interrupt anomalies (softirq), memory allocation anomalies (oom), soft lockups (softlockup), D-state processes (hungtask), memory reclamation (memreclaim), packet droped abnormal (dropwatch), network ingress latency (net_rx_latency).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;metrics&#34;&gt;Metrics&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#metrics&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Type&lt;/strong&gt;: Metric collection.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Function&lt;/strong&gt;: Collects performance metrics from subsystems.&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Features&lt;/strong&gt;:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Metric data can be sourced from regular procfs collection or derived from &lt;code&gt;tracing&lt;/code&gt; (autotracing, event) data.&lt;/li&gt;&#xA;&lt;li&gt;Outputs in Prometheus format for easy integration into Prometheus monitoring systems.&lt;/li&gt;&#xA;&lt;li&gt;Unlike &lt;code&gt;tracing&lt;/code&gt; data, &lt;code&gt;metrics&lt;/code&gt; primarily focus on system performance metrics such as CPU usage, memory usage, and network traffic, etc.&lt;/li&gt;&#xA;&lt;li&gt;Suitable for monitoring system performance metrics, supporting real-time analysis and long-term trend observation.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Integrated Features&lt;/strong&gt;: CPU (sys, usr, util, load, nr_running, etc.), memory (vmstat, memory_stat, directreclaim, asyncreclaim, etc.), IO (d2c, q2c, freeze, flush, etc.), network (arp, socket mem, qdisc, netstat, netdev, sockstat, etc.).&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;multiple-purpose-of-tracing-mode&#34;&gt;Multiple Purpose of Tracing Mode&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#multiple-purpose-of-tracing-mode&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Both &lt;code&gt;autotracing&lt;/code&gt; and &lt;code&gt;event&lt;/code&gt; belong to the &lt;strong&gt;tracing&lt;/strong&gt; collection mode, offering the following dual purposes:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Add Metrics</title>
      <link>https://docs.huatuo.tech/en/v2.2.0/development/metrics/</link>
      <pubDate>Sun, 11 Jan 2026 00:00:00 +0000</pubDate>
      <guid>https://docs.huatuo.tech/en/v2.2.0/development/metrics/</guid>
      <description>&lt;h3 id=&#34;overview&#34;&gt;Overview&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#overview&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;The Metrics type is used to collect system performance and other indicator data. It can output in Prometheus format, serving as a data provider through the &lt;code&gt;/metrics&lt;/code&gt; (&lt;code&gt;curl localhost:&amp;lt;port&amp;gt;/metrics&lt;/code&gt;) .&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Type&lt;/strong&gt;：Metrics collection&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Function&lt;/strong&gt;：Collects performance metrics  from various subsystems&lt;/p&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;：&lt;/p&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Metrics are primarily used to collect system performance metrics such as CPU usage, memory usage, network statistics, etc. They are suitable for monitoring system performance and support real-time analysis and long-term trend observation.&lt;/li&gt;&#xA;&lt;li&gt;Metrics can come from regular procfs/sysfs collection or be generated from tracing types (autotracing, event).&lt;/li&gt;&#xA;&lt;li&gt;Outputs in Prometheus format for seamless integration into the Prometheus observability ecosystem.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&#xA;&lt;p&gt;&lt;strong&gt;Already Integrated&lt;/strong&gt;：&lt;/p&gt;</description>
    </item>
    <item>
      <title>Add Event</title>
      <link>https://docs.huatuo.tech/en/v2.2.0/development/events/</link>
      <pubDate>Sun, 11 Jan 2026 00:00:00 +0000</pubDate>
      <guid>https://docs.huatuo.tech/en/v2.2.0/development/events/</guid>
      <description>&lt;h3 id=&#34;overview&#34;&gt;Overview&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#overview&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Type&lt;/strong&gt;: Exception event-driven（tracing/event）&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Function&lt;/strong&gt;：Continuously runs in the system and captures context information when preset thresholds are reached&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;:&#xA;&lt;ul&gt;&#xA;&lt;li&gt;Unlike &lt;code&gt;autotracing&lt;/code&gt;, &lt;code&gt;event&lt;/code&gt; runs continuously rather than being triggered only when exceptions occur.&lt;/li&gt;&#xA;&lt;li&gt;Event data is stored locally in real-time and also sent to remote ES. You can also generate Prometheus metrics for observation.&lt;/li&gt;&#xA;&lt;li&gt;Suitable for &lt;strong&gt;continuous monitoring&lt;/strong&gt; and &lt;strong&gt;real-time analysis&lt;/strong&gt;, enabling timely detection of abnormal behaviors in the system. The performance impact of &lt;code&gt;event&lt;/code&gt; type collection is negligible.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Already Integrated&lt;/strong&gt;: Soft interrupt abnormalities（softirq）、abnormal memory allocation（oom）、soft lockups（softlockup）、D-state processes（hungtask）、memory reclaim（memreclaim）、abnormal packet loss（dropwatch）、network inbound latency (net_rx_latency), etc.&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;how-to-add-event-metrics&#34;&gt;How to Add Event Metrics&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#how-to-add-event-metrics&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;Simply implement the &lt;code&gt;ITracingEvent&lt;/code&gt; interface and complete registration to add events to the system.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Add Autotracing</title>
      <link>https://docs.huatuo.tech/en/v2.2.0/development/autotracing/</link>
      <pubDate>Sun, 11 Jan 2026 00:00:00 +0000</pubDate>
      <guid>https://docs.huatuo.tech/en/v2.2.0/development/autotracing/</guid>
      <description>&lt;h3 id=&#34;overview&#34;&gt;Overview&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#overview&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;ul&gt;&#xA;&lt;li&gt;&lt;strong&gt;Type&lt;/strong&gt;：Exception event-driven（tracing/autotracing）&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Function&lt;/strong&gt;：Automatically tracks system abnormal states and triggers context information capture when exceptions occur&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Characteristics&lt;/strong&gt;：&#xA;&lt;ul&gt;&#xA;&lt;li&gt;When system abnormalities occur, &lt;code&gt;autotracing&lt;/code&gt; automatically triggers and captures relevant context information&lt;/li&gt;&#xA;&lt;li&gt;Event data is stored locally in real-time and also sent to remote ES, while you can also generate Prometheus metrics for observation&lt;/li&gt;&#xA;&lt;li&gt;Suitable for &lt;strong&gt;significant performance overhead&lt;/strong&gt;， such as triggering capture when detecting metrics rising above certain thresholds or rising too rapidly&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;/li&gt;&#xA;&lt;li&gt;&lt;strong&gt;Already Integrated&lt;/strong&gt;：abnormal usage tracking (cpu idle), D-state tracking (dload), container internal/external contention (waitrate), sudden memory allocation (memburst), disk abnormal tracking (iotracer)&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;h3 id=&#34;how-to-add-autotracing&#34;&gt;How to Add Autotracing&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#how-to-add-autotracing&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h3&gt;&#xA;&lt;p&gt;&lt;code&gt;AutoTracing&lt;/code&gt; only requires implementing the &lt;code&gt;ITracingEvent&lt;/code&gt; interface and completing registration to add events to the system.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
