{"id":18089,"date":"2025-06-23T13:09:09","date_gmt":"2025-06-23T05:09:09","guid":{"rendered":"https:\/\/92it.top\/?p=18089"},"modified":"2025-06-23T13:09:09","modified_gmt":"2025-06-23T05:09:09","slug":"%e4%ba%91%e5%8e%9f%e7%94%9f-%e7%b3%bb%e7%bb%9f%e5%8f%af%e8%a7%82%e6%b5%8b%e6%80%a7","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=18089","title":{"rendered":"\u4e91\u539f\u751f-\u7cfb\u7edf\u53ef\u89c2\u6d4b\u6027"},"content":{"rendered":"\n<p>\u8f6c\u8f7d\uff1a<a href=\"https:\/\/www.thebyte.com.cn\/Observability\/summary.html\">https:\/\/www.thebyte.com.cn\/Observability\/summary.html<\/a><\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">given enough eyeballs, all bugs are shallow.<br><br>\u8db3\u591f\u591a\u7684\u773c\u775b\uff0c\u5c31\u53ef\u8ba9\u6240\u6709\u95ee\u9898\u6d6e\u73b0\u3002<\/pre>\n\n\n\n<p>\u968f\u7740\u7cfb\u7edf\u89c4\u6a21\u6269\u5927\u3001\u7ec4\u4ef6\u590d\u6742\u5316\u4ee5\u53ca\u670d\u52a1\u95f4\u4f9d\u8d56\u5173\u7cfb\u7684\u589e\u52a0\uff0c\u786e\u4fdd\u7cfb\u7edf\u7a33\u5b9a\u6027\u5df2\u8d85\u51fa\u7edd\u5927\u591a\u6570 IT \u56e2\u961f\u7684\u80fd\u529b\u6781\u9650\u3002<\/p>\n\n\n\n<p>\u590d\u6742\u6027\u5931\u63a7\u95ee\u9898\u5728\u5de5\u4e1a\u9886\u57df\u540c\u6837\u51fa\u73b0\u8fc7\u300219 \u4e16\u7eaa\u672b\u8d77\uff0c\u7535\u6c14\u5de5\u7a0b\u7684\u7ec6\u5206\u9886\u57df\u8fc5\u901f\u53d1\u5c55\uff0c\u5c24\u5176\u662f 20 \u4e16\u7eaa 50 \u5e74\u4ee3\u7684\u822a\u7a7a\u9886\u57df\uff0c\u7814\u53d1\u6548\u7387\u8981\u6c42\u8d8a\u6765\u8d8a\u9ad8\u3001\u8fd0\u884c\u73af\u5883\u8d8a\u6765\u8d8a\u591a\u6837\u5316\uff0c\u7cfb\u7edf\u65e5\u76ca\u590d\u6742\u5bf9\u7a33\u5b9a\u6027\u63d0\u51fa\u4e86\u5de8\u5927\u6311\u6218\u3002\u5728\u8fd9\u4e00\u80cc\u666f\u4e0b\uff0c\u5308\u7259\u5229\u88d4\u5de5\u7a0b\u5e08 Rudolf Emil K\u00e1lm\u00e1n \u63d0\u51fa\u4e86\u201c\u53ef\u89c2\u6d4b\u6027\u201d\u6982\u5ff5\uff0c\u5176\u7406\u5ff5\u7684\u6838\u5fc3\u662f\u201c\u901a\u8fc7\u5206\u6790\u7cfb\u7edf\u5411\u5916\u90e8\u8f93\u51fa\u7684\u4fe1\u53f7\uff0c\u5224\u65ad\u5de5\u4f5c\u72b6\u6001\u5e76\u5b9a\u4f4d\u7f3a\u9677\u7684\u6839\u56e0\u201d\u3002<\/p>\n\n\n\n<p>\u501f\u9274\u7535\u6c14\u7cfb\u7edf\u7684\u89c2\u6d4b\u7406\u5ff5\uff0c\u6211\u4eec\u4e5f\u53ef\u4ee5\u901a\u8fc7\u7cfb\u7edf\u8f93\u51fa\u5404\u7c7b\u4fe1\u606f\uff0c\u5b9e\u73b0\u8f6f\u4ef6\u7cfb\u7edf\u7684\u53ef\u89c2\u6d4b\u30022018 \u5e74\uff0cCNCF \u7387\u5148\u5c06\u201c\u53ef\u89c2\u6d4b\u6027\u201d\u6982\u5ff5\u5f15\u5165 IT \u9886\u57df\uff0c\u5f3a\u8c03\u5b83\u662f\u4e91\u539f\u751f\u65f6\u4ee3\u8f6f\u4ef6\u7684\u5fc5\u5907\u80fd\u529b\uff01\u4ece\u751f\u4ea7\u6240\u9700\u5230\u6982\u5ff5\u53d1\u58f0\uff0c\u52a0\u4e4b Google \u5728\u5185\u7684\u4f17\u591a\u5927\u5382\u4e00\u62e5\u800c\u4e0a\uff0c\u201c\u53ef\u89c2\u6d4b\u6027\u201d\u9010\u6e10\u53d6\u4ee3\u201c\u76d1\u63a7\u201d\uff0c\u6210\u4e3a\u4e91\u539f\u751f\u9886\u57df\u6700\u70ed\u95e8\u7684\u8bdd\u9898\u4e4b\u4e00\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"371\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-404-1024x371.png\" alt=\"\" class=\"wp-image-18090\" style=\"width:526px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-404-1024x371.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-404-300x109.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-404-768x278.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-404-1536x556.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-404-830x301.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-404-230x83.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-404-350x127.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-404-480x174.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-404.png 1938w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u4ec0\u4e48\u662f\u53ef\u89c2\u6d4b\u6027<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u4ec0\u4e48\u662f\u53ef\u89c2\u6d4b\u6027\uff1f\u89c2\u6d4b\u7684\u53c8\u662f\u4ec0\u4e48\uff1f<\/p>\n\n\n\n<p>Google Cloud \u5728\u4ecb\u7ecd\u53ef\u89c2\u6d4b\u6807\u51c6\u9879\u76ee OpenTelemetry \u65f6\u63d0\u5230\u4e00\u4e2a\u6982\u5ff5 \u2014\u2014 \u201c\u9065\u6d4b\u6570\u636e\u201d\uff08telemetry data\uff09<sup><a href=\"https:\/\/www.thebyte.com.cn\/Observability\/What-is-Observability.html#footnote1\">[1]<\/a><a><\/a><\/sup>\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u9065\u6d4b\u6570\u636e<br><br>\u9065\u6d4b\u6570\u636e\uff08telemetry data\uff09\u662f\u6307\u91c7\u6837\u548c\u6c47\u603b\u6709\u5173\u8f6f\u4ef6\u7cfb\u7edf\u6027\u80fd\u548c\u884c\u4e3a\u7684\u6570\u636e\uff0c\u8fd9\u4e9b\u6570\u636e\uff08\u63a5\u53e3\u7684\u54cd\u5e94\u65f6\u95f4\u3001\u8bf7\u6c42\u9519\u8bef\u7387\u3001\u670d\u52a1\u8d44\u6e90\u6d88\u8017\u7b49\uff09\u7528\u4e8e\u76d1\u63a7\u548c\u4e86\u89e3\u7cfb\u7edf\u7684\u5f53\u524d\u72b6\u6001\u3002<\/pre>\n\n\n\n<p>\u201c\u9065\u6d4b\u6570\u636e\u201d\u770b\u8d77\u6765\u964c\u751f\uff0c\u4f46\u4f60\u80af\u5b9a\u65e0\u610f\u95f4\u542c\u8fc7\u3002\u89c2\u770b\u706b\u7bad\u53d1\u5c04\u7684\u76f4\u64ad\u65f6\uff0c\u4f60\u5e94\u8be5\u542c\u5230\u8fc7\u7c7b\u4f3c\u7684\u6307\u4ee4\uff1a\u201c\u4e1c\u98ce\u5149\u5b66 USB \u96f7\u8fbe\u8ddf\u8e2a\u6b63\u5e38\uff0c\u9065\u6d4b\u4fe1\u53f7\u6b63\u5e38\u201d \u3002\u968f\u7740\u706b\u7bad\u5347\u7a7a\uff0c\u76f4\u64ad\u753b\u9762\u8fd8\u4f1a\u7279\u610f\u5207\u6362\u5230\u4e00\u4e2a\u770b\u8d77\u6765\u201c\u9ad8\u5927\u4e0a\u201d\u4eea\u8868\u63a7\u5236\u53f0\u3002<\/p>\n\n\n\n<p>\u5b9e\u9645\u4e0a\uff0c\u8f6f\u4ef6\u9886\u57df\u7684\u89c2\u6d4b\u4e0e\u4e0a\u8ff0\u706b\u7bad\u53d1\u5c04\u7cfb\u7edf\u76f8\u4f3c\uff0c\u90fd\u662f\u901a\u8fc7\u5168\u9762\u6536\u96c6\u7cfb\u7edf\u8fd0\u884c\u6570\u636e\uff08\u9065\u6d4b\u6570\u636e\uff09\uff0c\u4ee5\u4e86\u89e3\u5185\u90e8\u72b6\u6001\u3002\u6240\u4ee5\u8bf4\uff0c\u53ef\u89c2\u6d4b\u6027\u662f\u6307\u7cfb\u7edf\u7684\u5185\u90e8\u72b6\u6001\u80fd\u591f\u901a\u8fc7\u5916\u90e8\u8f93\u51fa\uff08\u5982\u65e5\u5fd7\u3001\u6307\u6807\u3001\u8ffd\u8e2a\u7b49\uff09\u6765\u8fdb\u884c\u89c2\u5bdf\u548c\u7406\u89e3\u7684\u80fd\u529b\u3002\u6362\u53e5\u8bdd\u8bf4\uff0c\u7cfb\u7edf\u7684\u53ef\u89c2\u6d4b\u6027\u4f7f\u5f97\u6211\u4eec\u80fd\u591f\u4ece\u7cfb\u7edf\u7684\u5916\u90e8\u83b7\u53d6\u8db3\u591f\u7684\u4fe1\u606f\uff0c\u4ee5\u4fbf\u5206\u6790\u548c\u89e3\u51b3\u53ef\u80fd\u5b58\u5728\u7684\u95ee\u9898\uff0c\u9884\u6d4b\u7cfb\u7edf\u884c\u4e3a\uff0c\u6216\u8005\u4f18\u5316\u7cfb\u7edf\u6027\u80fd\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u53ef\u89c2\u6d4b\u6027\u4e0e\u4f20\u7edf\u76d1\u63a7<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u4e86\u89e3\u4ec0\u4e48\u662f\u53ef\u89c2\u6d4b\u6027\u540e\uff0c\u63a5\u8e35\u800c\u6765\u7684\u95ee\u9898\u662f\uff0c\u5b83\u4e0e\u4f20\u7edf\u76d1\u63a7\u6709\u4f55\u533a\u522b\uff1f\u4e1a\u5185\u4e13\u5bb6 Baron Schwartz \u66fe\u7528\u4e00\u53e5\u7b80\u6d01\u7684\u8bdd\u603b\u7ed3\u4e86\u4e24\u8005\u7684\u5173\u7cfb\uff0c\u4e0d\u59a8\u6765\u770b\u4ed6\u7684\u89e3\u91ca\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u53ef\u89c2\u6d4b\u6027\u4e0e\u76d1\u63a7\u7684\u5173\u7cfb<br><br>\u76d1\u63a7\u544a\u8bc9\u6211\u4eec\u7cfb\u7edf\u54ea\u4e9b\u90e8\u5206\u662f\u6b63\u5e38\u7684\uff0c\u53ef\u89c2\u6d4b\u6027\u544a\u8bc9\u6211\u4eec\u7cfb\u7edf\u4e3a\u4ec0\u4e48\u4e0d\u6b63\u5e38\u4e86\u3002<br><br>\u2014\u2014by\u300a\u9ad8\u6027\u80fd MySQL\u300b\u4f5c\u8005 Baron Schwartz<\/pre>\n\n\n\n<p>\u5982\u56fe 9-1\uff0c\u6211\u4eec\u628a\u7cfb\u7edf\u7684\u7406\u89e3\u7a0b\u5ea6\u3001\u53ef\u6536\u96c6\u4fe1\u606f\u4e4b\u95f4\u7684\u5173\u7cfb\u8c61\u9650\u5316\u5206\u6790\uff0c\u8bf4\u660e\u53ef\u89c2\u6d4b\u6027\u4e0e\u4f20\u7edf\u76d1\u63a7\u7684\u533a\u522b\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"552\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-405-1024x552.png\" alt=\"\" class=\"wp-image-18091\" style=\"width:562px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-405-1024x552.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-405-300x162.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-405-768x414.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-405-1536x827.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-405-830x447.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-405-230x124.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-405-350x189.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-405-480x259.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-405.png 1964w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>X \u8f74\u7684\u53f3\u4fa7\uff08Known Knows \u548c Known Unknowns\uff09\u8868\u793a\u786e\u5b9a\u6027\u7684\u5df2\u77e5\u548c\u672a\u77e5\uff0c\u56fe\u4e2d\u7ed9\u51fa\u4e86\u76f8\u5e94\u7684\u4f8b\u5b50\u3002\u8fd9\u7c7b\u4fe1\u606f\u901a\u5e38\u662f\u7cfb\u7edf\u4e0a\u7ebf\u524d\u5c31\u80fd\u9884\u89c1\uff0c\u5e76\u80fd\u591f\u76d1\u63a7\u7684\u57fa\u7840\u6027\u3001\u666e\u9002\u6027\u4e8b\u5b9e\uff08\u5982 CPU Load\u3001\u5185\u5b58\u3001TPS\u3001QPS \u7b49\u6307\u6807\uff09\u3002\u4f20\u7edf\u7684\u76d1\u63a7\u7cfb\u7edf\u5927\u90e8\u5206\u56f4\u7ed5\u8fd9\u4e9b\u786e\u5b9a\u7684\u56e0\u7d20\u5c55\u5f00\u3002<\/p>\n\n\n\n<p>\u4f46\u662f\u5f88\u591a\u60c5\u51b5\u4e0b\uff0c\u4e0a\u8ff0\u4fe1\u606f\u5f88\u96be\u5168\u9762\u63cf\u8ff0\u548c\u8861\u91cf\u7cfb\u7edf\u7684\u72b6\u6001\u3002\u6bd4\u5982\u5750\u6807\u7684\u5de6\u4e0a\u89d2\u7684 Unknown Knowns\uff08\u672a\u77e5\u7684\u5df2\u77e5\uff0c\u901a\u4fd7\u7406\u89e3\u4e3a\u5047\u8bbe\uff09\uff0c\u4e3e\u4e2a\u4f8b\u5b50\uff0c\u901a\u5e38\u4f1a\u5f15\u5165\u9650\u6d41\u7b56\u7565\u6765\u4fdd\u8bc1\u670d\u52a1\u53ef\u7528\u6027\u3002\u5047\u8bbe\u8bf7\u6c42\u91cf\u7a81\u7136\u5f02\u5e38\u66b4\u589e\uff0c\u9650\u6d41\u7b56\u7565\u727a\u7272\u5c0f\u90e8\u5206\u7528\u6237\u3001\u4fdd\u8bc1\u7edd\u5927\u90e8\u5206\u7528\u6237\u7684\u4f53\u9a8c\u3002\u4f46\u6ce8\u610f\uff0c\u8fd9\u91cc\u7684\u201c\u5047\u8bbe\u201d\uff08\u8bf7\u6c42\u91cf\u7a81\u7136\u66b4\u589e\uff09\u5e76\u672a\u5b9e\u9645\u53d1\u751f\u3002\u56e0\u6b64\uff0c\u5e73\u5e38\u60c5\u51b5\u4e0b\u7684\u76d1\u63a7\u770b\u4e0d\u51fa\u4efb\u4f55\u5f02\u5e38\u3002<\/p>\n\n\n\n<p>\u4f46\u5982\u679c\u8bf7\u6c42\u91cf\u7a81\u7136\u66b4\u589e\u4e86\uff0c\u540c\u65f6\u90a3\u4e9b\u201c\u5047\u8bbe\u201d\u53c8\u672a\u7ecf\u8fc7\u9a8c\u8bc1\uff08\u5982\u9650\u6d41\u903b\u8f91\u5199\u9519\u4e86\uff09\uff0c\u5c31\u4f1a\u5bfc\u81f4\u6211\u4eec\u78b0\u89c1\u6700\u4e0d\u613f\u89c1\u5230\u7684\u60c5\u51b5 \u2014\u2014 Unknown Unknowns\uff08\u672a\u77e5\u7684\u672a\u77e5\uff0c\u6beb\u65e0\u5f81\u5146\u4e14\u96be\u4ee5\u7406\u89e3\uff09\u3002<\/p>\n\n\n\n<p>\u7ecf\u9a8c\u4e30\u5bcc\uff08\u7ffb\u4e86\u65e0\u6570\u6b21\u8f66\uff09\u7684\u5de5\u7a0b\u5e08\u6839\u636e\u4ee5\u5f80\u7ecf\u9a8c\uff0c\u9010\u6b65\u7f29\u5c0f Unknown Unknowns \u7684\u6392\u67e5\u8303\u56f4\uff0c\u4ece\u800c\u7f29\u77ed\u6545\u969c\u4fee\u590d\u65f6\u95f4\u3002\u4f46\u66f4\u5408\u7406\u7684\u505a\u6cd5\u662f\uff0c\u6839\u636e\u7cfb\u7edf\u7684\u7ec6\u5fae\u8f93\u51fa\uff08\u5982 metrics\u3001logs\u3001traces\uff0c\u4e5f\u5c31\u662f\u9065\u6d4b\u6570\u636e\uff09\uff0c\u4ee5\u4f4e\u95e8\u69db\u4e14\u76f4\u89c2\u7684\u65b9\u5f0f\uff08\u5982\u76d1\u63a7\u5927\u76d8\u3001\u94fe\u8def\u8ffd\u8e2a\u62d3\u6251\u7b49\uff09\u63cf\u7ed8\u51fa\u7cfb\u7edf\u7684\u5168\u9762\u72b6\u6001\u3002\u5982\u6b64\uff0c\u5f53\u53d1\u751f Unknown Unkowns \u60c5\u51b5\u65f6\uff0c\u624d\u80fd\u5177\u8c61\u5316\u7684\u4e00\u6b65\u6b65\u5b9a\u4f4d\u5230\u95ee\u9898\u7684\u6839\u56e0\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u9065\u6d4b\u6570\u636e\u7684\u5206\u7c7b\u4e0e\u5904\u7406<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u4e1a\u754c\u5c06\u7cfb\u7edf\u8f93\u51fa\u7684\u6570\u636e\u603b\u7ed3\u4e3a\u4e09\u79cd\u72ec\u7acb\u7684\u7c7b\u578b\uff0c\u5b83\u4eec\u7684\u542b\u4e49\u4e0e\u533a\u522b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u6307\u6807<\/strong>\uff08metric\uff09\uff1a\u91cf\u5316\u7cfb\u7edf\u6027\u80fd\u548c\u72b6\u6001\u7684\u201c\u6570\u636e\u70b9\u201d\uff0c\u6bcf\u4e2a\u6570\u636e\u70b9\u5305\u542b\u5ea6\u91cf\u5bf9\u8c61\uff08\u5982\u63a5\u53e3\u8bf7\u6c42\u6570\uff09\u3001\u5ea6\u91cf\u503c\uff08\u5982 100 \u6b21\/\u79d2\uff09\u548c\u53d1\u751f\u7684\u65f6\u95f4\uff0c\u591a\u4e2a\u65f6\u95f4\u4e0a\u8fde\u7eed\u7684\u6570\u636e\u70b9\u4fbf\u53ef\u4ee5\u5206\u6790\u7cfb\u7edf\u6027\u80fd\u7684\u8d8b\u52bf\u548c\u53d8\u5316\u89c4\u5f8b\u3002\u6307\u6807\u662f\u53d1\u73b0\u95ee\u9898\u7684\u8d77\u70b9\uff0c\u4f8b\u5982\u4f60\u534a\u591c\u6536\u5230\u4e00\u6761\u544a\u8b66\uff1a\u201c12 \u70b9 22 \u5206\uff0c\u63a5\u53e3\u8bf7\u6c42\u6210\u529f\u7387\u4e0b\u964d\u5230 10%\u201d\uff0c\u8fd9\u8868\u660e\u7cfb\u7edf\u51fa\u73b0\u4e86\u95ee\u9898\u3002\u63a5\u7740\uff0c\u4f60\u6323\u624e\u8d77\u5e8a\uff0c\u5206\u6790\u94fe\u8def\u8ffd\u8e2a\u548c\u65e5\u5fd7\u6570\u636e\uff0c\u627e\u5230\u95ee\u9898\u7684\u6839\u672c\u539f\u56e0\u5e76\u8fdb\u884c\u4fee\u590d\u3002<\/li>\n\n\n\n<li><strong>\u65e5\u5fd7<\/strong>\uff08log\uff09\uff1a\u7cfb\u7edf\u8fd0\u884c\u8fc7\u7a0b\u4e2d\uff0c\u8bb0\u5f55\u79bb\u6563\u4e8b\u4ef6\u7684\u6587\u672c\u6570\u636e\u3002\u6bcf\u6761\u65e5\u5fd7\u8be6\u7ec6\u63cf\u8ff0\u4e86\u4e8b\u4ef6\u64cd\u4f5c\u5bf9\u8c61\u3001\u64cd\u4f5c\u7ed3\u679c\u3001\u64cd\u4f5c\u65f6\u95f4\u7b49\u4fe1\u606f\u3002\u4f8b\u5982\u4e0b\u9762\u7684\u65e5\u5fd7\u793a\u4f8b\uff0c\u5305\u542b\u4e86\u65f6\u95f4\u3001\u65e5\u5fd7\u7ea7\u522b\uff08ERROR\uff09\u4ee5\u53ca\u4e8b\u4ef6\u63cf\u8ff0\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">[2024-12-27 14:35:22] ERROR: Failed to connect to database. Retry attempts exceeded.<\/pre>\n\n\n\n<p>\u65e5\u5fd7\u4e3a\u95ee\u9898\u8bca\u65ad\u63d0\u4f9b\u4e86\u7cbe\u51c6\u7684\u4e0a\u4e0b\u6587\u4fe1\u606f\uff0c\u4e0e\u6307\u6807\u5f62\u6210\u4e92\u8865\u3002\u5f53\u7cfb\u7edf\u6545\u969c\u65f6\uff0c\u201c\u6307\u6807\u201d\u544a\u8bc9\u4f60\u5e94\u7528\u7a0b\u5e8f\u51fa\u73b0\u4e86\u95ee\u9898\uff0c\u201c\u65e5\u5fd7\u201d\u5219\u89e3\u91ca\u4e86\u95ee\u9898\u51fa\u73b0\u7684\u539f\u56e0\u3002<\/p>\n\n\n\n<ul>\n<li><strong>\u94fe\u8def\u8ffd\u8e2a<\/strong>\uff08trace\uff09\uff1a\u8bb0\u5f55\u8bf7\u6c42\u5728\u591a\u4e2a\u670d\u52a1\u4e4b\u95f4\u7684\u201c\u8c03\u7528\u94fe\u8def\u201d\uff08Trace\uff09\uff0c\u4ee5\u201c\u8ffd\u8e2a\u6811\u201d\uff08Trace Tree\uff09\u7684\u5f62\u5f0f\u5448\u73b0\u8bf7\u6c42\u7684\u201c\u8c03\u7528\u201d\uff08span\uff09\u3001\u8017\u65f6\u5206\u5e03\u7b49\u4fe1\u606f\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u8ffd\u8e2a\u6811\nTrace ID: 12345\n\u2514\u2500\u2500 Span ID: 1 - API Gateway (Duration: 50ms)\n    \u2514\u2500\u2500 Span ID: 2 - User Service (Duration: 30ms)\n        \u2514\u2500\u2500 Span ID: 3 - Database Service (Duration: 20ms)\n<\/pre>\n\n\n\n<p>\u4e0a\u8ff0 3 \u7c7b\u6570\u636e\u5404\u81ea\u4fa7\u91cd\u4e0d\u540c\uff0c\u4f46\u5e76\u975e\u5b64\u7acb\u5b58\u5728\uff0c\u5b83\u4eec\u4e4b\u95f4\u6709\u7740\u5929\u7136\u7684\u4ea4\u96c6\u4e0e\u4e92\u8865\u3002\u6bd4\u5982\u6307\u6807\u76d1\u63a7\uff08\u544a\u8b66\uff09\u5e2e\u52a9\u53d1\u73b0\u95ee\u9898\uff0c\u65e5\u5fd7\u548c\u94fe\u8def\u8ffd\u8e2a\u5219\u5e2e\u52a9\u5b9a\u4f4d\u6839\u672c\u539f\u56e0\u3002\u8fd9\u4e09\u8005\u4e4b\u95f4\u7684\u5173\u7cfb\u5982\u56fe 9-2 \u7684\u97e6\u6069\u56fe\u6240\u793a\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"681\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-406-1024x681.png\" alt=\"\" class=\"wp-image-18092\" style=\"width:472px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-406-1024x681.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-406-300x199.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-406-768x510.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-406-1536x1021.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-406-830x552.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-406-230x153.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-406-350x233.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-406-480x319.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-406.png 1896w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>2021 \u5e74\uff0cCNCF \u53d1\u5e03\u4e86\u53ef\u89c2\u6d4b\u6027\u767d\u76ae\u4e66<sup><a href=\"https:\/\/www.thebyte.com.cn\/Observability\/signals.html#footnote1\">[1]<\/a><\/sup>\uff0c\u91cc\u9762\u65b0\u589e\u4e86\u6027\u80fd\u5256\u6790\uff08Profiling\uff09\u548c\u6838\u5fc3\u8f6c\u50a8\uff08Core dump\uff092 \u79cd\u6570\u636e\u7c7b\u578b\u3002\u63a5\u4e0b\u6765\uff0c\u7b14\u8005\u5c06\u8be6\u7ec6\u4ecb\u7ecd\u8fd9 5 \u7c7b\u9065\u6d4b\u6570\u636e\u7684\u91c7\u96c6\u3001\u5b58\u50a8\u548c\u5206\u6790\u539f\u7406\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u6307\u6807\u7684\u5904\u7406<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u63d0\u5230\u6307\u6807\uff0c\u5c31\u4e0d\u5f97\u4e0d\u63d0 Prometheus \u7cfb\u7edf\u3002Prometheus \u662f\u7ee7 Kubernetes \u4e4b\u540e\uff0c\u4e91\u539f\u751f\u8ba1\u7b97\u57fa\u91d1\u4f1a\uff08CNCF\uff09\u7684\u7b2c\u4e8c\u4e2a\u6b63\u5f0f\u9879\u76ee\u3002\u8be5\u9879\u76ee\u53d1\u5c55\u81f3\u4eca\uff0c\u5df2\u6210\u4e3a\u4e91\u539f\u751f\u7cfb\u7edf\u4e2d\u5904\u7406\u6307\u6807\u76d1\u63a7\u7684\u4e8b\u5b9e\u6807\u51c6\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u989d\u5916\u77e5\u8bc6<br><br>\u6709\u8da3\u7684\u662f\uff0c\u50cf Kubernetes \u4e00\u6837\uff0cPrometheus \u4e5f\u6e90\u81ea Google \u7684 Borg \u4f53\u7cfb\uff0c\u5176\u539f\u578b\u662f\u4e0e Borg \u540c\u671f\u8bde\u751f\u7684\u5185\u90e8\u76d1\u63a7\u7cfb\u7edf BorgMon\u3002Prometheus \u7684\u53d1\u8d77\u539f\u56e0\u4e0e Kubernetes \u7c7b\u4f3c\uff0c\u90fd\u662f\u5e0c\u671b\u4ee5\u66f4\u597d\u7684\u65b9\u5f0f\u5c06 Google \u5185\u90e8\u7cfb\u7edf\u7684\u8bbe\u8ba1\u7406\u5ff5\u4f20\u9012\u7ed9\u5916\u90e8\u5f00\u53d1\u8005\u3002<\/pre>\n\n\n\n<p>\u4f5c\u4e3a\u76d1\u63a7\u7cfb\u7edf\uff0cPrometheus \u7684\u57fa\u672c\u539f\u7406\u5982\u56fe 9-3 \u6240\u793a\uff0c\u901a\u8fc7 pull\uff08\u62c9\u53d6\uff09\u65b9\u5f0f\u6536\u96c6\u88ab\u76d1\u63a7\u5bf9\u8c61\u7684\u6307\u6807\u6570\u636e\uff0c\u5e76\u5c06\u5176\u5b58\u50a8\u5728 TSDB\uff08\u65f6\u5e8f\u6570\u636e\u5e93\uff09\u4e2d\u3002\u5176\u4ed6\u7ec4\u4ef6\uff08\u5982 Grafana \u548c Alertmanager\uff09\u914d\u5408\u8fd9\u4e00\u673a\u5236\uff0c\u5b9e\u73b0\u6307\u6807\u6570\u636e\u53ef\u89c6\u5316\u548c\u9884\u8b66\u529f\u80fd\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"638\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-408-1024x638.png\" alt=\"\" class=\"wp-image-18094\" style=\"width:624px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-408-1024x638.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-408-300x187.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-408-768x478.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-408-1536x957.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-408-2048x1276.png 2048w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-408-830x517.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-408-230x143.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-408-350x218.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-408-480x299.png 480w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u5b9a\u4e49\u6307\u6807\u7684\u7c7b\u578b<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u4e3a\u4fbf\u4e8e\u7406\u89e3\u548c\u4f7f\u7528\u4e0d\u540c\u7c7b\u578b\u7684\u6307\u6807\uff0cPrometheus \u5b9a\u4e49\u4e86\u56db\u79cd\u6307\u6807\u7c7b\u578b\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u8ba1\u6570\u5668<\/strong>\uff08Counter\uff09\uff1a\u4e00\u79cd\u53ea\u589e\u4e0d\u51cf\u7684\u6307\u6807\u7c7b\u578b\uff0c\u7528\u4e8e\u8bb0\u5f55\u7279\u5b9a\u4e8b\u4ef6\u7684\u53d1\u751f\u6b21\u6570\u3002\u5e38\u7528\u4e8e\u7edf\u8ba1\u8bf7\u6c42\u6b21\u6570\u3001\u4efb\u52a1\u5b8c\u6210\u6570\u91cf\u3001\u9519\u8bef\u53d1\u751f\u6b21\u6570\u7b49\u3002\u5728\u76d1\u63a7 Web \u670d\u52a1\u5668\u65f6\uff0c\u53ef\u4ee5\u4f7f\u7528 Counter \u6765\u8bb0\u5f55 HTTP \u8bf7\u6c42\u7684\u603b\u6570\uff0c\u901a\u8fc7\u89c2\u5bdf\u8fd9\u4e2a\u6307\u6807\u7684\u589e\u957f\u8d8b\u52bf\uff0c\u80fd\u4e86\u89e3\u7cfb\u7edf\u7684\u8d1f\u8f7d\u60c5\u51b5\uff1b<\/li>\n\n\n\n<li><strong>\u4eea\u8868\u76d8<\/strong>\uff08Gauge\uff09\uff1a\u4e00\u79cd\u53ef\u4ee5\u4efb\u610f\u53d8\u5316\u7684\u6307\u6807\uff0c\u7528\u4e8e\u8868\u793a\u67d0\u4e2a\u65f6\u523b\u7684\u77ac\u65f6\u503c\u3002\u5e38\u7528\u4e8e\u76d1\u63a7\u7cfb\u7edf\u7684\u5f53\u524d\u72b6\u6001\uff0c\u5982\u5185\u5b58\u4f7f\u7528\u91cf\u3001CPU \u5229\u7528\u7387\u3001\u5f53\u524d\u5728\u7ebf\u7528\u6237\u6570\u7b49\uff1b<\/li>\n\n\n\n<li><strong>\u76f4\u65b9\u56fe<\/strong>\uff08Histogram\uff09\uff1a\u7528\u4e8e\u7edf\u8ba1\u6570\u636e\u5728\u4e0d\u540c\u533a\u95f4\u7684\u5206\u5e03\u60c5\u51b5\u3002\u5b83\u4f1a\u5c06\u6570\u636e\u5212\u5206\u5230\u591a\u4e2a\u9884\u5b9a\u4e49\u7684\u6876\uff08bucket\uff09\u4e2d\uff0c\u8bb0\u5f55\u6bcf\u4e2a\u6876\u5185\u6570\u636e\u7684\u6570\u91cf\u3002\u5e38\u7528\u4e8e\u5206\u6790\u8bf7\u6c42\u5ef6\u8fdf\u3001\u54cd\u5e94\u65f6\u95f4\u3001\u6570\u636e\u5927\u5c0f\u7b49\u5206\u5e03\u60c5\u51b5\u3002\u6bd4\u5982\u76d1\u63a7\u670d\u52a1\u54cd\u5e94\u65f6\u95f4\u65f6\uff0cHistogram \u53ef\u4ee5\u5c06\u54cd\u5e94\u65f6\u95f4\u5212\u5206\u5230\u4e0d\u540c\u7684\u6876\u4e2d\uff0c\u5982 0-100ms\u3001100-200ms \u7b49\uff0c\u901a\u8fc7\u89c2\u5bdf\u5404\u4e2a\u6876\u4e2d\u7684\u6570\u636e\u5206\u5e03\uff0c\u80fd\u5feb\u901f\u5b9a\u4f4d\u54cd\u5e94\u65f6\u95f4\u7684\u96c6\u4e2d\u533a\u95f4\u548c\u5f02\u5e38\u60c5\u51b5\uff1b<\/li>\n\n\n\n<li><strong>\u6458\u8981<\/strong>\uff08Summary\uff09\uff1a\u548c\u76f4\u65b9\u56fe\u7c7b\u4f3c\uff0c\u6458\u8981\u4e5f\u662f\u7528\u4e8e\u7edf\u8ba1\u6570\u636e\u7684\u5206\u5e03\u60c5\u51b5\uff0c\u4f46\u4e0e\u76f4\u65b9\u56fe\u4e0d\u540c\u7684\u662f\uff0cSummary \u4e0d\u80fd\u63d0\u4f9b\u6570\u636e\u5728\u5404\u4e2a\u5177\u4f53\u533a\u95f4\u7684\u8be6\u7ec6\u5206\u5e03\u60c5\u51b5\uff0c\u66f4\u4fa7\u91cd\u4e8e\u5355\u4e00\u5b9e\u4f8b\uff08\u4f8b\u5982\u5355\u4e2a\u670d\u52a1\u5b9e\u4f8b\uff09\u7684\u6570\u636e\u8fdb\u884c\u8ba1\u7b97\u3002<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"518\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-410-1024x518.png\" alt=\"\" class=\"wp-image-18096\" style=\"width:566px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-410-1024x518.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-410-300x152.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-410-768x389.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-410-1536x777.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-410-830x420.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-410-230x116.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-410-350x177.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-410-480x243.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-410.png 2004w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u4f7f\u7528 Exporter \u6536\u96c6\u6307\u6807<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u6536\u96c6\u6307\u6807\u770b\u4f3c\u7b80\u5355\uff0c\u4f46\u5b9e\u9645\u4e0a\u590d\u6742\u5f97\u591a\uff1a\u9996\u5148\uff0c\u5e94\u7528\u7a0b\u5e8f\u3001\u64cd\u4f5c\u7cfb\u7edf\u548c\u786c\u4ef6\u8bbe\u5907\u7684\u6307\u6807\u83b7\u53d6\u65b9\u5f0f\u5404\u4e0d\u76f8\u540c\uff1b\u5176\u6b21\uff0c\u5b83\u4eec\u901a\u5e38\u4e0d\u4f1a\u4ee5 Prometheus \u683c\u5f0f\u76f4\u63a5\u66b4\u9732\u3002\u4f8b\u5982\uff1a<\/p>\n\n\n\n<ul>\n<li>Linux \u7684\u8bb8\u591a\u6307\u6807\u4fe1\u606f\u5b58\u50a8\u5728 \/proc \u76ee\u5f55\u4e0b\uff0c\u5982 \/proc\/meminfo \u63d0\u4f9b\u5185\u5b58\u4fe1\u606f\uff0c\/proc\/stat \u63d0\u4f9b CPU \u4fe1\u606f\uff1b<\/li>\n\n\n\n<li>Redis \u7684\u76d1\u63a7\u6570\u636e\u901a\u8fc7\u6267\u884c INFO \u547d\u4ee4\u83b7\u53d6\uff1b<\/li>\n\n\n\n<li>\u8def\u7531\u5668\u7b49\u786c\u4ef6\u8bbe\u5907\u7684\u76d1\u63a7\u6570\u636e\u901a\u5e38\u901a\u8fc7 SNMP \u534f\u8bae\u83b7\u53d6\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u4e3a\u4e86\u89e3\u51b3\u4e0a\u8ff0\u95ee\u9898\uff0cPrometheus \u8bbe\u8ba1\u4e86 Exporter \u4f5c\u4e3a\u76d1\u63a7\u7cfb\u7edf\u4e0e\u88ab\u76d1\u63a7\u76ee\u6807\u4e4b\u95f4\u7684\u201c\u4e2d\u4ecb\u201d\uff0c\u8d1f\u8d23\u5c06\u4e0d\u540c\u6765\u6e90\u7684\u76d1\u63a7\u6570\u636e\u8f6c\u6362\u4e3a Prometheus \u652f\u6301\u7684\u683c\u5f0f\u3002<\/p>\n\n\n\n<p>Exporter \u53ef\u4ee5\u4f5c\u4e3a\u72ec\u7acb\u670d\u52a1\u8fd0\u884c\uff0c\u4e5f\u53ef\u4ee5\u4e0e\u5e94\u7528\u7a0b\u5e8f\u5171\u4eab\u540c\u4e00\u8fdb\u7a0b\uff0c\u53ea\u9700\u96c6\u6210 Prometheus \u5ba2\u6237\u7aef\u5e93\u5373\u53ef\u3002Exporter \u901a\u8fc7 HTTP \u534f\u8bae\u8fd4\u56de\u7b26\u5408 Prometheus \u683c\u5f0f\u7684\u6587\u672c\u6570\u636e\uff0cPrometheus \u670d\u52a1\u7aef\u4f1a\u5b9a\u671f\u62c9\u53d6\u8fd9\u4e9b\u6570\u636e\u3002\u4ee5\u4e0b\u662f\u4e00\u4e2a Exporter \u793a\u4f8b\uff0c\u5b83\u8fd4\u56de\u540d\u4e3a http_request_total \u7684 Counter \u7c7b\u578b\u6307\u6807\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ curl http:\/\/127.0.0.1:8080\/metrics | grep http_request_total\n# HELP http_request_total The total number of processed http requests\n# TYPE http_request_total counter \/\/ \u6307\u6807\u7c7b\u578b \u7c7b\u578b\u4e3a Counter\nhttp_request_total 5\n<\/pre>\n\n\n\n<p>\u5f97\u76ca\u4e8e Prometheus \u826f\u597d\u7684\u793e\u533a\u751f\u6001\uff0c\u73b0\u5728\u5df2\u6709\u5927\u91cf\u7528\u4e8e\u4e0d\u540c\u573a\u666f\u7684 Exporter\uff0c\u6db5\u76d6\u4e86\u57fa\u7840\u8bbe\u65bd\u3001\u4e2d\u95f4\u4ef6\u548c\u7f51\u7edc\u7b49\u5404\u4e2a\u9886\u57df\u3002\u5982\u8868 9-1 \u6240\u793a\uff0c\u8fd9\u4e9b Exporter \u6269\u5c55\u4e86 Prometheus \u7684\u76d1\u63a7\u8303\u56f4\uff0c\u51e0\u4e4e\u8986\u76d6\u4e86\u7528\u6237\u5173\u5fc3\u7684\u6240\u6709\u76d1\u63a7\u76ee\u6807\u3002<\/p>\n\n\n\n<p>\u8868 \u5e38\u7528\u7684 Exporter<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>\u8303\u56f4<\/th><th>\u5e38\u7528 Exporter<\/th><\/tr><\/thead><tbody><tr><td>\u6570\u636e\u5e93<\/td><td>MySQL Exporter\u3001Redis Exporter\u3001MongoDB Exporter\u3001MSSQL Exporter \u7b49<\/td><\/tr><tr><td>\u786c\u4ef6<\/td><td>Apcupsd Exporter\u3001IoT Edison Exporter\u3001IPMI Exporter\u3001Node Exporter \u7b49<\/td><\/tr><tr><td>\u6d88\u606f\u961f\u5217<\/td><td>Beanstalkd Exporter\u3001Kafka Exporter\u3001NSQ Exporter\u3001RabbitMQ Exporter \u7b49<\/td><\/tr><tr><td>\u5b58\u50a8<\/td><td>Ceph Exporter\u3001Gluster Exporter\u3001HDFS Exporter\u3001ScaleIO Exporter \u7b49<\/td><\/tr><tr><td>HTTP \u670d\u52a1<\/td><td>Apache Exporter\u3001HAProxy Exporter\u3001Nginx Exporter \u7b49<\/td><\/tr><tr><td>API \u670d\u52a1<\/td><td>AWS ECS Exporter\u3001Docker Cloud Exporter\u3001Docker Hub Exporter\u3001GitHub Exporter \u7b49<\/td><\/tr><tr><td>\u65e5\u5fd7<\/td><td>Fluentd Exporter\u3001Grok Exporter \u7b49<\/td><\/tr><tr><td>\u76d1\u63a7\u7cfb\u7edf<\/td><td>Collectd Exporter\u3001Graphite Exporter\u3001InfluxDB Exporter\u3001Nagios Exporter\u3001SNMP Exporter \u7b49<\/td><\/tr><tr><td>\u5176\u5b83<\/td><td>Blockbox Exporter\u3001JIRA Exporter\u3001Jenkins Exporter\u3001Confluence Exporter \u7b49<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"_3-\u4f7f\u7528\u65f6\u5e8f\u6570\u636e\u5e93\u5b58\u50a8\u6307\u6807\">\u3000<\/h2>\n\n\n\n<p><strong>\u4f7f\u7528\u65f6\u5e8f\u6570\u636e\u5e93\u5b58\u50a8\u6307\u6807<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5b58\u50a8\u6570\u636e\u672c\u6765\u662f\u4e00\u9879\u5e38\u89c4\u64cd\u4f5c\uff0c\u4f46\u5f53\u9762\u5bf9\u5b58\u50a8\u6307\u6807\u7c7b\u578b\u7684\u573a\u666f\u6765\u8bf4\uff0c\u5fc5\u987b\u6362\u4e00\u79cd\u601d\u8def\u5e94\u5bf9\u3002<\/p>\n\n\n\n<p>\u4e3e\u4e00\u4e2a\u4f8b\u5b50\uff0c\u5047\u8bbe\u4f60\u8d1f\u8d23\u7ba1\u7406\u4e00\u4e2a\u5c0f\u578b\u96c6\u7fa4\uff0c\u8be5\u96c6\u7fa4\u6709 10 \u4e2a\u8282\u70b9\uff0c\u8fd0\u884c\u7740 30 \u4e2a\u5fae\u670d\u52a1\u7cfb\u7edf\u3002\u6bcf\u4e2a\u8282\u70b9\u9700\u8981\u91c7\u96c6 CPU\u3001\u5185\u5b58\u3001\u78c1\u76d8\u548c\u7f51\u7edc\u7b49\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5\uff0c\u800c\u6bcf\u4e2a\u670d\u52a1\u5219\u9700\u8981\u91c7\u96c6\u4e1a\u52a1\u76f8\u5173\u548c\u4e2d\u95f4\u4ef6\u76f8\u5173\u7684\u6307\u6807\u3002\u5047\u8bbe\u8fd9\u4e9b\u52a0\u8d77\u6765\u4e00\u5171\u6709 20 \u4e2a\u6307\u6807\uff0c\u4e14\u6309\u6bcf 5 \u79d2\u91c7\u96c6\u4e00\u6b21\u3002\u90a3\u4e48\uff0c\u4e00\u5929\u7684\u6570\u636e\u89c4\u6a21\u5c06\u662f\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">10\uff08\u8282\u70b9\uff09* 30\uff08\u670d\u52a1\uff09* 20 (\u6307\u6807) * (86400\/5) \uff08\u79d2\uff09 = 103,680,000\uff08\u8bb0\u5f55\uff09<\/pre>\n\n\n\n<p>\u5bf9\u4e8e\u4e00\u4e2a\u4ec5\u6709 10 \u4e2a\u8282\u70b9\u7684\u5c0f\u89c4\u6a21\u4e1a\u52a1\u6765\u8bf4\uff0c<code>7*24<\/code> \u5c0f\u65f6\u4e0d\u95f4\u65ad\u751f\u6210\u7684\u6570\u636e\u53ef\u80fd\u8d85\u8fc7\u4e0a\u4ebf\u6761\u8bb0\u5f55\uff0c\u5360\u7528 TB \u7ea7\u522b\u7684\u5b58\u50a8\u7a7a\u95f4\u3002\u867d\u7136\u4f20\u7edf\u6570\u636e\u5e93\u4e5f\u53ef\u4ee5\u5904\u7406\u65f6\u5e8f\u6570\u636e\uff0c\u4f46\u5b83\u4eec\u5e76\u672a\u5145\u5206\u5229\u7528\u65f6\u5e8f\u6570\u636e\u7684\u7279\u70b9\u3002\u56e0\u6b64\uff0c\u4f7f\u7528\u8fd9\u4e9b\u6570\u636e\u5e93\u5f80\u5f80\u9700\u8981\u4e0d\u65ad\u589e\u52a0\u8ba1\u7b97\u548c\u5b58\u50a8\u8d44\u6e90\uff0c\u5bfc\u81f4\u7cfb\u7edf\u7684\u8fd0\u7ef4\u6210\u672c\u6025\u5267\u4e0a\u5347\u3002<\/p>\n\n\n\n<p>\u901a\u8fc7\u4e0b\u9762\u7684\u4f8b\u5b50\uff0c\u6211\u4eec\u6765\u5206\u6790\u6307\u6807\u6570\u636e\u7684\u7279\u5f81\u3002\u53ef\u4ee5\u53d1\u73b0\uff0c\u6307\u6807\u6570\u636e\u662f\u7eaf\u6570\u5b57\u578b\u7684\u3001\u5177\u6709\u65f6\u95f4\u5c5e\u6027\u3001\u65e8\u5728\u63ed\u793a\u67d0\u4e9b\u4e8b\u4ef6\u7684\u8d8b\u52bf\u548c\u89c4\u5f8b\uff0c\u5b83\u4eec\u4e0d\u6d89\u53ca\u5173\u7cfb\u5d4c\u5957\u3001\u4e3b\u952e\/\u5916\u952e\uff0c\u4e5f\u4e0d\u9700\u8981\u8003\u8651\u4e8b\u52a1\u5904\u7406\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">  {\n    \"metric\": \"http_requests_total\",  \/\/ \u6307\u6807\u540d\u79f0\uff0c\u8868\u793a HTTP \u8bf7\u6c42\u7684\u603b\u6570\n    \"labels\": {                       \/\/ \u6807\u7b7e\uff0c\u7528\u4e8e\u63cf\u8ff0\u8be5\u6307\u6807\u7684\u4e0d\u540c\u7ef4\u5ea6\n      \"method\": \"GET\",                \/\/ HTTP \u8bf7\u6c42\u65b9\u6cd5\n      \"handler\": \"\/api\/v1\/users\",     \/\/ \u8bf7\u6c42\u7684\u5904\u7406\u7aef\u70b9\n      \"status\": \"200\",                \/\/ HTTP \u54cd\u5e94\u72b6\u6001\u7801\n    },\n    \"value\": 1458,                    \/\/ \u8be5\u7ef4\u5ea6\u4e0b\u7684\u8bf7\u6c42\u6570\u91cf\n  },<\/pre>\n\n\n\n<p>\u9488\u5bf9\u65f6\u5e8f\u6570\u636e\u7279\u70b9\uff0c\u4e1a\u754c\u5df2\u53d1\u5c55\u51fa\u4e13\u95e8\u4f18\u5316\u7684\u6570\u636e\u5e93\u7c7b\u578b \u2014\u2014 \u65f6\u5e8f\u6570\u636e\u5e93\uff08Time-Series Database\uff0c\u7b80\u79f0 TSDB\uff09\u3002\u4e0e\u5e38\u89c4\u6570\u636e\u5e93\uff08\u5982\u5173\u7cfb\u578b\u6570\u636e\u5e93\u6216 NoSQL \u6570\u636e\u5e93\uff09\u76f8\u6bd4\uff0c\u65f6\u5e8f\u6570\u636e\u5e93\u5728\u8bbe\u8ba1\u548c\u7528\u9014\u4e0a\u5b58\u5728\u663e\u8457\u5dee\u5f02\uff0c\u6bd4\u5982\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u6570\u636e\u7ed3\u6784<\/strong>\uff1a \u65f6\u5e8f\u6570\u636e\u5e93\u4e00\u822c\u91c7\u7528 LSM-Tree\uff0c\u8fd9\u662f\u4e00\u79cd\u4e13\u4e3a\u5199\u5bc6\u96c6\u578b\u573a\u666f\u8bbe\u8ba1\u7684\u5b58\u50a8\u7ed3\u6784\uff0c\u5176\u539f\u7406\u662f\u5c06\u6570\u636e\u5148\u5199\u5165\u5185\u5b58\uff0c\u5f85\u79ef\u7d2f\u4e00\u5b9a\u91cf\u540e\u6279\u91cf\u5408\u5e76\u5e76\u5199\u5165\u78c1\u76d8\u3002\u56e0\u6b64\uff0c\u65f6\u5e8f\u6570\u636e\u5e93\u5728\u5199\u5165\u541e\u5410\u91cf\u65b9\u9762\uff0c\u901a\u5e38\u4f18\u4e8e\u5e38\u89c4\u6570\u636e\u5e93\uff08\u57fa\u4e8e B+Tree\uff09\uff1b<\/li>\n\n\n\n<li><strong>\u6570\u636e\u4fdd\u7559\u7b56\u7565<\/strong>\uff1a\u65f6\u5e8f\u6570\u636e\u5177\u6709\u660e\u786e\u7684\u751f\u547d\u5468\u671f\uff08\u76d1\u63a7\u6570\u636e\u53ea\u9700\u8981\u4fdd\u7559\u51e0\u5929\uff09\u3002\u4e3a\u9632\u6b62\u5b58\u50a8\u7a7a\u95f4\u65e0\u9650\u81a8\u80c0\uff0c\u65f6\u5e8f\u6570\u636e\u5e93\u901a\u5e38\u652f\u6301\u81ea\u52a8\u5316\u7684\u6570\u636e\u4fdd\u7559\u7b56\u7565\u3002\u6bd4\u5982\u8bbe\u7f6e\u57fa\u4e8e\u65f6\u95f4\u7684\u4fdd\u7559\u89c4\u5219\uff0c\u8d85\u8fc7 7 \u5929\u5c31\u4f1a\u81ea\u52a8\u5220\u9664\u3002<\/li>\n<\/ul>\n\n\n\n<p>Prometheus \u670d\u52a1\u7aef\u5185\u7f6e\u4e86\u5f3a\u5927\u7684\u65f6\u5e8f\u6570\u636e\u5e93\uff08\u4e0e Prometheus \u540c\u540d\uff09\uff0c\u201c\u5f3a\u5927\u201d\u5e76\u975e\u7a7a\u6d1e\u7684\u63cf\u8ff0\uff0c\u5b83\u5728 DB-Engines \u6392\u884c\u699c\u4e2d\u5e38\u5e74\u7a33\u5c45\u524d\u4e09<sup><a href=\"https:\/\/www.thebyte.com.cn\/Observability\/metrics.html#footnote1\">[1]<\/a><\/sup>\u3002\u8be5\u6570\u636e\u5e93\u63d0\u4f9b\u4e86\u4e13\u4e3a\u65f6\u5e8f\u6570\u636e\u8bbe\u8ba1\u7684\u67e5\u8be2\u8bed\u8a00 PromQL\uff08Prometheus Query Language\uff09\uff0c\u53ef\u8f7b\u677e\u5b9e\u73b0\u6307\u6807\u7684\u67e5\u8be2\u3001\u805a\u5408\u3001\u8fc7\u6ee4\u548c\u8ba1\u7b97\u7b49\u64cd\u4f5c\u3002\u638c\u63e1 PromQL \u8bed\u6cd5\u662f\u6307\u6807\u53ef\u89c6\u5316\u548c\u544a\u8b66\u5904\u7406\u7684\u57fa\u7840\uff0c\u7b14\u8005\u5c31\u4e0d\u518d\u8be6\u7ec6\u4ecb\u7ecd\u5176\u8bed\u6cd5\u7ec6\u8282\u4e86\uff0c\u5177\u4f53\u53ef\u4ee5\u53c2\u8003 Prometheus \u6587\u6863\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u6307\u6807\u7684\u56fe\u5f62\u5316\u548c\u9884\u8b66<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u91c7\u96c6\u548c\u5b58\u50a8\u6307\u6807\u7684\u6700\u7ec8\u76ee\u7684\u662f\u5206\u6790\u6570\u636e\u7684\u8d8b\u52bf\u53d8\u5316\uff0c\u9884\u6d4b\u4e1a\u52a1\u9700\u6c42\uff08\u56fe\u5f62\u5316\uff09\uff0c\u4ee5\u53ca\u6301\u7eed\u76d1\u63a7\u6570\u636e\u6ce2\u52a8\u53d8\u5316\uff0c\u53ca\u65f6\u53d1\u73b0\u95ee\u9898\uff08\u9884\u8b66\uff09\u3002<\/p>\n\n\n\n<p>Prometheus \u63d0\u4f9b\u4e86\u57fa\u672c\u7684\u5c55\u793a\u529f\u80fd\uff0c\u4f46\u5176\u56fe\u5f62\u754c\u9762\u76f8\u5bf9\u7b80\u5355\uff0c\u8bb8\u591a\u7528\u6237\u4f1a\u5c06 Prometheus \u4e0e Grafana \u914d\u5408\u4f7f\u7528\uff08\u8fd9\u4e5f\u662f Prometheus \u5b98\u65b9\u63a8\u8350\u7684\u7ec4\u5408\u65b9\u6848\uff09\u3002\u56fe 9-5 \u5c55\u793a\u4e86\u4e00\u4e2a Grafana \u4eea\u8868\u677f\uff08Dashboard\uff09\u3002\u5c06\u6307\u6807\u6570\u636e\u53ef\u89c6\u5316\uff0c\u80fd\u591f\u66f4\u65b9\u4fbf\u5730\u4ece\u4e2d\u53d1\u73b0\u89c4\u5f8b\u3002\u4f8b\u5982\uff0c\u8d8b\u52bf\u5206\u6790\u53ef\u4ee5\u5e2e\u52a9\u5224\u65ad\u670d\u52a1 QPS \u7684\u589e\u957f\u8d8b\u52bf\uff0c\u4ece\u800c\u9884\u6d4b\u4f55\u65f6\u9700\u8981\u6269\u5bb9\uff1b\u5bf9\u7167\u5206\u6790\u5219\u80fd\u5bf9\u6bd4\u65b0\u65e7\u7248\u672c\u7684 CPU\u3001\u5185\u5b58\u7b49\u8d44\u6e90\u6d88\u8017\uff0c\u8bc4\u4f30\u6027\u80fd\u5dee\u5f02\uff1b\u5728\u6545\u969c\u5206\u6790\u65b9\u9762\uff0c\u670d\u52a1\u6027\u80fd\u7684\u6ce2\u52a8\u3001\u74f6\u9888\u6216\u6f5c\u5728\u95ee\u9898\u4e5f\u66f4\u52a0\u5bb9\u6613\u8bc6\u522b\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"595\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-412-1024x595.png\" alt=\"\" class=\"wp-image-18098\" style=\"width:580px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-412-1024x595.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-412-300x174.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-412-768x446.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-412-1536x893.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-412-2048x1191.png 2048w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-412-830x483.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-412-230x134.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-412-350x203.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-412-480x279.png 480w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u9664\u4e86\u56fe\u5f62\u5316\u5c55\u793a\u5916\uff0c\u6307\u6807\u7684\u53e6\u4e00\u4e2a\u4e3b\u8981\u7528\u9014\u662f\u9884\u8b66\u3002\u4f8b\u5982\uff0c\u5f53\u67d0\u4e2a\u670d\u52a1\u7684 QPS \u8d85\u8fc7\u8bbe\u5b9a\u7684\u9608\u503c\u65f6\uff0c\u7cfb\u7edf\u81ea\u52a8\u53d1\u9001\u4e00\u5c01\u90ae\u4ef6\u901a\u77e5\u5de5\u7a0b\u5e08\u53ca\u65f6\u5904\u7406\uff0c\u8fd9\u5c31\u662f\u4e00\u79cd\u9884\u8b66\u3002Prometheus \u63d0\u4f9b\u4e86\u4e13\u95e8\u7684 Alertmanager \u7ec4\u4ef6\uff0c\u7528\u6765\u7ba1\u7406\u548c\u901a\u77e5 Prometheus \u751f\u6210\u7684\u9884\u8b66\u4fe1\u606f\u3002<\/p>\n\n\n\n<p>\u5982\u4e0b\u9762\u7684\u4f8b\u5b50\u6240\u793a\uff0cPrometheus \u6839\u636e\u9884\u8bbe\u7684\u6761\u4ef6\u5b9a\u671f\u68c0\u67e5\u6570\u636e\uff0c\u4e00\u65e6\u6ee1\u8db3\u9884\u8b66\u6761\u4ef6\uff0cPrometheus \u89e6\u53d1\u9884\u8b66\u5e76\u5c06\u5176\u53d1\u9001\u5230 Alertmanager\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u5b9a\u671f\u4f7f\u7528 PromQL \u8bed\u6cd5\u68c0\u67e5\u8fc7\u53bb 5 \u5206\u949f\u5185\uff0c\u67d0\u4e2a\u88ab\u76d1\u63a7\u76ee\u6807\uff08instance\uff09\u4e2d\u6307\u5b9a\u670d\u52a1\uff08job\uff09\u7684 QPS \u662f\u5426\u8d85\u8fc7 1000\u3002\ngroups:\n  - name: example-alerts\n    rules:\n    - alert: HighQPS\n      expr: sum(rate(http_requests_total[5m])) by (instance, job) > 1000\n      for: 5m\n      labels:\n        severity: critical\n      annotations:\n        summary: \"High QPS detected on instance {{ $labels.instance }}\"\n        description: \"Instance {{ $labels.instance }} (job {{ $labels.job }}) has had a QPS greater than 1000 for more than 5 minutes.\"\n<\/pre>\n\n\n\n<p>Alertmanager \u63a5\u6536\u5230\u9884\u8b66\u540e\uff0c\u6839\u636e\u914d\u7f6e\u5bf9\u9884\u8b66\u8fdb\u884c\u5206\u7ec4\uff08\u5c06\u76f8\u4f3c\u6807\u7b7e\u7684\u9884\u8b66\u5408\u5e76\uff09\u3001\u6291\u5236\uff08\u9632\u6b62\u9884\u8b66\u98ce\u66b4\u53d1\u751f\uff09\u3001\u9759\u9ed8\uff08\u5728\u7ef4\u62a4\u671f\u95f4\uff0c\u5c4f\u853d\u9884\u8b66\uff09\u548c\u8def\u7531\uff08\u53d1\u9001\u5230\u77ed\u4fe1\u3001\u90ae\u4ef6\u3001\u5fae\u4fe1\uff09\u5904\u7406\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u65e5\u5fd7\u7684\u7d22\u5f15\u4e0e\u5b58\u50a8<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5904\u7406\u65e5\u5fd7\u672c\u6765\u662f\u4ef6\u7a00\u677e\u5e73\u5e38\u7684\u4e8b\u60c5\uff0c\u4f46\u968f\u7740\u6570\u636e\u89c4\u6a21\u7684\u589e\u957f\uff0c\u91cf\u53d8\u5f15\u53d1\u8d28\u53d8\uff0c\u9ad8\u541e\u5410\u5199\u5165\uff08GB\/s\uff09\u3001\u4f4e\u6210\u672c\u6d77\u91cf\u5b58\u50a8\uff08PB \u7ea7\u522b\uff09\u4ee5\u53ca\u4ebf\u7ea7\u6570\u636e\u7684\u5b9e\u65f6\u68c0\u7d22\uff081 \u79d2\u5185\uff09\uff0c\u5df2\u6210\u4e3a\u8f6f\u4ef6\u5de5\u7a0b\u9886\u57df\u6700\u5177\u6311\u6218\u6027\u7684\u96be\u9898\u4e4b\u4e00\u3002<\/p>\n\n\n\n<p>\u672c\u8282\u5c06\u4ece\u65e5\u5fd7\u7d22\u5f15\u548c\u5b58\u50a8\u7684\u89d2\u5ea6\u51fa\u53d1\uff0c\u4ecb\u7ecd\u4e09\u79cd\u4e1a\u5185\u5e94\u5bf9\u6d77\u91cf\u6570\u636e\u6311\u6218\u7684\u65b9\u6848\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u5168\u6587\u7d22\u5f15 Elastic Stack<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5728\u8ba8\u8bba\u5982\u4f55\u6784\u5efa\u5b8c\u6574\u7684\u65e5\u5fd7\u7cfb\u7edf\u65f6\uff0cELK\u3001ELKB \u6216 Elastic Stack \u662f\u5de5\u7a0b\u5e08\u4eec\u975e\u5e38\u719f\u6089\u7684\u672f\u8bed\u3002\u5b83\u4eec\u5b9e\u9645\u4e0a\u6307\u7684\u662f\u540c\u4e00\u5957\u7531 Elastic \u516c\u53f8<sup><a href=\"https:\/\/www.thebyte.com.cn\/Observability\/logging.html#footnote1\">[1]<\/a><a><\/a><\/sup>\u5f00\u53d1\u7684\u5f00\u6e90\u5de5\u5177\uff0c\u65e8\u5728\u5904\u7406\u6d77\u91cf\u6570\u636e\u7684\u6536\u96c6\u3001\u641c\u7d22\u3001\u5206\u6790\u548c\u53ef\u89c6\u5316\u3002<\/p>\n\n\n\n<p>\u56fe 9-6 \u5c55\u793a\u4e86\u4e00\u5957\u57fa\u4e8e Elastic Stack \u7684\u65e5\u5fd7\u5904\u7406\u65b9\u6848\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u6570\u636e\u6536\u96c6<\/strong>\uff1aBeats \u7ec4\u4ef6\u90e8\u7f72\u5728\u4e1a\u52a1\u6240\u5728\u8282\u70b9\uff0c\u8d1f\u8d23\u6536\u96c6\u539f\u59cb\u7684\u65e5\u5fd7\u6570\u636e\uff1b<\/li>\n\n\n\n<li><strong>\u6570\u636e\u7f13\u51b2<\/strong>\uff1a\u4f7f\u7528 RabbitMQ \u6d88\u606f\u961f\u5217\u7f13\u51b2\u6570\u636e\uff0c\u63d0\u9ad8\u6570\u636e\u541e\u5410\u91cf\uff1b<\/li>\n\n\n\n<li><strong>\u6570\u636e\u6e05\u6d17<\/strong>\uff1a\u6570\u636e\u901a\u8fc7 Logstash \u8fdb\u884c\u6e05\u6d17\u3002<\/li>\n\n\n\n<li><strong>\u6570\u636e\u5b58\u50a8<\/strong>\uff1a\u6e05\u6d17\u540e\u7684\u6570\u636e\u5b58\u50a8\u5728 Elasticsearch \u96c6\u7fa4\u4e2d\uff0c\u5b83\u8d1f\u8d23\u7d22\u5f15\u65e5\u5fd7\u6570\u636e\u3001\u67e5\u8be2\u805a\u5408\u7b49\u6838\u5fc3\u529f\u80fd\uff1b<\/li>\n\n\n\n<li><strong>\u6570\u636e\u53ef\u89c6\u5316<\/strong>\uff1aKibana \u8d1f\u8d23\u6570\u636e\u68c0\u7d22\u3001\u5206\u6790\u4e0e\u53ef\u89c6\u5316\uff0c\u5fc5\u8981\u65f6\u53ef\u90e8\u7f72 Nginx \u5b9e\u73b0\u8bbf\u95ee\u63a7\u5236\u3002<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"412\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-413-1024x412.png\" alt=\"\" class=\"wp-image-18099\" style=\"width:490px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-413-1024x412.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-413-300x121.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-413-768x309.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-413-1536x619.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-413-830x334.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-413-230x93.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-413-350x141.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-413-480x193.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-413.png 1942w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>Elastic Stack \u4e2d\u6700\u6838\u5fc3\u7684\u7ec4\u4ef6\u662f Elasticsearch \u2014\u2014 \u57fa\u4e8e Apache Lucene \u6784\u5efa\u7684\u5f00\u6e90\u7684\u641c\u7d22\u4e0e\u5206\u6790\u5f15\u64ce\u3002\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0cLucene \u7684\u4f5c\u8005\u5c31\u662f\u5927\u540d\u9f0e\u9f0e\u7684 Doug Cutting\uff0c\u5982\u679c\u4f60\u4e0d\u77e5\u9053\u4ed6\u662f\u8c01\u662f\uff1f\u90a3\u4f60\u4e00\u5b9a\u542c\u8fc7\u4ed6\u513f\u5b50\u73a9\u5177\u7684\u540d\u5b57 \u2014\u2014 Hadoop\u3002<\/p>\n\n\n\n<p>Elasticsearch \u80fd\u591f\u5728\u6d77\u91cf\u6570\u636e\u4e2d\u8fc5\u901f\u68c0\u7d22\u5173\u952e\u8bcd\uff0c\u5176\u5173\u952e\u6280\u672f\u4e4b\u4e00\u5c31\u662f Lucene \u63d0\u4f9b\u7684\u201c\u53cd\u5411\u7d22\u5f15\u201d\uff08Inverted Index\uff09\u3002\u4e0e\u53cd\u5411\u7d22\u5f15\u76f8\u5bf9\u7684\u662f\u6b63\u5411\u7d22\u5f15\uff0c\u4e8c\u8005\u7684\u533a\u522b\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u6b63\u5411\u7d22\u5f15<\/strong>\uff08Forward Index\uff09\uff1a\u4f20\u7edf\u7684\u7d22\u5f15\u65b9\u6cd5\uff0c\u5c06\u6587\u6863\u96c6\u5408\u4e2d\u7684\u6bcf\u4e2a\u5355\u8bcd\u4f5c\u4e3a\u952e\uff0c\u503c\u4e3a\u5305\u542b\u8be5\u5355\u8bcd\u7684\u6587\u6863\u5217\u8868\u3002\u6b63\u5411\u7d22\u5f15\u9002\u7528\u4e8e\u5feb\u901f\u68c0\u7d22\u7279\u5b9a\u6807\u8bc6\u7b26\u7684\u6587\u6863\uff0c\u5e38\u89c1\u4e8e\u6570\u636e\u5e93\u4e2d\u7684\u4e3b\u952e\u7d22\u5f15\u3002<\/li>\n\n\n\n<li><strong>\u53cd\u5411\u7d22\u5f15<\/strong>\uff08Inverted Index\uff09\uff1a\u53cd\u5411\u7d22\u5f15\u901a\u8fc7\u5c06\u6587\u672c\u5206\u5272\u6210\u8bcd\u6761\u5e76\u6784\u5efa\u201c&lt;\u8bcd\u6761->\u6587\u6863\u7f16\u53f7>\u201d\u7684\u6620\u5c04\uff0c\u5feb\u901f\u5b9a\u4f4d\u67d0\u4e2a\u8bcd\u51fa\u73b0\u5728\u4ec0\u4e48\u6587\u6863\u4e2d\u3002\u503c\u5f97\u6ce8\u610f\u7684\u662f\uff0c\u53cd\u5411\u7d22\u5f15\u5e38\u88ab\u8bd1\u4e3a\u201c\u5012\u6392\u7d22\u5f15\u201d\uff0c\u4f46\u201c\u5012\u6392\u201d\u5bb9\u6613\u8ba9\u4eba\u8bef\u4ee5\u4e3a\u4e0e\u6392\u5e8f\u6709\u5173\uff0c\u5b9e\u9645\u4e0a\u5b83\u4e0e\u6392\u5e8f\u65e0\u5173\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u4e3e\u4e00\u4e2a\u5177\u4f53\u7684\u4f8b\u5b50\uff0c\u4ee5\u4e0b\u662f\u4e09\u4e2a\u5f85\u7d22\u5f15\u7684\u82f1\u6587\u53e5\u5b50\uff1a<\/p>\n\n\n\n<ul>\n<li>T<sub>0<\/sub> = &#8220;it is what it is&#8221;<\/li>\n\n\n\n<li>T<sub>1<\/sub> = &#8220;what is it&#8221;<\/li>\n\n\n\n<li>T<sub>2<\/sub> = &#8220;it is a banana&#8221;<\/li>\n<\/ul>\n\n\n\n<p>\u901a\u8fc7\u53cd\u5411\u7d22\u5f15\uff0c\u5f97\u5230\u4e0b\u9762\u7684\u5339\u914d\u5173\u7cfb\uff1a<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\"a\":      {2}\n\"banana\": {2}\n\"is\":     {0, 1, 2}\n\"it\":     {0, 1, 2}\n\"what\":   {0, 1}<\/pre>\n\n\n\n<p>\u5728\u68c0\u7d22\u65f6\uff0c\u6761\u4ef6\u201cwhat\u201d\u3001\u201cis\u201d \u548c \u201cit\u201d \u5c06\u5bf9\u5e94\u96c6\u5408\uff1a{0,1}\u2229{0,1,2}\u2229{0,1,2}={0,1}{0,1}\u2229{0,1,2}\u2229{0,1,2}={0,1}\u3002\u53ef\u4ee5\u770b\u51fa\uff0c<strong>\u53cd\u5411\u7d22\u5f15\u80fd\u591f\u5feb\u901f\u5b9a\u4f4d\u5305\u542b\u7279\u5b9a\u5173\u952e\u8bcd\u7684\u6587\u6863\uff0c\u800c\u65e0\u9700\u9010\u4e2a\u626b\u63cf\u6240\u6709\u6587\u6863<\/strong>\u3002<\/p>\n\n\n\n<p>Elasticsearch \u7684\u53e6\u4e00\u9879\u5173\u952e\u6280\u672f\u662f\u201c\u5206\u7247\u201d\uff08sharding\uff09\u3002\u6bcf\u4e2a\u5206\u7247\u76f8\u5f53\u4e8e\u4e00\u4e2a\u72ec\u7acb\u7684 Lucene \u5b9e\u4f8b\uff0c\u7c7b\u4f3c\u4e8e\u4e00\u4e2a\u5b8c\u6574\u7684\u6570\u636e\u5e93\u3002\u5728\u6587\u6863\uff08Elasticsearch \u6570\u636e\u7684\u57fa\u672c\u5355\u4f4d\uff09\u5199\u5165\u65f6\uff0cElasticsearch \u4f1a\u6839\u636e\u54c8\u5e0c\u51fd\u6570\uff08\u901a\u5e38\u57fa\u4e8e\u6587\u6863 ID\uff09\u8ba1\u7b97\u51fa\u6587\u6863\u6240\u5c5e\u7684\u5206\u7247\uff0c\u4ece\u800c\u5c06\u6587\u6863\u5747\u5300\u5206\u914d\u5230\u4e0d\u540c\u7684\u5206\u7247\uff1b\u67e5\u8be2\u65f6\uff0c\u591a\u4e2a\u5206\u7247\u5e76\u884c\u8ba1\u7b97\uff0cElasticsearch \u5c06\u7ed3\u679c\u805a\u5408\u540e\u518d\u8fd4\u56de\u7ed9\u5ba2\u6237\u7aef\u3002<\/p>\n\n\n\n<p>\u4e3a\u4e86\u8ffd\u6c42\u6781\u81f4\u7684\u67e5\u8be2\u6027\u80fd\uff0cElasticsearch \u4e5f\u4ed8\u51fa\u4e86\u4ee5\u4e0b\u4ee3\u4ef7\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u5199\u5165\u541e\u5410\u91cf\u4e0b\u964d<\/strong>\uff1a\u6587\u6863\u5199\u5165\u9700\u8981\u8fdb\u884c\u5206\u8bcd\u3001\u6784\u5efa\u6392\u5e8f\u8868\u7b49\u64cd\u4f5c\uff0c\u8fd9\u4e9b\u90fd\u662f CPU \u548c\u5185\u5b58\u5bc6\u96c6\u578b\u7684\uff0c\u4f1a\u5bfc\u81f4\u5199\u5165\u6027\u80fd\u4e0b\u964d\uff1b<\/li>\n\n\n\n<li><strong>\u5b58\u50a8\u7a7a\u95f4\u5360\u7528\u9ad8<\/strong>\uff1aElasticsearch \u4e0d\u4ec5\u5b58\u50a8\u539f\u59cb\u6570\u636e\u548c\u53cd\u5411\u7d22\u5f15\uff0c\u4e3a\u4e86\u52a0\u901f\u5206\u6790\u80fd\u529b\uff0c\u53ef\u80fd\u8fd8\u989d\u5916\u5b58\u50a8\u4e00\u4efd\u5217\u5f0f\u6570\u636e\uff08Column-oriented Data\uff09\uff1b\u5176\u6b21\uff0c\u4e3a\u4e86\u907f\u514d\u5355\u70b9\u6545\u969c\uff0cElasticsearch \u4f1a\u4e3a\u6bcf\u4e2a\u5206\u7247\u521b\u5efa\u4e00\u4e2a\u6216\u591a\u4e2a\u526f\u672c\u526f\u672c\uff08Replica\uff09\uff0c\u8fd9\u5bfc\u81f4 Elasticsearch \u4f1a\u5360\u7528\u6781\u5927\u7684\u5b58\u50a8\u7a7a\u95f4\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u8f7b\u91cf\u5316 Loki<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Grafana Loki \u662f\u7531 Grafana Labs \u5f00\u53d1\u7684\u4e00\u6b3e\u65e5\u5fd7\u805a\u5408\u7cfb\u7edf\uff0c\u5176\u8bbe\u8ba1\u7075\u611f\u6765\u6e90\u4e8e Prometheus\uff0c\u76ee\u6807\u662f\u6210\u4e3a\u201c\u65e5\u5fd7\u9886\u57df\u7684 Prometheus\u201d\u3002\u4e0e Elastic Stack \u76f8\u6bd4\uff0cLoki \u5177\u6709\u8f7b\u91cf\u3001\u4f4e\u6210\u672c\u548c\u4e0e Kubernetes \u9ad8\u5ea6\u96c6\u6210\u7b49\u7279\u70b9\u3002<\/p>\n\n\n\n<p>Loki \u7684\u67b6\u6784\u5982\u56fe 9-7 \u6240\u793a\uff0c\u5176\u7ec4\u4ef6\u4ee5\u53ca\u4f5c\u7528\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u65e5\u5fd7\u4ee3\u7406<\/strong>\uff08Promtail\uff09\uff1a\u8d1f\u8d23\u4ece\u591a\u79cd\u6765\u6e90\uff08\u5982\u6587\u4ef6\u7cfb\u7edf\u3001\u4e91\u65e5\u5fd7\u670d\u52a1\uff09\u6536\u96c6\u65e5\u5fd7\uff0c\u5e76\u5c06\u5176\u683c\u5f0f\u5316\u540e\u53d1\u9001\u81f3 Loki \u7cfb\u7edf\uff1b<\/li>\n\n\n\n<li><strong>\u5206\u53d1\u5668<\/strong>\uff08Distributor\uff09\uff1a\u63a5\u6536 Promtail \u6216\u5176\u4ed6\u6765\u6e90\u53d1\u9001\u7684\u65e5\u5fd7\uff0c\u9a8c\u8bc1\u65e5\u5fd7\u7684\u5b8c\u6574\u6027\uff0c\u5e76\u6839\u636e\u5206\u7247\u89c4\u5219\u5c06\u65e5\u5fd7\u5206\u53d1\u5230\u5408\u9002\u7684 Ingester \u8282\u70b9\uff1b<\/li>\n\n\n\n<li><strong>\u5199\u5165\u5668<\/strong>\uff08Ingester\uff09\uff1a\u8d1f\u8d23\u65e5\u5fd7\u7684\u4e34\u65f6\u5b58\u50a8\u548c\u7d22\u5f15\uff0c\u5c06\u65e5\u5fd7\u6570\u636e\u5206\u6bb5\u5b58\u50a8\uff0c\u5e76\u5b9a\u671f\u5c06\u6570\u636e\u6301\u4e45\u5316\u5230\u957f\u4e45\u5b58\u50a8\uff08\u5982\u5bf9\u8c61\u5b58\u50a8\uff09\uff1b<\/li>\n\n\n\n<li><strong>\u67e5\u8be2\u5668<\/strong>\uff08Querier\uff09\uff1a\u6267\u884c\u7528\u6237\u7684\u65e5\u5fd7\u67e5\u8be2\u8bf7\u6c42\uff0c\u4ece\u5b58\u50a8\u4e2d\u63d0\u53d6\u6240\u9700\u6570\u636e\u5e76\u8fd4\u56de\u7ed3\u679c\uff1b<\/li>\n\n\n\n<li><strong>\u67e5\u8be2\u524d\u7aef<\/strong>\uff08Query Frontend\uff09\uff1a\u7528\u4e8e\u4f18\u5316\u67e5\u8be2\u6027\u80fd\uff0c\u8d1f\u8d23\u5206\u89e3\u590d\u6742\u67e5\u8be2\u3001\u7ba1\u7406\u7f13\u5b58\u4ee5\u53ca\u5408\u5e76\u67e5\u8be2\u7ed3\u679c\uff0c\u63d0\u9ad8\u67e5\u8be2\u6548\u7387\u548c\u7528\u6237\u4f53\u9a8c\uff1b<\/li>\n\n\n\n<li><strong>\u89c4\u5219\u5904\u7406\u5668<\/strong>\uff08Ruler\uff09\uff1a\u5904\u7406\u76d1\u63a7\u548c\u544a\u8b66\u89c4\u5219\uff0c\u5bf9\u65e5\u5fd7\u6570\u636e\u6267\u884c\u5468\u671f\u6027\u8bc4\u4f30\uff0c\u5e76\u6839\u636e\u9884\u5b9a\u4e49\u89c4\u5219\u89e6\u53d1\u544a\u8b66\u6216\u751f\u6210\u62a5\u544a\u3002<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"790\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-415-1024x790.png\" alt=\"\" class=\"wp-image-18101\" style=\"width:524px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-415-1024x790.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-415-300x231.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-415-768x592.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-415-1536x1185.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-415-2048x1580.png 2048w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-415-830x640.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-415-230x177.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-415-350x270.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-415-480x370.png 480w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>Loki \u7684\u4e3b\u8981\u7279\u70b9\u662f\uff0c\u53ea\u5bf9\u65e5\u5fd7\u7684\u5143\u6570\u636e\uff08\u5982\u6807\u7b7e\u3001\u65f6\u95f4\u6233\uff09\u5efa\u7acb\u7d22\u5f15\uff0c\u800c\u4e0d\u5bf9\u539f\u59cb\u65e5\u5fd7\u6570\u636e\u8fdb\u884c\u7d22\u5f15\u3002\u5728 Loki \u7684\u5b58\u50a8\u6a21\u578b\u4e2d\uff0c\u6570\u636e\u6709\u4ee5\u4e0b\u4e24\u79cd\u7c7b\u578b\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u7d22\u5f15<\/strong>\uff08Indexes\uff09\uff1aLoki \u7684\u7d22\u5f15\u4ec5\u5305\u542b\u65e5\u5fd7\u6807\u7b7e\uff08\u5982\u65e5\u5fd7\u7684\u6765\u6e90\u3001\u5e94\u7528\u540d\u3001\u4e3b\u673a\u540d\u7b49\uff09\u548c\u65f6\u95f4\u6233\u3002\u7d22\u5f15\u4e0e\u76f8\u5e94\u7684\u5757\u5173\u8054\uff1b<\/li>\n\n\n\n<li><strong>\u5757<\/strong>\uff08Chunks\uff09\uff1a\u7528\u6765\u5b58\u50a8\u539f\u59cb\u65e5\u5fd7\u6570\u636e\u7684\u57fa\u672c\u5355\u5143\u3002\u539f\u59cb\u65e5\u5fd7\u6570\u636e\u4f1a\u88ab\u538b\u7f29\u6210\u201c\u5757\u201d\uff0c\u5b58\u50a8\u5728\u6301\u4e45\u5316\u5b58\u50a8\u4ecb\u8d28\u4e2d\uff0c\u5982\u5bf9\u8c61\u5b58\u50a8\uff08\u4f8b\u5982 Amazon S3\u3001GCP\u3001MinIO\uff09\u6216\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u4e0d\u96be\u770b\u51fa\uff0cLoki \u901a\u8fc7\u4ec5\u7d22\u5f15\u5143\u6570\u636e\u3001\u4ee5\u53ca\u7d22\u5f15\u548c\u5757\u7684\u5206\u79bb\u5b58\u50a8\u8bbe\u8ba1\uff0c\u8ba9\u5176\u5728\u5904\u7406\u5927\u89c4\u6a21\u65e5\u5fd7\u6570\u636e\u65f6\u5177\u6709\u660e\u663e\u7684\u6210\u672c\u4f18\u52bf\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u5217\u5f0f\u5b58\u50a8 ClickHouse<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>ClickHouse \u662f\u7531\u4fc4\u7f57\u65af Yandex \u516c\u53f8<sup><a href=\"https:\/\/www.thebyte.com.cn\/Observability\/logging.html#footnote2\">[2]<\/a><a><\/a><\/sup>\u4e8e 2008 \u5e74\u5f00\u53d1\u7684\u5f00\u6e90\u5217\u5f0f\u6570\u636e\u5e93\u7ba1\u7406\u7cfb\u7edf\u3002\u5b83\u652f\u6301\u9ad8\u5e76\u53d1\u67e5\u8be2\uff0c\u80fd\u591f\u9ad8\u6548\u5904\u7406\u6570\u767e\u4ebf\u5230\u6570\u4e07\u4ebf\u6761\u8bb0\u5f55\u7684\u6570\u636e\uff0c\u4e14\u5177\u5907\u6781\u5feb\u7684\u67e5\u8be2\u901f\u5ea6\uff0c\u5e7f\u6cdb\u5e94\u7528\u4e8e\u5b9e\u65f6\u6570\u636e\u5206\u6790\u3001\u65e5\u5fd7\u5904\u7406\u3001\u6307\u6807\u76d1\u63a7\u7b49\u9886\u57df\u3002<\/p>\n\n\n\n<p>\u5728\u5927\u89c4\u6a21\u6570\u636e\u5904\u7406\u8fc7\u7a0b\u4e2d\uff0c\u63d0\u5347\u67e5\u8be2\u901f\u5ea6\u7684\u6700\u6709\u6548\u65b9\u6cd5\u662f\u51cf\u5c11\u6570\u636e\u626b\u63cf\u8303\u56f4\uff0c\u8fd9\u5176\u4e2d\u7684\u5173\u952e\u5728\u4e8e\u6570\u636e\u7684\u7ec4\u7ec7\u548c\u5b58\u50a8\u65b9\u5f0f\u3002<\/p>\n\n\n\n<p>\u6211\u4eec\u5148\u6765\u770b\u4f20\u7edf\u7684\u884c\u5f0f\u6570\u636e\u5e93\u662f\u5982\u4f55\u5b58\u50a8\u6570\u636e\u7684\uff0c\u4ee5 MySQL \u6216 PostgreSQL \u6570\u636e\u5e93\u4e3a\u4f8b\uff0c\u5b83\u4eec\u7684\u6570\u636e\u7ec4\u7ec7\u5982\u8868 9-2 \u6240\u793a\uff0c\u662f\u6309\u884c\u5b58\u50a8\u7684\u3002<\/p>\n\n\n\n<p>\u8868 \u884c\u5f0f\u6570\u636e\u5e93\u5b58\u50a8\u7ed3\u6784<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>ow<\/th><th>ProductId<\/th><th>sales<\/th><th>Title<\/th><th>GoodEvent<\/th><th>CreateTime<\/th><\/tr><\/thead><tbody><tr><td>#0<\/td><td>89354350662<\/td><td>120<\/td><td>Investor Relations<\/td><td>1<\/td><td>2016-05-18 05:19:20<\/td><\/tr><tr><td>#1<\/td><td>90329509958<\/td><td>10<\/td><td>Contact us<\/td><td>1<\/td><td>2016-05-18 08:10:20<\/td><\/tr><tr><td>#2<\/td><td>89953706054<\/td><td>78<\/td><td>Mission<\/td><td>1<\/td><td>2016-05-18 07:38:00<\/td><\/tr><tr><td>#N<\/td><td>&#8230;<\/td><td>&#8230;<\/td><td>&#8230;<\/td><td>&#8230;<\/td><td>&#8230;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p>\u5728\u884c\u5f0f\u6570\u636e\u5e93\u4e2d\uff0c\u4e00\u884c\u6570\u636e\u4f1a\u5728\u7269\u7406\u5b58\u50a8\u4ecb\u8d28\u4e2d\u7d27\u5bc6\u76f8\u90bb\u3002<\/p>\n\n\n\n<p>\u5982\u679c\u8981\u6267\u884c\u4e0b\u9762\u7684 SQL \u6765\u7edf\u8ba1\u67d0\u4e2a\u4ea7\u54c1\u7684\u9500\u552e\u989d\uff0c\u884c\u5f0f\u6570\u636e\u5e93\u9700\u8981\u52a0\u8f7d\u6574\u4e2a\u8868\u7684\u6240\u6709\u884c\u5230\u5185\u5b58\uff0c\u8fdb\u884c\u626b\u63cf\u548c\u8fc7\u6ee4\uff08\u68c0\u67e5\u662f\u5426\u7b26\u5408 WHERE \u6761\u4ef6\uff09\u3002\u8fc7\u6ee4\u51fa\u76ee\u6807\u884c\u540e\uff0c\u82e5\u6709\u805a\u5408\u51fd\u6570\uff08\u5982 SUM\u3001MAX\u3001MIN\uff09\uff0c\u8fd8\u9700\u8981\u8fdb\u884c\u76f8\u5e94\u7684\u8ba1\u7b97\u548c\u6392\u5e8f\uff0c\u6700\u540e\u624d\u4f1a\u8fc7\u6ee4\u6389\u4e0d\u5fc5\u8981\u7684\u5217\uff0c\u6574\u4e2a\u8fc7\u7a0b\u53ef\u80fd\u975e\u5e38\u8017\u65f6\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">\/\/ \u7edf\u8ba1\u9500\u552e\u989d\nSELECT sum(sales) AS count FROM \u8868 WHERE  ProductId=90329509958<\/pre>\n\n\n\n<p>\u63a5\u4e0b\u6765\uff0c\u6211\u4eec\u6765\u770b\u5217\u5f0f\u6570\u636e\u5e93\uff0cClickHouse \u7684\u6570\u636e\u7ec4\u7ec7\u5982\u8868 9-3 \u6240\u793a\uff0c\u6570\u636e\u6309\u5217\u800c\u975e\u6309\u884c\u5b58\u50a8\uff0c\u4e00\u5217\u6570\u636e\u5728\u7269\u7406\u5b58\u50a8\u4ecb\u8d28\u4e2d\u7d27\u5bc6\u76f8\u90bb\u3002\u6211\u4eec\u7ee7\u7eed\u4ee5\u4e0a\u9762\u7684\u7edf\u8ba1\u9500\u552e\u989d\u7684 SQL \u4e3a\u4f8b\uff0c\u5217\u5f0f\u6570\u636e\u5e93\u53ea\u8bfb\u53d6\u4e0e\u67e5\u8be2\u76f8\u5173\u7684\u5217\uff08\u5982 sales \u5217\uff09\uff0c\u4e0d\u4f1a\u8bfb\u53d6\u4e0d\u76f8\u5173\u5217\uff0c\u4ece\u800c\u51cf\u5c11\u4e0d\u5fc5\u8981\u7684\u78c1\u76d8 I\/O \u64cd\u4f5c\u3002<\/p>\n\n\n\n<p>\u8868 \u5217\u5f0f\u6570\u636e\u5e93\u5b58\u50a8\u7ed3\u6784<\/p>\n\n\n\n<figure class=\"wp-block-table is-style-stripes\"><table><thead><tr><th>Row:<\/th><th>#0<\/th><th>#1<\/th><th>#2<\/th><th>#N<\/th><\/tr><\/thead><tbody><tr><td>ProductId:<\/td><td>89354350662<\/td><td>90329509958<\/td><td>89953706054<\/td><td>&#8230;<\/td><\/tr><tr><td>sales:<\/td><td>120<\/td><td>22<\/td><td>12<\/td><td>&#8230;<\/td><\/tr><tr><td>Title:<\/td><td>Investor Relations<\/td><td>Contact us<\/td><td>Mission<\/td><td>&#8230;<\/td><\/tr><tr><td>GoodEvent:<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>&#8230;<\/td><\/tr><tr><td>CreateTime:<\/td><td>2016-05-18 05:19:20<\/td><td>2016-05-18 08:10:20<\/td><td>2016-05-18 07:38:00<\/td><td>&#8230;<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p>\u6b64\u5916\uff0c\u5217\u5f0f\u5b58\u50a8\u901a\u5e38\u4e0e\u6570\u636e\u538b\u7f29\u4f34\u751f\u3002\u6570\u636e\u538b\u7f29\u7684\u672c\u8d28\u662f\u901a\u8fc7\u4e00\u5b9a\u6b65\u957f\u5bf9\u6570\u636e\u8fdb\u884c\u5339\u914d\u626b\u63cf\uff0c\u53d1\u73b0\u91cd\u590d\u90e8\u5206\u540e\u8fdb\u884c\u7f16\u7801\u8f6c\u6362\u3002\u9762\u5411\u5217\u5f0f\u7684\u5b58\u50a8\uff0c\u540c\u4e00\u5217\u7684\u6570\u636e\u7c7b\u578b\u548c\u8bed\u4e49\u76f8\u540c\uff0c\u91cd\u590d\u9879\u7684\u53ef\u80fd\u6027\u66f4\u9ad8\uff0c\u56e0\u6b64\u81ea\u7136\u6709\u7740\u66f4\u9ad8\u7684\u538b\u7f29\u7387\u3002<\/p>\n\n\n\n<p>ClickHouse \u66f4\u8fdb\u4e00\u6b65\u7684\u5141\u8bb8\u7528\u6237\u6839\u636e\u6bcf\u5217\u6570\u636e\u7684\u7279\u6027\u9009\u62e9\u6700\u9002\u5408\u7684\u538b\u7f29\u7b97\u6cd5\u3002\u5982\u4e0b SQL \u793a\u4f8b\uff0c\u521b\u5efa MergeTree \u7c7b\u578b example \u8868\uff0c\u5176\u4e2d\uff1a<\/p>\n\n\n\n<ul>\n<li>id \u5217\u4f7f\u7528\u7684 LZ4 \u7b97\u6cd5\uff0c\u4e3b\u8981\u7528\u4e8e\u9700\u8981\u5feb\u901f\u538b\u7f29\u548c\u89e3\u538b\u7f29\u7684\u573a\u666f\uff1b<\/li>\n\n\n\n<li>name \u5217\u4f7f\u7528\u7684 ZSTD \u7b97\u6cd5\uff0c\u4e3b\u8981\u7528\u4e8e\u65e5\u5fd7\u3001\u6587\u672c\u3001\u4e8c\u8fdb\u5236\u6570\u636e\u6570\u636e\uff0c\u8be5\u7b97\u6cd5\u5728\u538b\u7f29\u6548\u7387\u3001\u901f\u5ea6\u548c\u538b\u7f29\u6bd4\u4e4b\u95f4\u6709\u826f\u597d\u7684\u5e73\u8861\uff1b<\/li>\n\n\n\n<li>createTime \u5217\u4f7f\u7528\u7684 Double-Delta \u7b97\u6cd5\uff0c\u4e3b\u8981\u7528\u4e8e\u538b\u7f29\u5177\u6709\u9012\u589e\u6216\u76f8\u90bb\u503c\u5dee\u5f02\u8f83\u5c0f\u7684\u6570\u636e\uff0c\u7279\u522b\u9002\u7528\u4e8e\u65f6\u95f4\u6233\u6216\u8ba1\u6570\u7c7b\u6570\u636e\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">CREATE TABLE example (\n    id UInt64 CODEC(ZSTD), -- \u4e3a\u6574\u6570\u5217\u8bbe\u7f6e LZ4 \u538b\u7f29\n    name String CODEC(LZ4), -- \u4e3a\u5b57\u7b26\u4e32\u5217\u8bbe\u7f6e ZSTD \u538b\u7f29\n    age UInt8 CODEC(NONE),  -- \u4e0d\u538b\u7f29\n    score Float32 CODEC(Gorilla) -- \u4e3a\u6d6e\u70b9\u6570\u8bbe\u7f6e Gorilla \u538b\u7f29\n    createTime DateTime CODEC(Delta, ZSTD), --  \u4e3a\u65f6\u95f4\u6233\u8bbe\u7f6e Delta \u7f16\u7801\u52a0 ZSTD \u538b\u7f29\n) ENGINE = MergeTree()\nORDER BY id;<\/pre>\n\n\n\n<p>\u4f5c\u4e3a\u4e00\u6b3e\u5206\u5e03\u5f0f\u6570\u636e\u7cfb\u7edf\uff0cClickHouse \u81ea\u7136\u652f\u6301\u201c\u5206\u7247\u201d\uff08Sharding\uff09\u6280\u672f\u3002<\/p>\n\n\n\n<p>ClickHouse \u5c06\u6570\u636e\u5207\u5206\u6210\u591a\u4e2a\u90e8\u5206\uff0c\u5e76\u5206\u5e03\u5230\u4e0d\u540c\u7684\u7269\u7406\u8282\u70b9\u3002\u4e5f\u5c31\u662f\u8bf4\uff0c\u53ea\u8981\u6709\u8db3\u591f\u591a\u7684\u786c\u4ef6\u8d44\u6e90\uff0cClickHouse \u5c31\u80fd\u5904\u7406\u6570\u4e07\u4ebf\u6761\u8bb0\u5f55\u3001PB \u7ea7\u522b\u89c4\u6a21\u7684\u6570\u636e\u91cf\u3002\u6839\u636e Yandex \u516c\u5e03\u7684\u6d4b\u8bd5\u7ed3\u679c\u6765\u770b\uff08\u56fe 9-9\uff09\uff0cClickHouse \u6027\u80fd\u8868\u73b0\u9065\u9065\u9886\u5148\u5bf9\u624b\uff0c\u6bd4 Vertica\uff08\u4e00\u6b3e\u5546\u4e1a OLAP \u8f6f\u4ef6\uff09\u5feb\u7ea6 5 \u500d\u3001\u6bd4 Hive \u5feb 279 \u500d\u3001\u6bd4 InfiniDB \u5feb 31 \u500d\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"535\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-417-1024x535.png\" alt=\"\" class=\"wp-image-18103\" style=\"width:510px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-417-1024x535.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-417-300x157.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-417-768x402.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-417-1536x803.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-417-2048x1071.png 2048w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-417-830x434.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-417-230x120.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-417-350x183.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-417-480x251.png 480w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u6b63\u5982 ClickHouse \u7684\u5ba3\u4f20\u6240\u8a00\uff0c\u5176\u4ed6\u7684\u5f00\u6e90\u7cfb\u7edf\u592a\u6162\uff0c\u5546\u7528\u7684\u53c8\u592a\u8d35\u3002\u53ea\u6709 ClickHouse \u5728\u5b58\u50a8\u6210\u672c\u4e0e\u67e5\u8be2\u6027\u80fd\u4e4b\u95f4\u505a\u5230\u4e86\u826f\u597d\u5e73\u8861\uff0c\u4e0d\u4ec5\u5feb\u4e14\u8fd8\u5f00\u6e90\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u5206\u5e03\u5f0f\u94fe\u8def\u8ffd\u8e2a<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Uber \u662f\u5b9e\u65bd\u5fae\u670d\u52a1\u67b6\u6784\u7684\u5148\u9a71\uff0c\u4ed6\u4eec\u66fe\u7ecf\u64b0\u5199\u535a\u5ba2\u4ecb\u7ecd\u8fc7\u5b83\u4eec\u7684\u6253\u8f66\u7cfb\u7edf\uff0c\u8be5\u7cfb\u7edf\u7ea6\u7531 2,200 \u4e2a\u76f8\u4e92\u4f9d\u8d56\u7684\u5fae\u670d\u52a1\u7ec4\u6210\u3002\u5f15\u7528\u8d44\u6599\u4e2d\u7684\u914d\u56fe\uff0c\u76f4\u89c2\u611f\u53d7\u94fa\u9762\u800c\u6765\u7684\u590d\u6742\u6027\u3002<\/p>\n\n\n\n<p>\u56fe  Uber \u4f7f\u7528 Jaeger \u751f\u6210\u7684\u8ffd\u8e2a\u94fe\u8def\u62d3\u6251 <a href=\"https:\/\/www.uber.com\/en-IN\/blog\/microservice-architecture\/\" target=\"_blank\" rel=\"noreferrer noopener\">\u56fe\u7247\u6765\u6e90<\/a><\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1016\" height=\"864\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/uber-microservice-C-PH9w_6-1.png\" alt=\"\" class=\"wp-image-18105\" style=\"width:472px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/uber-microservice-C-PH9w_6-1.png 1016w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/uber-microservice-C-PH9w_6-1-300x255.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/uber-microservice-C-PH9w_6-1-768x653.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/uber-microservice-C-PH9w_6-1-830x706.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/uber-microservice-C-PH9w_6-1-230x196.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/uber-microservice-C-PH9w_6-1-350x298.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/uber-microservice-C-PH9w_6-1-480x408.png 480w\" sizes=\"(max-width: 1016px) 100vw, 1016px\" \/><\/figure><\/div>\n\n\n<p>\u4e0a\u8ff0\u5fae\u670d\u52a1\u7531\u4e0d\u540c\u56e2\u961f\u4f7f\u7528\u4e0d\u540c\u7f16\u7a0b\u8bed\u8a00\u5f00\u53d1\uff0c\u90e8\u7f72\u5728\u6570\u5343\u53f0\u670d\u52a1\u5668\u4e0a\uff0c\u6a2a\u8de8\u591a\u4e2a\u6570\u636e\u4e2d\u5fc3\u3002\u8fd9\u79cd\u89c4\u6a21\u4f7f\u7cfb\u7edf\u884c\u4e3a\u53d8\u5f97\u96be\u4ee5\u5168\u9762\u638c\u63a7\uff0c\u4e14\u6545\u969c\u6392\u67e5\u8def\u5f84\u5f02\u5e38\u590d\u6742\u3002\u56e0\u6b64\uff0c\u7406\u89e3\u590d\u6742\u7cfb\u7edf\u7684\u884c\u4e3a\u72b6\u6001\uff0c\u5e76\u6790\u6027\u80fd\u95ee\u9898\u7684\u9700\u6c42\u663e\u5f97\u5c24\u4e3a\u8feb\u5207\u3002<\/p>\n\n\n\n<p>2010 \u5e74 4 \u6708\uff0cGoogle \u5de5\u7a0b\u5e08\u53d1\u8868\u4e86\u8bba\u6587\u300aDapper, a Large-Scale Distributed Systems Tracing Infrastructure\u300b[1]\uff0c\u8bba\u6587\u603b\u7ed3\u4e86\u4ed6\u4eec\u6cbb\u7406\u5206\u5e03\u5f0f\u7cfb\u7edf\u7684\u7ecf\u9a8c\uff0c\u5e76\u8be6\u7ec6\u4ecb\u7ecd\u4e86 Google \u5185\u90e8\u5206\u5e03\u5f0f\u94fe\u8def\u8ffd\u8e2a\u7cfb\u7edf Dapper \u7684\u67b6\u6784\u8bbe\u8ba1\u548c\u5b9e\u73b0\u65b9\u6cd5\u3002<\/p>\n\n\n\n<p>Dapper \u8bba\u6587\u7684\u53d1\u5e03\uff0c\u8ba9\u6cbb\u7406\u590d\u6742\u5206\u5e03\u5f0f\u7cfb\u7edf\u8fce\u6765\u4e86\u8f6c\u673a\uff0c\u94fe\u8def\u8ffd\u8e2a\u6280\u672f\u5f00\u59cb\u5728\u4e1a\u5185\u5907\u53d7\u63a8\u5d07\uff01<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u94fe\u8def\u8ffd\u8e2a\u7684\u57fa\u672c\u539f\u7406<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u5982\u4eca\u7684\u94fe\u8def\u8ffd\u8e2a\u7cfb\u7edf\u5927\u591a\u4ee5 Dapper \u4e3a\u539f\u578b\u8bbe\u8ba1\uff0c\u56e0\u4e3a\u5b83\u4eec\u4e5f\u7edf\u4e00\u7ee7\u627f\u4e86 Dapper \u7684\u6838\u5fc3\u6982\u5ff5\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u8ffd\u8e2a\uff08trace\uff09<\/strong>\uff1aTrace \u8868\u793a\u4e00\u6b21\u5b8c\u6574\u7684\u5206\u5e03\u5f0f\u8bf7\u6c42\u751f\u547d\u5468\u671f\uff0c\u5b83\u662f\u4e00\u4e2a\u5168\u5c40\u4e0a\u4e0b\u6587\uff0c\u5305\u542b\u4e86\u6574\u4e2a\u8c03\u7528\u94fe\u6240\u6709\u7ecf\u8fc7\u7684\u670d\u52a1\u8282\u70b9\u548c\u8c03\u7528\u8def\u5f84\u3002\u4f8b\u5982\uff0c\u7528\u6237\u53d1\u8d77\u4e00\u4e2a\u8bf7\u6c42\uff0c\u4ece\u524d\u7aef\u670d\u52a1\u5230\u540e\u7aef\u6570\u636e\u5e93\u7684\u591a\u6b21\u8de8\u670d\u52a1\u8c03\u7528\u6784\u6210\u4e00\u4e2a Trace\u3002<\/li>\n\n\n\n<li><strong>\u8de8\u5ea6\uff08Span\uff09<\/strong>\uff1aSpan \u662f Trace \u4e2d\u7684\u4e00\u4e2a\u57fa\u672c\u5355\u5143\uff0c\u8868\u793a\u4e00\u6b21\u5177\u4f53\u7684\u64cd\u4f5c\u6216\u8c03\u7528\u3002\u4e00\u4e2a Trace \u7531\u591a\u4e2a Span \u7ec4\u6210\uff0c\u6309\u65f6\u95f4\u548c\u56e0\u679c\u5173\u7cfb\u8fde\u63a5\u5728\u4e00\u8d77\u3002Span \u5185\u6709\u63cf\u8ff0\u64cd\u4f5c\u7684\u540d\u79f0 span name\u3001\u8bb0\u5f55\u64cd\u4f5c\u7684\u5f00\u59cb\u65f6\u95f4\u548c\u6301\u7eed\u65f6\u95f4\u3001Trace ID\u3001\u5f53\u524d Span ID\u3001\u7236 Span ID\uff08\u6784\u5efa\u8c03\u7528\u5c42\u7ea7\u5173\u7cfb\uff09\u7b49\u4fe1\u606f\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u603b\u7ed3\u94fe\u8def\u8ffd\u8e2a\u7cfb\u7edf\u7684\u57fa\u672c\u539f\u7406\u662f\uff0c\u4e3a\u6bcf\u4e2a\u64cd\u4f5c\u6216\u8c03\u7528\u8bb0\u5f55\u4e00\u4e2a\u8de8\u5ea6\uff0c\u4e00\u4e2a\u8bf7\u6c42\u5185\u7684\u6240\u6709\u8de8\u5ea6\u5171\u4eab\u4e00\u4e2a trace id\u3002\u901a\u8fc7 trace id\uff0c\u4fbf\u53ef\u91cd\u5efa\u5206\u5e03\u5f0f\u7cfb\u7edf\u670d\u52a1\u95f4\u8c03\u7528\u7684\u56e0\u679c\u5173\u7cfb\u3002\u6362\u8a00\u4e4b\uff0c\u94fe\u8def\u8ffd\u8e2a\uff08Trace\uff09\u662f\u7531\u82e5\u5e72\u5177\u6709\u987a\u5e8f\u3001\u5c42\u7ea7\u5173\u7cfb\u7684\u8de8\u5ea6\u7ec4\u6210\u4e00\u68f5\u8ffd\u8e2a\u6811\uff08Trace Tree\uff09\uff0c\u5982\u56fe 9-1 \u6240\u793a\u3002<\/p>\n\n\n\n<p>\u56fe \u7531\u4e0d\u540c\u8de8\u5ea6\u7ec4\u6210\u7684\u8ffd\u8e2a\u6811<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1000\" height=\"788\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Dapper-trace-span-DM-5hd9-.png\" alt=\"\" class=\"wp-image-18106\" style=\"width:550px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Dapper-trace-span-DM-5hd9-.png 1000w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Dapper-trace-span-DM-5hd9--300x236.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Dapper-trace-span-DM-5hd9--768x605.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Dapper-trace-span-DM-5hd9--830x654.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Dapper-trace-span-DM-5hd9--230x181.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Dapper-trace-span-DM-5hd9--350x276.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Dapper-trace-span-DM-5hd9--480x378.png 480w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/figure><\/div>\n\n\n<p>\u4ece\u94fe\u8def\u8ffd\u8e2a\u7cfb\u7edf\u7684\u5b9e\u73b0\u6765\u770b\uff0c\u6838\u5fc3\u662f\u5728\u670d\u52a1\u8c03\u7528\u8fc7\u7a0b\u4e2d\u6536\u96c6 trace \u548c span \u4fe1\u606f\uff0c\u5e76\u6c47\u603b\u751f\u6210\u8ffd\u8e2a\u6811\u7ed3\u6784\u3002\u63a5\u4e0b\u6765\uff0c\u7b14\u8005\u5c06\u4ece\u6570\u636e\u91c7\u96c6\u3001\u6570\u636e\u5c55\u793a(\u5206\u6790)\u4e24\u4e2a\u65b9\u9762\u5c55\u5f00\uff0c\u89e3\u6790\u4e3b\u6d41\u94fe\u8def\u8ffd\u8e2a\u7cfb\u7edf\u7684\u8bbe\u8ba1\u539f\u7406\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u6570\u636e\u91c7\u96c6<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u76ee\u524d\uff0c\u8ffd\u8e2a\u7cfb\u7edf\u7684\u4e3b\u6d41\u5b9e\u73b0\u6709\u4e09\u79cd\uff0c\u5177\u4f53\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u57fa\u4e8e\u65e5\u5fd7\u7684\u8ffd\u8e2a<\/strong>\uff08Log-Based Tracing\uff09\uff1a\u76f4\u63a5\u5c06 Trace\u3001Span \u7b49\u4fe1\u606f\u8f93\u51fa\u5230\u5e94\u7528\u65e5\u5fd7\u4e2d\uff0c\u7136\u540e\u91c7\u96c6\u6240\u6709\u8282\u70b9\u7684\u65e5\u5fd7\u6c47\u805a\u5230\u4e00\u8d77\uff0c\u518d\u6839\u636e\u5168\u5c40\u65e5\u5fd7\u91cd\u5efa\u5b8c\u6574\u7684\u8c03\u7528\u94fe\u62d3\u6251\u3002\u8fd9\u79cd\u65b9\u5f0f\u7684\u4f18\u70b9\u662f\u6ca1\u6709\u7f51\u7edc\u5f00\u9500\u3001\u5e94\u7528\u4fb5\u5165\u6027\u5c0f\u3001\u6027\u80fd\u5f71\u54cd\u4f4e\uff1b\u4f46\u5176\u7f3a\u70b9\u662f\uff0c\u4e1a\u52a1\u8c03\u7528\u4e0e\u65e5\u5fd7\u5f52\u96c6\u4e0d\u662f\u540c\u65f6\u5b8c\u6210\u7684\uff0c\u6709\u53ef\u80fd\u4e1a\u52a1\u8c03\u7528\u5df2\u7ecf\u7ed3\u675f\uff0c\u4f46\u65e5\u5fd7\u5f52\u96c6\u4e0d\u53ca\u65f6\uff0c\u5bfc\u81f4\u8ffd\u8e2a\u5931\u771f\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u6839\u636e\u56fe 9-13\uff0c\u603b\u7ed3 Dapper \u57fa\u4e8e\u65e5\u5fd7\u5b9e\u73b0\u7684\u8ffd\u8e2a\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ol>\n<li>\u5c06 Span \u6570\u636e\u5199\u5165\u672c\u5730\u65e5\u5fd7\u6587\u4ef6\u3002<\/li>\n\n\n\n<li>Dapper \u5b88\u62a4\u8fdb\u7a0b\uff08Dapper Daemon\uff09\u548c\u91c7\u96c6\u5668\uff08Dapper Collectors\uff09\u4ece\u4e3b\u673a\u8282\u70b9\u8bfb\u53d6\u65e5\u5fd7\u3002<\/li>\n\n\n\n<li>\u5c06\u65e5\u5fd7\u5199\u5165 Bigtable \u4ed3\u5e93\uff0c\u6bcf\u884c\u4ee3\u8868\u4e00\u4e2a Trace\uff0c\u6bcf\u5217\u4ee3\u8868\u4e00\u4e2a Span\u3002<\/li>\n\n\n\n<li>\u56fe 9-13 \u57fa\u4e8e\u65e5\u5fd7\u5b9e\u73b0\u7684\u8ffd\u8e2a<\/li>\n<\/ol>\n\n\n\n<p>\u56fe \u57fa\u4e8e\u65e5\u5fd7\u5b9e\u73b0\u7684\u8ffd\u8e2a<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"700\" height=\"469\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/dapper-log-CbDQFiUR.png\" alt=\"\" class=\"wp-image-18107\" style=\"width:456px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/dapper-log-CbDQFiUR.png 700w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/dapper-log-CbDQFiUR-300x201.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/dapper-log-CbDQFiUR-230x154.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/dapper-log-CbDQFiUR-350x235.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/dapper-log-CbDQFiUR-480x322.png 480w\" sizes=\"(max-width: 700px) 100vw, 700px\" \/><\/figure><\/div>\n\n\n<ul>\n<li><strong>\u57fa\u4e8e\u670d\u52a1\u7684\u8ffd\u8e2a<\/strong>\uff08Service-Based Tracing\uff09\uff1a\u901a\u8fc7\u67d0\u4e9b\u624b\u6bb5\u7ed9\u76ee\u6807\u5e94\u7528\u6ce8\u5165\u8ffd\u8e2a\u63a2\u9488\uff08Probe\uff09\uff0c\u7136\u540e\u901a\u8fc7\u63a2\u9488\u6536\u96c6\u670d\u52a1\u8c03\u7528\u4fe1\u606f\u5e76\u53d1\u9001\u7ed9\u94fe\u8def\u8ffd\u8e2a\u7cfb\u7edf\u3002\u63a2\u9488\u901a\u5e38\u88ab\u89c6\u4e3a\u4e00\u4e2a\u5d4c\u5165\u76ee\u6807\u670d\u52a1\u7684\u5c0f\u578b\u5fae\u670d\u52a1\u7cfb\u7edf\uff0c\u5177\u5907\u670d\u52a1\u6ce8\u518c\u3001\u5fc3\u8df3\u68c0\u6d4b\u7b49\u529f\u80fd\uff0c\u5e76\u4f7f\u7528\u4e13\u7528\u7684\u534f\u8bae\u5c06\u76d1\u63a7\u5230\u7684\u8c03\u7528\u4fe1\u606f\u901a\u8fc7\u72ec\u7acb\u7684 HTTP \u6216 RPC \u8bf7\u6c42\u53d1\u9001\u7ed9\u8ffd\u8e2a\u7cfb\u7edf\u3002\u4ee5 SkyWalking \u7684 Java \u8ffd\u8e2a\u63a2\u9488\u4e3a\u4f8b\uff0c\u5b83\u5b9e\u73b0\u7684\u539f\u7406\u662f\u5c06\u9700\u8981\u6ce8\u5165\u7684\u7c7b\u6587\u4ef6\uff08\u8ffd\u8e2a\u903b\u8f91\u4ee3\u7801\uff09\u8f6c\u6362\u6210\u5b57\u8282\u7801\uff0c\u7136\u540e\u901a\u8fc7\u62e6\u622a\u5668\u6ce8\u5165\u5230\u6b63\u5728\u8fd0\u884c\u7684\u5e94\u7528\u7a0b\u5e8f\u4e2d\u3002\u6bd4\u8d77\u57fa\u4e8e\u65e5\u5fd7\u5b9e\u73b0\u7684\u8ffd\u8e2a\uff0c\u57fa\u4e8e\u670d\u52a1\u7684\u8ffd\u8e2a\u5728\u8d44\u6e90\u6d88\u8017\u548c\u4fb5\u5165\u6027\uff08\u4f46\u5bf9\u4e1a\u52a1\u5de5\u7a0b\u5e08\u57fa\u672c\u65e0\u611f\u77e5\uff09\u4e0a\u6709\u6240\u589e\u52a0\uff0c\u4f46\u5176\u7cbe\u786e\u6027\u548c\u7a33\u5b9a\u6027\u66f4\u9ad8\u3002\u73b0\u5728\uff0c\u57fa\u4e8e\u670d\u52a1\u7684\u8ffd\u8e2a\u662f\u76ee\u524d\u6700\u4e3a\u5e38\u89c1\u7684\u5b9e\u73b0\u65b9\u5f0f\uff0c\u88ab Zipkin\u3001Pinpoint\u3001SkyWalking \u7b49\u4e3b\u6d41\u94fe\u8def\u8ffd\u8e2a\u7cfb\u7edf\u5e7f\u6cdb\u91c7\u7528\u3002<\/li>\n\n\n\n<li><strong>\u57fa\u4e8e\u8fb9\u8f66\u4ee3\u7406\u7684\u8ffd\u8e2a<\/strong>\uff08Sidecar-Based Tracing\uff09\uff1a\u8fd9\u662f\u670d\u52a1\u7f51\u683c\u4e2d\u7684\u4e13\u5c5e\u65b9\u6848\uff0c\u57fa\u4e8e\u8fb9\u8f66\u4ee3\u7406\u7684\u6a21\u5f0f\u65e0\u9700\u4fee\u6539\u4e1a\u52a1\u4ee3\u7801\uff0c\u4e5f\u6ca1\u6709\u989d\u5916\u7684\u5f00\u9500\uff0c\u662f\u6700\u7406\u60f3\u7684\u5206\u5e03\u5f0f\u8ffd\u8e2a\u6a21\u578b\u3002\u603b\u7ed3\u5b83\u7684\u7279\u70b9\u5982\u4e0b\uff1a<ul><li>\u5bf9\u5e94\u7528\u5b8c\u5168\u900f\u660e\uff1a\u6709\u81ea\u5df1\u72ec\u7acb\u6570\u636e\u901a\u9053\uff0c\u8ffd\u8e2a\u6570\u636e\u901a\u8fc7\u63a7\u5236\u5e73\u9762\u4e0a\u62a5\uff0c\u4e0d\u4f1a\u6709\u4efb\u4f55\u4f9d\u8d56\u6216\u5e72\u6270\uff1b<\/li><li>\u4e0e\u7f16\u7a0b\u8bed\u8a00\u65e0\u5173\uff1a\u65e0\u8bba\u5e94\u7528\u91c7\u7528\u4ec0\u4e48\u7f16\u7a0b\u8bed\u8a00\uff0c\u53ea\u8981\u5b83\u901a\u8fc7\u7f51\u7edc\uff08\u5982 HTTP \u6216 gRPC\uff09\u8bbf\u95ee\u670d\u52a1\uff0c\u5c31\u53ef\u4ee5\u88ab\u8ffd\u8e2a\u5230\u3002<\/li><\/ul>\u76ee\u524d\uff0c\u5e02\u573a\u5360\u6709\u7387\u6700\u9ad8\u7684\u8fb9\u8f66\u4ee3\u7406 Envoy \u5c31\u63d0\u4f9b\u4e86\u94fe\u8def\u8ffd\u8e2a\u6570\u636e\u91c7\u96c6\u529f\u80fd\uff0c\u4f46 Envoy \u6ca1\u6709\u81ea\u5df1\u7684\u754c\u9762\u7aef\u548c\u5b58\u50a8\u7aef\uff0c\u9700\u8981\u914d\u5408\u4e13\u95e8\u7684 UI \u4e0e\u5b58\u50a8\u7cfb\u7edf\u6765\u4f7f\u7528\u3002\u4e0d\u8fc7\uff0cZipkin\u3001SkyWalking\u3001Jaeger \u548c LightStep Tracing \u7b49\u7b49\u7cfb\u7edf\u90fd\u80fd\u591f\u63a5\u6536\u6765\u81ea Envoy \u7684\u94fe\u8def\u8ffd\u8e2a\u6570\u636e\uff0c\u5145\u5f53\u5176\u754c\u9762\u548c\u5b58\u50a8\u7aef\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u6570\u636e\u5c55\u793a<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u8ffd\u8e2a\u6570\u636e\u901a\u5e38\u4ee5\u4e24\u79cd\u5f62\u5f0f\u5448\u73b0\uff1a\u8c03\u7528\u94fe\u8def\u56fe\u548c\u8c03\u7528\u62d3\u6251\u56fe\uff0c\u5177\u4f53\u5982\u4e0b\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>\u8c03\u7528\u94fe\u8def\u56fe<\/strong>\uff1a\u4e3b\u8981\u7a81\u51fa\u8c03\u7528\u7684\u6df1\u5ea6\u3001\u6bcf\u4e00\u6b21\u8c03\u7528\u7684\u5ef6\u8fdf\u3002\u8c03\u7528\u94fe\u8def\u56fe\u901a\u5e38\u7528\u6765\u5b9a\u4f4d\u6545\u969c\u3002\u4f8b\u5982\uff0c\u5f53\u67d0\u6b21\u8bf7\u6c42\u5931\u8d25\u65f6\uff0c\u901a\u8fc7\u8c03\u7528\u94fe\u8def\u56fe\u53ef\u4ee5\u8ffd\u8e2a\u8c03\u7528\u7ecf\u8fc7\u7684\u5404\u4e2a\u73af\u8282\uff0c\u5b9a\u4f4d\u662f\u54ea\u4e00\u5c42\u8c03\u7528\u5931\u8d25\u3002<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"585\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-418-1024x585.png\" alt=\"\" class=\"wp-image-18108\" style=\"width:512px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-418-1024x585.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-418-300x171.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-418-768x439.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-418-1536x877.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-418-830x474.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-418-230x131.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-418-350x200.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-418-480x274.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-418.png 2038w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<ul>\n<li><strong>\u8c03\u7528\u62d3\u6251\u56fe<\/strong>\uff1a\u4e3b\u8981\u7a81\u51fa\u7cfb\u7edf\u5185\u5404\u4e2a\u5b50\u670d\u52a1\u7684\u5168\u5c40\u5173\u7cfb\u3001\u8c03\u7528\u4f9d\u8d56\u5173\u7cfb\u3002\u4f5c\u4e3a\u5168\u5c40\u89c6\u89d2\u56fe\uff0c\u5b83\u5e2e\u52a9\u5de5\u7a0b\u5e08\u7406\u89e3\u5168\u5c40\u7cfb\u7edf\u3001\u5e76\u8bc6\u522b\u74f6\u9888\u3002\u4f8b\u5982\uff0c\u82e5\u67d0\u670d\u52a1\u538b\u529b\u8fc7\u9ad8\uff0c\u8c03\u7528\u62d3\u6251\u56fe\u7684\u62d3\u5c55\u533a\uff08\u53f3\u4fa7\uff09\u4f1a\u663e\u793a\u8be5\u670d\u52a1\u8be6\u7ec6\u60c5\u51b5\uff08\u5ef6\u8fdf\u3001load\u3001QPS \u7b49\uff09\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u56fe Pinpoint \u7684\u8c03\u7528\u62d3\u6251\u56fe<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"578\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Pinpoint-zskXAA5p-1024x578.png\" alt=\"\" class=\"wp-image-18109\" style=\"width:548px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Pinpoint-zskXAA5p-1024x578.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Pinpoint-zskXAA5p-300x169.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Pinpoint-zskXAA5p-768x434.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Pinpoint-zskXAA5p-1536x867.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Pinpoint-zskXAA5p-830x469.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Pinpoint-zskXAA5p-230x130.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Pinpoint-zskXAA5p-350x198.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Pinpoint-zskXAA5p-480x271.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/Pinpoint-zskXAA5p.png 1647w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u6027\u80fd\u5256\u6790<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u53ef\u89c2\u6d4b\u6027\u9886\u57df\u7684\u6027\u80fd\u5256\u6790\uff08Profiling\uff09\u7684\u76ee\u6807\u662f\u5206\u6790\u8fd0\u884c\u4e2d\u7684\u5e94\u7528\uff0c\u751f\u6210\u8be6\u7ec6\u7684\u6027\u80fd\u6570\u636e\uff08Profiles\uff09\uff0c\u5e2e\u52a9\u5de5\u7a0b\u5e08\u5168\u9762\u4e86\u89e3\u5e94\u7528\u7684\u8fd0\u884c\u884c\u4e3a\u548c\u8d44\u6e90\u4f7f\u7528\u60c5\u51b5\uff0c\u4ece\u800c\u8bc6\u522b\u4ee3\u7801\u4e2d\u7684\u6027\u80fd\u74f6\u9888\u3002<\/p>\n\n\n\n<p>\u6027\u80fd\u6570\u636e\u901a\u5e38\u4ee5\u706b\u7130\u56fe\u6216\u5806\u6808\u56fe\u7684\u5f62\u5f0f\u5448\u73b0\uff0c\u5206\u6790\u8fd9\u4e9b\u6570\u636e\u662f\u4ece\u201c\u662f\u4ec0\u4e48\u201d\u5230\u201c\u4e3a\u4ec0\u4e48\u201d\u8fc7\u7a0b\u4e2d\u7684\u5173\u952e\u73af\u8282\u3002\u4f8b\u5982\uff0c\u901a\u8fc7\u94fe\u8def\u8ffd\u8e2a\u8bc6\u522b\u5ef6\u8fdf\u6e90\uff08\u662f\u4ec0\u4e48\uff09\uff0c\u7136\u540e\u6839\u636e\u706b\u7130\u56fe\u8fdb\u4e00\u6b65\u5206\u6790\uff0c\u5b9a\u4f4d\u5230\u5177\u4f53\u7684\u4ee3\u7801\u884c\uff08\u4e3a\u4ec0\u4e48\uff09\u30022021 \u5e74\uff0c\u67d0\u7f51\u7ad9\u53d1\u751f\u5d29\u6e83\u4e8b\u4ef6\uff0c\u5de5\u7a0b\u5e08\u901a\u8fc7\u5206\u6790\u706b\u7130\u56fe\u53d1\u73b0 Lua \u4ee3\u7801\u5b58\u5728\u5f02\u5e38\uff0c\u6700\u7ec8\u5b9a\u4f4d\u5230\u95ee\u9898\u6e90\u5934\u3002<sup><a href=\"https:\/\/www.thebyte.com.cn\/Observability\/profiles.html#footnote1\">[1]<\/a><a><\/a><\/sup>\u3002<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"520\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-420-1024x520.png\" alt=\"\" class=\"wp-image-18111\" style=\"width:540px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-420-1024x520.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-420-300x152.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-420-768x390.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-420-1536x779.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-420-830x421.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-420-230x117.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-420-350x178.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-420-480x244.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-420.png 2046w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<pre class=\"wp-block-preformatted\">\u706b\u7130\u56fe\u5206\u6790\u8bf4\u660e<br><br>    \u7eb5\u8f74\uff1a\u8868\u793a\u51fd\u6570\u8c03\u7528\u7684\u5806\u6808\u6df1\u5ea6\uff08\u6216\u5c42\u7ea7\uff09\u3002\u7eb5\u5411\u8d8a\u9ad8\u8868\u793a\u8c03\u7528\u94fe\u8d8a\u6df1\uff0c\u5e95\u90e8\u901a\u5e38\u662f\u7a0b\u5e8f\u7684\u5165\u53e3\u51fd\u6570\uff08\u5982 main \u51fd\u6570\uff09\uff0c\u4e0a\u5c42\u662f\u88ab\u4e0b\u5c42\u51fd\u6570\u8c03\u7528\u7684\u51fd\u6570\u3002<br>    \u6a2a\u8f74\uff1a\u8868\u793a\u51fd\u6570\u5728\u7279\u5b9a\u65f6\u95f4\u6bb5\u5185\u6240\u5360\u7528\u7684 CPU \u65f6\u95f4\u6216\u5185\u5b58\u7a7a\u95f4\uff0c\u6761\u5f62\u7684\u5bbd\u5ea6\u8d8a\u5927\uff0c\u8868\u793a\u8be5\u51fd\u6570\u6d88\u8017\u7684\u65f6\u95f4\u6216\u8d44\u6e90\u8d8a\u591a\u3002<br><br>\u5206\u6790\u706b\u7130\u56fe\u7684\u5173\u952e\u662f\u89c2\u5bdf\u6a2a\u5411\u6761\u5f62\u7684\u5bbd\u5ea6\uff0c\u5bbd\u5ea6\u8d8a\u5927\uff0c\u51fd\u6570\u5360\u7528\u7684\u65f6\u95f4\u8d8a\u591a\u3002\u5982\u679c\u67d0\u4e2a\u51fd\u6570\u7684\u6761\u5f62\u56fe\u51fa\u73b0\u201c\u5e73\u9876\u201d\u73b0\u8c61\uff0c\u8868\u793a\u8be5\u51fd\u6570\u7684\u6267\u884c\u65f6\u95f4\u8fc7\u957f\uff0c\u53ef\u80fd\u6210\u4e3a\u6027\u80fd\u74f6\u9888\u3002<\/pre>\n\n\n\n<p>\u6027\u80fd\u6570\u636e\u6709\u591a\u79cd\u7c7b\u578b\uff0c\u6bcf\u79cd\u7c7b\u578b\u7531\u4e0d\u540c\u7684\u5206\u6790\u5668\uff08Profiler\uff09\u751f\u6210\uff0c\u5e38\u89c1\u7684\u5206\u6790\u5668\u5305\u62ec\uff1a<\/p>\n\n\n\n<ul>\n<li><strong>CPU \u5206\u6790\u5668<\/strong>\uff1a\u8ddf\u8e2a\u7a0b\u5e8f\u4e2d\u6bcf\u4e2a\u51fd\u6570\u6216\u4ee3\u7801\u5757\u7684\u8fd0\u884c\u65f6\u95f4\uff0c\u8bb0\u5f55\u51fd\u6570\u8c03\u7528\u5806\u6808\u4fe1\u606f\uff0c\u751f\u6210\u8c03\u7528\u56fe\uff0c\u5e76\u5c55\u793a\u51fd\u6570\u4e4b\u95f4\u7684\u8c03\u7528\u5173\u7cfb\u548c\u65f6\u95f4\u5206\u5e03\uff1b<\/li>\n\n\n\n<li><strong>\u5806\u5206\u6790\u5668\uff08Heap Profiler\uff09<\/strong>\uff1a\u76d1\u63a7\u7a0b\u5e8f\u7684\u5185\u5b58\u4f7f\u7528\u60c5\u51b5\uff0c\u5e2e\u52a9\u5b9a\u4f4d\u5185\u5b58\u6cc4\u6f0f\u6216\u4e0d\u5fc5\u8981\u7684\u5185\u5b58\u5206\u914d\u3002\u4f8b\u5982\uff0cJava \u5de5\u7a0b\u5e08\u901a\u8fc7\u5806\u5206\u6790\u5668\u5b9a\u4f4d\u5bfc\u81f4\u5185\u5b58\u6ea2\u51fa\u7684\u5177\u4f53\u5bf9\u8c61\uff1b<\/li>\n\n\n\n<li><strong>GPU \u5206\u6790\u5668<\/strong>\uff1a\u5206\u6790 GPU \u7684\u4f7f\u7528\u60c5\u51b5\uff0c\u4e3b\u8981\u7528\u4e8e\u56fe\u5f62\u5bc6\u96c6\u578b\u5e94\u7528\uff08\u5982\u6e38\u620f\u5f00\u53d1\uff09\uff0c\u4f18\u5316\u6e32\u67d3\u6027\u80fd\uff1b<\/li>\n\n\n\n<li><strong>\u4e92\u65a5\u9501\u5206\u6790\u5668<\/strong>\uff1a\u68c0\u6d4b\u7a0b\u5e8f\u4e2d\u4e92\u65a5\u9501\u7684\u7ade\u4e89\u60c5\u51b5\uff0c\u5e2e\u52a9\u4f18\u5316\u7ebf\u7a0b\u95f4\u7684\u5e76\u53d1\u6027\u80fd\uff0c\u51cf\u5c11\u9501\u4e89\u7528\u5f15\u53d1\u7684\u6027\u80fd\u74f6\u9888\uff1b<\/li>\n\n\n\n<li><strong>I\/O \u5206\u6790\u5668<\/strong>\uff1a\u8bc4\u4f30 I\/O \u64cd\u4f5c\u7684\u6027\u80fd\uff0c\u5305\u62ec\u6587\u4ef6\u8bfb\u5199\u5ef6\u8fdf\u548c\u7f51\u7edc\u8bf7\u6c42\u8017\u65f6\uff0c\u5e2e\u52a9\u8bc6\u522b\u6570\u636e\u4f20\u8f93\u74f6\u9888\u5e76\u63d0\u9ad8\u6548\u7387\uff1b<\/li>\n\n\n\n<li><strong>\u7279\u5b9a\u7f16\u7a0b\u8bed\u8a00\u5206\u6790\u5668<\/strong>\uff1a\u4f8b\u5982 JVM Profiler\uff0c\u7528\u4e8e\u5206\u6790\u5728 Java \u865a\u62df\u673a\u4e0a\u8fd0\u884c\u7684\u5e94\u7528\u7a0b\u5e8f\uff0c\u6316\u6398\u4e0e\u7f16\u7a0b\u8bed\u8a00\u7279\u6027\u76f8\u5173\u7684\u6027\u80fd\u95ee\u9898\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u8fc7\u53bb\uff0c\u7531\u4e8e\u5206\u6790\u5668\u8d44\u6e90\u6d88\u8017\u8f83\u9ad8\uff0c\u901a\u5e38\u4ec5\u5728\u7d27\u6025\u60c5\u51b5\u4e0b\u542f\u7528\u3002\u968f\u7740\u4f4e\u5f00\u9500\u5206\u6790\u6280\u672f\u7684\u53d1\u5c55\uff0c\u5982\u7f16\u7a0b\u8bed\u8a00\u5c42\u9762\u7684 Java Flight Recorder \u548c Async Profiler \u6280\u672f\u3001\u64cd\u4f5c\u7cfb\u7edf\u5c42\u9762\u7684 systemTap \u548c eBPF \u6280\u672f\u7684\u51fa\u73b0\uff0c\u8ba9\u5728\u751f\u4ea7\u73af\u5883\u8fdb\u884c\u6301\u7eed\u6027\u80fd\u5206\u6790\uff08Continuous Profiling\uff09\u6210\u4e3a\u53ef\u80fd\uff0c\u89e3\u51b3\u7ebf\u4e0a\u201c\u7591\u96be\u6742\u75c7\u201d\u4e5f\u53d8\u5f97\u66f4\u52a0\u5bb9\u6613\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u6838\u5fc3\u8f6c\u50a8<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u6838\u5fc3\u8f6c\u50a8\uff08Core dump\uff09\u4e2d\u7684 \u201ccore\u201d \u4ee3\u8868\u7a0b\u5e8f\u7684\u5173\u952e\u8fd0\u884c\u72b6\u6001\uff0c\u201cdump\u201d \u7684\u610f\u601d\u662f\u5bfc\u51fa\u3002<\/p>\n\n\n\n<p>\u6838\u5fc3\u8f6c\u50a8\u5386\u53f2\u60a0\u4e45\uff0c\u5f88\u65e9\u5c31\u5728\u5404\u7c7b Unix \u7cfb\u7edf\u4e2d\u51fa\u73b0\u3002\u5728\u4efb\u4f55\u5b89\u88c5\u4e86\u300aLinux man \u624b\u518c\u300b\u7684 Linux \u53d1\u884c\u7248\u4e2d\uff0c\u90fd\u53ef\u4ee5\u8fd0\u884c man core \u547d\u4ee4\u67e5\u9605\u76f8\u5173\u4fe1\u606f\u3002<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">$ man core\n...\nA small number of signals which cause abnormal termination of a process\n     also cause a record of the process's in-core state to be written to disk\n     for later examination by one of the available debuggers.  (See\n     sigaction(2).)\n...<\/pre>\n\n\n\n<p>\u4e0a\u9762\u7684\u5927\u81f4\u610f\u601d\u662f\uff0c\u5f53\u7a0b\u5e8f\u5f02\u5e38\u7ec8\u6b62\u65f6\uff0cLinux \u7cfb\u7edf\u4f1a\u5c06\u7a0b\u5e8f\u7684\u5173\u952e\u8fd0\u884c\u72b6\u6001\uff08\u5982\u7a0b\u5e8f\u8ba1\u6570\u5668\u3001\u5185\u5b58\u6620\u50cf\u3001\u5806\u6808\u8ddf\u8e2a\u7b49\uff09\u5bfc\u51fa\u5230\u4e00\u4e2a\u201c\u6838\u5fc3\u6587\u4ef6\u201d\uff08core file\uff09\u4e2d\u3002\u5de5\u7a0b\u5e08\u901a\u8fc7\u8c03\u8bd5\u5668\uff08\u5982 gdb\uff09\u6253\u5f00\u6838\u5fc3\u6587\u4ef6\uff0c\u67e5\u770b\u7a0b\u5e8f\u5d29\u6e83\u65f6\u7684\u8fd0\u884c\u72b6\u6001\uff0c\u4ece\u800c\u5e2e\u52a9\u5b9a\u4f4d\u95ee\u9898\u3002<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\u6ce8\u610f<br><br>\u590d\u6742\u5e94\u7528\u7a0b\u5e8f\u5d29\u6e83\u65f6\uff0c\u53ef\u80fd\u4f1a\u751f\u6210\u51e0\u5341 GB \u5927\u5c0f\u7684\u6838\u5fc3\u6587\u4ef6\u3002\u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cLinux \u7cfb\u7edf\u4f1a\u9650\u5236\u6838\u5fc3\u6587\u4ef6\u7684\u5927\u5c0f\u3002\u5982\u679c\u4f60\u60f3\u89e3\u9664\u9650\u5236\uff0c\u53ef\u901a\u8fc7\u547d\u4ee4 ulimit -c unlimited\uff0c\u544a\u8bc9\u64cd\u4f5c\u7cfb\u7edf\u4e0d\u8981\u9650\u5236\u6838\u5fc3\u6587\u4ef6\u7684\u5927\u5c0f\u3002<\/pre>\n\n\n\n<p>\u503c\u5f97\u4e00\u63d0\u7684\u662f\uff0c\u867d\u7136 CNCF \u53d1\u5e03\u7684\u53ef\u89c2\u6d4b\u6027\u767d\u76ae\u4e66\u4ec5\u63d0\u5230\u4e86 core dump\u3002\u5b9e\u9645\u4e0a\uff0c\u91cd\u8981\u7684 dumps \u8fd8\u6709 Heap dump\uff08Java \u5806\u6808\u5728\u7279\u5b9a\u65f6\u523b\u7684\u5feb\u7167\uff09\u3001Thread dump\uff08\u7279\u5b9a\u65f6\u523b\u7684 Java \u7ebf\u7a0b\u5feb\u7167\uff09\u548c Memory dump\uff08\u5185\u5b58\u5feb\u7167\uff09\u7b49\u7b49\u3002<\/p>\n\n\n\n<p>\u6700\u540e\uff0c\u5c3d\u7ba1 CNCF \u5c06 dumps \u7eb3\u5165\u4e86\u53ef\u89c2\u6d4b\u6027\u4f53\u7cfb\uff0c\u4f46\u4ecd\u6709\u8bb8\u591a\u6280\u672f\u96be\u9898\uff0c\u5982\u5bb9\u5668\u914d\u7f6e\u4e0e\u64cd\u4f5c\u7cfb\u7edf\u5168\u5c40\u914d\u7f6e\u7684\u51b2\u7a81\u3001\u6570\u636e\u6301\u4e45\u5316\u7684\u6311\u6218\uff08Pod \u91cd\u542f\u524d\u5c06\u6570 Gb \u7684 core \u6587\u4ef6\u5199\u5165\u6301\u4e45\u5377\uff09\u7b49\u7b49\uff0c\u5bfc\u81f4\u5904\u7406 dumps \u6570\u636e\u8fd8\u5f97\u4f9d\u9760\u4f20\u7edf\u624b\u6bb5\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u53ef\u89c2\u6d4b\u6807\u51c6\u7684\u6f14\u8fdb<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>Dapper \u8bba\u6587\u53d1\u5e03\u540e\uff0c\u5e02\u573a\u4e0a\u6d8c\u73b0\u51fa\u5927\u91cf\u8ffd\u8e2a\u7cfb\u7edf\uff0c\u5982 Jaeger\u3001Pinpoint\u3001Zipkin \u7b49\u3002\u8fd9\u4e9b\u7cfb\u7edf\u90fd\u57fa\u4e8e Dapper \u8bba\u6587\u5b9e\u73b0\uff0c\u529f\u80fd\u4e0a\u65e0\u672c\u8d28\u5dee\u5f02\uff0c\u4f46\u5b9e\u73b0\u65b9\u5f0f\u548c\u6280\u672f\u6808\u4e0d\u540c\uff0c\u5bfc\u81f4\u5b83\u4eec\u96be\u4ee5\u517c\u5bb9\u6216\u534f\u540c\u4f7f\u7528\u3002<\/p>\n\n\n\n<p>\u4e3a\u89e3\u51b3\u8ffd\u8e2a\u7cfb\u7edf\u5404\u81ea\u4e3a\u653f\u7684\u4e71\u8c61\uff0c\u4e00\u4e9b\u8001\u724c\u5e94\u7528\u6027\u80fd\u76d1\u63a7\uff08APM\uff09\u5382\u5546\uff08\u5982 Uber\u3001LightStep \u548c Red Hat\uff09\u8054\u5408\u5b9a\u4e49\u4e86\u4e00\u5957\u8de8\u8bed\u8a00\u7684\u3001\u5e73\u53f0\u65e0\u5173\u5206\u5e03\u5f0f\u8ffd\u8e2a\u6807\u51c6\u534f\u8bae \u2014\u2014 OpenTracing\u3002<\/p>\n\n\n\n<p>\u5f00\u53d1\u8005\u53ea\u9700\u6309\u7167 OpenTracing \u89c4\u8303\u5b9e\u73b0\u8ffd\u8e2a\u63a5\u53e3\uff0c\u4fbf\u53ef\u7075\u6d3b\u66ff\u6362\u3001\u7ec4\u5408\u63a2\u9488\u3001\u5b58\u50a8\u548c\u754c\u9762\u7ec4\u4ef6\u30022016 \u5e74\uff0cCNCF \u5c06 OpenTracing \u6536\u5f55\u4e3a\u5176\u7b2c\u4e09\u4e2a\u9879\u76ee\uff0c\u524d\u4e24\u4e2a\u5206\u522b\u662f\u5927\u540d\u9f0e\u9f0e\u7684 Kubernetes \u548c Prometheus\u3002\u8fd9\u4e00\u4e3e\u63aa\u6807\u5fd7\u7740 OpenTracing \u4f5c\u4e3a\u5206\u5e03\u5f0f\u7cfb\u7edf\u53ef\u89c2\u6d4b\u6027\u9886\u57df\u7684\u6807\u51c6\u4e4b\u4e00\uff0c\u83b7\u5f97\u4e86\u4e1a\u754c\u7684\u5e7f\u6cdb\u8ba4\u53ef\u3002<\/p>\n\n\n\n<p>OpenTracing \u63a8\u51fa\u540e\u4e0d\u4e45\uff0cGoogle \u548c\u5fae\u8f6f\u8054\u5408\u63a8\u51fa\u4e86 OpenCensus \u9879\u76ee\u3002OpenCensus \u8d77\u521d\u662f Google \u5185\u90e8\u7684\u76d1\u63a7\u5de5\u5177\uff0c\u5f00\u6e90\u7684\u76ee\u7684\u5e76\u975e\u4e0e OpenTracing \u7ade\u4e89\uff0c\u800c\u662f\u5e0c\u671b\u4e3a\u5206\u5e03\u5f0f\u7cfb\u7edf\u63d0\u4f9b\u4e00\u4e2a\u7edf\u4e00\u7684\u3001\u8de8\u8bed\u8a00\u7684\u3001\u5f00\u7bb1\u5373\u7528\u7684\u53ef\u89c2\u6d4b\u6027\u6846\u67b6\uff0c\u4e0d\u4ec5\u4ec5\u5904\u7406\u94fe\u8def\u8ffd\u8e2a\uff08tracing\uff09\u3001\u8fd8\u8981\u5177\u5907\u5904\u7406\u6307\u6807\uff08metrics\uff09\u7684\u80fd\u529b\u3002<\/p>\n\n\n\n<p>\u867d\u8bf4 OpenTracing \u548c OpenCensus \u63a8\u52a8\u4e86\u53ef\u89c2\u6d4b\u6027\u7cfb\u7edf\u7684\u53d1\u5c55\uff0c\u4f46\u5b83\u4eec\u4f5c\u4e3a\u534f\u8bae\u6807\u51c6\uff0c\u5f7c\u6b64\u4e4b\u95f4\u7684\u7ade\u4e89\u548c\u5206\u88c2\u4e0d\u53ef\u907f\u514d\u5730\u6d88\u8017\u4e86\u5927\u91cf\u793e\u533a\u8d44\u6e90\u3002\u5bf9\u4e8e\u666e\u901a\u5f00\u53d1\u8005\u800c\u8a00\uff0c\u4e00\u8fb9\u662f\u8001\u724c APM \u5382\u5546\uff0c\u53e6\u4e00\u8fb9\u662f\u62e5\u6709\u5f3a\u5927\u5f71\u54cd\u529b\u7684 Google \u548c\u5fae\u8f6f\u3002\u9009\u62e9\u56f0\u96be\u75c7\u53d1\u4f5c\u65f6\uff0c\u4e00\u4e2a\u65b0\u7684\u8bbe\u60f3\u4e0d\u65ad\u88ab\u8ba8\u8bba\uff1a\u201c\u80fd\u5426\u6709\u4e00\u4e2a\u6807\u51c6\u65b9\u6848\uff0c\u540c\u65f6\u652f\u6301\u6307\u6807\u3001\u8ffd\u8e2a\u548c\u65e5\u5fd7\u7b49\u5404\u7c7b\u9065\u6d4b\u6570\u636e\uff1f\u201d\u3002<\/p>\n\n\n\n<p>2019 \u5e74\uff0cOpenTracing \u548c OpenCensus \u7684\u7ef4\u62a4\u8005\u51b3\u5b9a\u5c06\u4e24\u4e2a\u9879\u76ee\u6574\u5408\u5728\u4e00\u8d77\uff0c\u5f62\u6210\u4e86\u73b0\u5728\u7684 OpenTelemetry \u9879\u76ee\u3002OpenTelemetry \u505a\u7684\u4e8b\u60c5\u662f\uff0c\u63d0\u4f9b\u5404\u7c7b\u9065\u6d4b\u6570\u636e\u7edf\u4e00\u91c7\u96c6\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n\n\n\n<p>\u5982\u56fe 9-17 \u6240\u793a\uff0c\u96c6\u6210\u4e86 OpenTelemetry \u7684\u53ef\u89c2\u6d4b\u7cfb\u7edf\uff1a<\/p>\n\n\n\n<ul>\n<li>\u5e94\u7528\u7a0b\u5e8f\u53ea\u9700\u8981\u4e00\u79cd SDK \u5c31\u53ef\u4ee5\u5b9e\u73b0\u6240\u6709\u7c7b\u578b\u9065\u6d4b\u6570\u636e\u7684\u751f\u4ea7\uff1b<\/li>\n\n\n\n<li>\u96c6\u7fa4\u53ea\u9700\u8981\u90e8\u7f72\u4e00\u4e2a OpenTelemetry Collector \u4fbf\u53ef\u4ee5\u91c7\u96c6\u6240\u6709\u7684\u9065\u6d4b\u6570\u636e\u3002<\/li>\n<\/ul>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"706\" src=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-422-1024x706.png\" alt=\"\" class=\"wp-image-18113\" style=\"width:520px;height:auto\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-422-1024x706.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-422-300x207.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-422-768x530.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-422-1536x1059.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-422-830x572.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-422-230x159.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-422-350x241.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-422-480x331.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2025\/06\/image-422.png 1958w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure><\/div>\n\n\n<p>\u81f3\u4e8e\u9065\u6d4b\u6570\u636e\u91c7\u96c6\u540e\u5982\u4f55\u5b58\u50a8\u3001\u5c55\u793a\u3001\u4f7f\u7528\uff0cOpenTelemetry \u5e76\u4e0d\u6d89\u53ca\u3002\u4f60\u53ef\u4ee5\u4f7f\u7528 Prometheus + Grafana \u505a\u6307\u6807\u7684\u5b58\u50a8\u548c\u5c55\u793a\uff0c\u4e5f\u53ef\u4ee5\u4f7f\u7528 Jaeger \u505a\u94fe\u8def\u8ffd\u8e2a\u7684\u5b58\u50a8\u548c\u5c55\u793a\u3002\u8fd9\u4f7f\u5f97 OpenTelemetry \u65e2\u4e0d\u4f1a\u56e0\u52a8\u4e86\u201c\u6570\u636e\u7684\u86cb\u7cd5\u201d\uff0c\u5f15\u8d77\u751f\u6001\u62b5\u5236\uff0c\u4e5f\u4fdd\u5b58\u4e86\u7cbe\u529b\uff0c\u4e13\u6ce8\u5b9e\u73b0\u517c\u5bb9\u201c\u6240\u6709\u7684\u8bed\u8a00\u3001\u6240\u6709\u7684\u7cfb\u7edf\u201d\u7684\u201c\u9065\u6d4b\u6570\u636e\u91c7\u96c6\u5668\u201d\uff08OpenTelemetry Collector\uff09\u3002<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>\u81ea 2019 \u5e74\u53d1\u5e03\uff0cOpenTelemetry \u4fbf\u5f97\u5230\u4e86\u793e\u533a\u7684\u5e7f\u6cdb\u652f\u6301\u3002\u7edd\u5927\u90e8\u5206\u4e91\u670d\u52a1\u5546\uff0c\u5982 AWS\u3001Google Cloud\u3001Azure\u3001\u963f\u91cc\u4e91\u7b49\u5747\u5df2\u652f\u6301\u548c\u63a8\u5e7f OpenTelemetry\uff0c\u5404\u79cd\u7b2c\u4e09\u65b9\u5de5\u5177\uff08\u5982 Jaeger\u3001Prometheus\u3001Zipkin\uff09\u4e5f\u9010\u6b65\u96c6\u6210 OpenTelemetry\uff0c\u5171\u540c\u6784\u5efa\u4e86\u4e30\u5bcc\u7684\u53ef\u89c2\u6d4b\u6027\u751f\u6001\u7cfb\u7edf\u3002<\/p>\n\n\n\n<p>\u3000<\/p>\n\n\n\n<p><strong>\u5c0f\u7ed3<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u901a\u8fc7\u672c\u7ae0\u7684\u5185\u5bb9\uff0c\u76f8\u4fe1\u4f60\u5df2\u7ecf\u7406\u89e3\u4e86\u4ec0\u4e48\u662f\u53ef\u89c2\u6d4b\u6027\uff1f\u7b80\u5355\u6765\u8bf4\uff0c\u5c31\u662f\u901a\u8fc7\u7cfb\u7edf\u7684\u5916\u90e8\u8f93\u51fa\u63a8\u65ad\u5176\u5185\u90e8\u72b6\u6001\u7684\u80fd\u529b\u3002<\/p>\n\n\n\n<p>\u7cfb\u7edf\u7684\u5916\u90e8\u8f93\u51fa\u79f0\u4e3a\u201c\u9065\u6d4b\u6570\u636e\u201d\uff0c\u4e3b\u8981\u5305\u62ec\u65e5\u5fd7\u3001\u6307\u6807\u548c\u8ffd\u8e2a\u6570\u636e\u3002\u5efa\u7acb\u826f\u597d\u7684\u53ef\u89c2\u6d4b\u6027\u673a\u5236\uff0c\u5b9e\u8d28\u4e0a\u662f\u5bf9\u8fd9\u4e9b\u6570\u636e\u8fdb\u884c\u7edf\u4e00\u6536\u96c6\u3001\u5173\u8054\u548c\u5206\u6790\u3002\u8fd9\u5176\u4e2d\u8fd8\u6709\u4e24\u4e2a\u5173\u952e\uff1a\u9996\u5148\uff0c\u8981\u4f4e\u5f00\u9500\u3002\u53ef\u89c2\u6d4b\u6027\u7684\u4e00\u5927\u76ee\u7684\u5c31\u662f\u53d1\u73b0\u6027\u80fd\u95ee\u9898\uff0c\u56e0\u6b64\u4e0d\u5e94\u5bf9\u4e1a\u52a1\u9020\u6210\u660e\u663e\u7684\u6027\u80fd\u8d1f\u62c5\u3002\u5bf9\u4e8e\u5bf9\u5ef6\u8fdf\u654f\u611f\u7684\u4e1a\u52a1\uff0c\u4efb\u4f55\u5fae\u5c0f\u7684\u6027\u80fd\u635f\u8017\u90fd\u53ef\u80fd\u4ea7\u751f\u660e\u663e\u7684\u5f71\u54cd\u3002\u5176\u6b21\uff0c\u4e1a\u52a1\u900f\u660e\u6027\u81f3\u5173\u91cd\u8981\u3002\u89c2\u6d4b\u80fd\u529b\u901a\u5e38\u662f\u5728\u8fd0\u7ef4\u9636\u6bb5\u52a0\u5165\u7684\uff0c\u56e0\u6b64\u5e94\u4ee5\u975e\u4fb5\u5165\u6216\u6700\u5c0f\u4fb5\u5165\u7684\u65b9\u5f0f\u5b9e\u73b0\uff0c\u5c3d\u91cf\u907f\u514d\u5bf9\u4e1a\u52a1\u5f00\u53d1\u9020\u6210\u5e72\u6270\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u8f6c\u8f7d\uff1ahttps:\/\/www.thebyte.com.cn\/Observability\/summary.htm [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/18089"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=18089"}],"version-history":[{"count":2,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/18089\/revisions"}],"predecessor-version":[{"id":18115,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/18089\/revisions\/18115"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=18089"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=18089"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=18089"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}