{"id":98519,"date":"2026-09-01T02:16:53","date_gmt":"2026-08-31T18:16:53","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/98519.html"},"modified":"2026-09-01T02:16:53","modified_gmt":"2026-08-31T18:16:53","slug":"%e4%bc%81%e4%b8%9a%e5%90%8e%e7%ab%af%e6%9e%b6%e6%9e%84%e7%ac%ac%e4%b8%80%e7%89%88%e8%af%a5%e4%bf%9d%e7%95%99%e5%93%aa%e4%ba%9b%e6%a0%b8%e5%bf%83%e8%83%bd%e5%8a%9b","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/98519.html","title":{"rendered":"\u4f01\u4e1a\u540e\u7aef\u67b6\u6784\u7b2c\u4e00\u7248\u8be5\u4fdd\u7559\u54ea\u4e9b\u6838\u5fc3\u80fd\u529b"},"content":{"rendered":"<h2>\u4f01\u4e1a\u540e\u7aef\u67b6\u6784\u7b2c\u4e00\u7248\u8be5\u4fdd\u7559\u54ea\u4e9b\u6838\u5fc3\u80fd\u529b<\/h2>\n<p><img decoding=\"async\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260831181652-6a95c5144af6f.webp\" alt=\"\u5c01\u9762\u4fe1\u606f\u56fe\" \/><\/p>\n<p>\u53ef\u89c2\u6d4b\u6027\u4f53\u7cfb\u521a\u4e0a\u7ebf\u7684\u7b2c\u4e00\u5468&#xff0c;\u544a\u8b66\u7cfb\u7edf\u7684\u901a\u77e5\u97f3\u5c31\u6ca1\u6709\u505c\u8fc7&#xff1a;1 \u5206\u949f\u5185\u5f39\u51fa\u4e86 5,400 \u6761\u544a\u8b66\u3002\u7edd\u5927\u90e8\u5206\u662f\u201c\u67d0\u4e2a\u65e0\u5173\u7d27\u8981\u7684\u9759\u6001\u8d44\u6e90\u63a5\u53e3 Latency \u7a0d\u5fae\u6ce2\u52a8\u201d\u6216\u201c\u8c03\u7528\u94fe\u8def\u4e2d\u67d0\u4e2a\u975e\u6838\u5fc3 SQL \u8017\u65f6\u8d85\u8fc7 50ms\u201d\u3002<\/p>\n<p>\u66f4\u4ee4\u4eba\u5c34\u5c2c\u7684\u662f&#xff0c;\u7531\u4e8e\u5f00\u542f\u4e86 OpenTelemetry \u7684\u5168\u91cf Trace \u91c7\u6837&#xff08;\u6309\u68c0\u67e5\u7ed3\u679c\u786e\u8ba4 Sampling&#xff09;&#xff0c;\u53ef\u89c2\u6d4b\u6027 Agent \u81ea\u8eab\u5360\u7528\u7684 CPU \u7adf\u7136\u5403\u6389\u4e86 Pod \u989d\u5ea6\u914d\u989d\u7684 15%&#xff0c;\u65e5\u5fd7\u4f20\u8f93\u76f4\u63a5\u6324\u7206\u4e86 ElasticSearch \u7684\u78c1\u76d8 I\/O\u3002<\/p>\n<p>\u53ef\u89c2\u6d4b\u6027\u5efa\u8bbe\u5207\u5fcc\u8bd5\u56fe\u5728\u7b2c\u4e00\u9636\u6bb5\u201c\u5927\u800c\u5168\u201d\u3002\u5982\u679c\u7b2c\u4e00\u7248\u6ca1\u6709\u627e\u51c6\u6838\u5fc3\u94fe\u8def\u4e0e\u5173\u952e\u6307\u6807&#xff0c;\u6536\u96c6\u5230\u7684\u6d77\u91cf\u6570\u636e\u4e0d\u4ec5\u4e0d\u80fd\u8f85\u52a9\u6392\u969c&#xff0c;\u53cd\u800c\u4f1a\u6210\u4e3a\u6df9\u6ca1\u771f\u5b9e\u6545\u969c\u4fe1\u606f\u7684\u566a\u97f3\u566a\u97f3\u5e93\u3002<\/p>\n<p>&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#043;<br \/>\n|                        Spring Microservice Request Gateway                        |<br \/>\n&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#043;<br \/>\n                                         |<br \/>\n                                         v<br \/>\n&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#043;<br \/>\n|               OpenTelemetry Adaptive Sampler &amp; MDC Trace Injector                 |<br \/>\n|  &#8211; Rate-limiting Sampler  &#8211; Error Mandatory Sample  &#8211; SLF4J MDC TraceId Injection     |<br \/>\n&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#043;<br \/>\n                        \/                                   \\\\<br \/>\n             [Sampled] \/                                     \\\\ [Not Sampled \/ Normal]<br \/>\n                      v                                       v<br \/>\n&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#043;               &#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#043;<br \/>\n| Lightweight Exporter to OTel Collector|            | Local Log MDC Trace Only &amp;   |<br \/>\n| (Minimal Metrics &amp; Span Export)    |               | Suppress Full Trace Transport|<br \/>\n&#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#043;               &#043;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#043;<\/p>\n<h3>1. \u73b0\u573a\u8bca\u65ad&#xff1a;OTel \u91c7\u6837\u5f00\u9500\u4e0e\u544a\u8b66\u566a\u58f0\u5ba1\u8ba1<\/h3>\n<p>\u5728\u53ef\u89c2\u6d4b\u6027\u6cbb\u7406\u7684\u521d\u671f&#xff0c;\u6392\u67e5\u7684\u7b2c\u4e00\u6b65\u662f\u91cf\u5316\u76d1\u63a7\u7cfb\u7edf\u672c\u8eab\u7684\u8d44\u6e90\u635f\u8017\u3002<\/p>\n<p>\u8bca\u65ad\u547d\u4ee4\u4e0e\u6027\u80fd\u8bc4\u4f30\u5982\u4e0b&#xff1a;<\/p>\n<p># \u76d1\u6d4b OpenTelemetry Java Agent \u5360\u7528\u7684 CPU \u4e0e\u5185\u5b58\u5f00\u9500<br \/>\ntop -hp $(pgrep -f &#034;java&#034;) | head -n 15<\/p>\n<p># \u67e5\u770b OpenTelemetry Collector \u5b9e\u4f8b\u7684\u4f20\u8f93\u4e0e\u4e22\u5f03 Metrics \u72b6\u6001<br \/>\ncurl -s http:\/\/otel-collector.internal.net:8888\/metrics | grep &#034;otelcol_processor_dropped_spans&#034;<\/p>\n<p># \u68c0\u67e5 ElasticSearch \u96c6\u7fa4\u65e5\u5747 Index \u589e\u957f\u901f\u5ea6\u4e0e\u78c1\u76d8\u5360\u7528<br \/>\ncurl -X GET &#034;http:\/\/es-cluster.internal.net:9200\/_cat\/indices?v&amp;s&#061;store.size:desc&#034; | head -n 10<\/p>\n<p>\u6570\u636e\u9732\u51fa\u4e86\u6b8b\u9177\u7684\u73b0\u5b9e&#xff1a;\u5168\u91cf Trace \u6536\u96c6\u5bfc\u81f4\u539f\u672c\u53ea\u9700\u5904\u7406 1,000 QPS \u7684\u5fae\u670d\u52a1&#xff0c;\u989d\u5916\u4ea7\u751f\u4e86\u6bcf\u79d2 20MB \u7684 Trace Data \u4f20\u8f93\u3002\u5176\u4e2d 95% \u7684 Trace \u90fd\u662f\u6210\u529f\u7684 HTTP 200 GET \u8bf7\u6c42&#xff0c;\u6ca1\u6709\u4efb\u4f55\u6392\u969c\u4ef7\u503c&#xff0c;\u5374\u767d\u767d\u70e7\u6389\u4e86\u5de8\u91cf\u7684 CPU \u8ba1\u7b97\u5468\u671f\u4e0e\u5b58\u50a8\u6210\u672c\u3002<\/p>\n<h3>2. \u751f\u4ea7\u7ea7 OpenTelemetry \u52a8\u6001\u91c7\u6837\u4e0e MDC \u6ce8\u5165\u5668<\/h3>\n<p>\u7b2c\u4e00\u7248 (MVP) \u53ef\u89c2\u6d4b\u6027\u4f53\u7cfb\u7684\u6838\u5fc3\u539f\u5219\u662f&#xff1a;\u65e5\u5fd7\u5e94\u5e26 TraceID&#xff0c;\u4f46\u8fdc\u7a0b Trace \u4f20\u8f93\u5e94\u5b9e\u65bd\u4e25\u683c\u7684\u81ea\u9002\u5e94\u91c7\u6837&#xff08;Adaptive Sampling&#xff09;\u3002\u51e1\u662f\u6210\u529f\u7684\u666e\u901a\u8bf7\u6c42&#xff0c;\u4ec5\u6309 1% \u91c7\u6837&#xff1b;\u51e1\u662f\u629b\u51fa 5xx \u5f02\u5e38\u6216\u54cd\u5e94\u8d85\u8fc7 1 \u79d2\u7684\u8bf7\u6c42&#xff0c;\u6309\u68c0\u67e5\u7ed3\u679c\u786e\u8ba4 \u5f3a\u5236\u91c7\u6837\u3002<\/p>\n<p>\u4ee5\u4e0b\u662f\u5728 Spring Boot \u670d\u52a1\u4e2d\u5b9e\u73b0\u7684\u8f7b\u91cf\u7ea7 OpenTelemetry \u91c7\u6837\u4e0e MDC \u5173\u8054\u7ec4\u4ef6&#xff1a;<\/p>\n<p>package com.example.observability.governance;<\/p>\n<p>import io.opentelemetry.api.trace.Span;<br \/>\nimport io.opentelemetry.api.trace.SpanContext;<br \/>\nimport io.opentelemetry.sdk.trace.samplers.Sampler;<br \/>\nimport io.opentelemetry.sdk.trace.samplers.SamplingDecision;<br \/>\nimport io.opentelemetry.sdk.trace.samplers.SamplingResult;<br \/>\nimport org.slf4j.Logger;<br \/>\nimport org.slf4j.LoggerFactory;<br \/>\nimport org.slf4j.MDC;<br \/>\nimport org.springframework.stereotype.Component;<\/p>\n<p>import java.util.concurrent.ThreadLocalRandom;<\/p>\n<p>\/**<br \/>\n * \u751f\u4ea7\u73af\u5883\u53ef\u89c2\u6d4b\u6027\u7b2c\u4e00\u7248&#xff1a;\u8f7b\u91cf\u7ea7\u52a8\u6001\u91c7\u6837\u4e0e MDC \u6ce8\u5165\u5668<br \/>\n *\/<br \/>\n&#064;Component<br \/>\npublic class AdaptiveObservabilitySampler implements Sampler {<br \/>\n    private static final Logger log &#061; LoggerFactory.getLogger(AdaptiveObservabilitySampler.class);<\/p>\n<p>    private static final String TRACE_ID_KEY &#061; &#034;traceId&#034;;<br \/>\n    private static final double REGULAR_SAMPLE_RATE &#061; 0.01; \/\/ \u666e\u901a\u6210\u529f\u8bf7\u6c42 1% \u91c7\u6837<\/p>\n<p>    &#064;Override<br \/>\n    public SamplingResult shouldSample(<br \/>\n            io.opentelemetry.context.Context parentContext,<br \/>\n            String traceId,<br \/>\n            String name,<br \/>\n            io.opentelemetry.api.trace.SpanKind spanKind,<br \/>\n            io.opentelemetry.api.common.Attributes attributes,<br \/>\n            java.util.List&lt;io.opentelemetry.api.trace.StatusCode&gt; parentSpans) {<\/p>\n<p>        \/\/ \u7ed1\u5b9a MDC \u53d8\u91cf&#xff0c;\u4fdd\u8bc1\u6240\u6709 SLF4J \u672c\u5730\u65e5\u5fd7\u90fd\u80fd\u5e26\u4e0a TraceID<br \/>\n        MDC.put(TRACE_ID_KEY, traceId);<\/p>\n<p>        \/\/ 1. \u4f18\u5148\u68c0\u67e5\u94fe\u8def\u662f\u5426\u5df2\u6709\u5f3a\u91c7\u6837\u6807\u8bb0<br \/>\n        Span parentSpan &#061; Span.fromContext(parentContext);<br \/>\n        SpanContext parentSpanContext &#061; parentSpan.getSpanContext();<br \/>\n        if (parentSpanContext.isValid() &amp;&amp; parentSpanContext.isSampled()) {<br \/>\n            return SamplingResult.recordAndSample();<br \/>\n        }<\/p>\n<p>        \/\/ 2. \u6838\u5fc3\u5199\u64cd\u4f5c\u6216\u5df2\u77e5\u9ad8\u5371\u63a5\u53e3 100% \u91c7\u6837<br \/>\n        if (name.contains(&#034;\/payment\/&#034;) || name.contains(&#034;\/order\/create&#034;)) {<br \/>\n            return SamplingResult.recordAndSample();<br \/>\n        }<\/p>\n<p>        \/\/ 3. \u666e\u901a\u63a5\u53e3\u6982\u7387\u91c7\u6837 (1%)<br \/>\n        if (ThreadLocalRandom.current().nextDouble() &lt; REGULAR_SAMPLE_RATE) {<br \/>\n            return SamplingResult.recordAndSample();<br \/>\n        }<\/p>\n<p>        return SamplingResult.create(SamplingDecision.DROP);<br \/>\n    }<\/p>\n<p>    &#064;Override<br \/>\n    public String getDescription() {<br \/>\n        return &#034;AdaptiveObservabilitySampler{regularRate&#061;&#034; &#043; REGULAR_SAMPLE_RATE &#043; &#034;}&#034;;<br \/>\n    }<\/p>\n<p>    public static void clearMDC() {<br \/>\n        MDC.remove(TRACE_ID_KEY);<br \/>\n    }<br \/>\n}<\/p>\n<h3>3. \u53ef\u89c2\u6d4b\u6027\u7b2c\u4e00\u7248 (MVP) \u7684\u526a\u679d\u51c6\u5219<\/h3>\n<p>\u642d\u5efa\u7b2c\u4e00\u7248\u53ef\u89c2\u6d4b\u6027\u4f53\u7cfb\u65f6&#xff0c;\u5e94\u575a\u51b3\u505a\u597d\u4ee5\u4e0b\u53d6\u820d&#xff1a;<\/p>\n<ul>\n<li>\u51c6\u5219 1&#xff1a;\u53ea\u6293\u201c\u9ec4\u91d1\u6307\u6807\u201d&#xff08;Golden Signals&#xff09;\u3002\u7b2c\u4e00\u9636\u6bb5\u53ea\u6293 Latency&#xff08;\u5ef6\u8fdf&#xff09;\u3001Traffic&#xff08;\u6d41\u91cf&#xff09;\u3001Errors&#xff08;\u9519\u8bef\u7387&#xff09;\u3001Saturation&#xff08;\u9971\u548c\u5ea6&#xff09;\u8fd9 4 \u4e2a\u6307\u6807\u3002\u4efb\u4f55\u975e\u6838\u5fc3\u7684\u81ea\u5b9a\u4e49\u4e1a\u52a1 Counter \u6682\u4e0d\u6536\u96c6&#xff0c;\u9632\u6b62 Metrics \u57fa\u6570\u7206\u70b8&#xff08;Cardinality Explosion&#xff09;\u3002<\/li>\n<li>\u51c6\u5219 2&#xff1a;Trace \u964d\u7ea7\u4e3a\u8f85\u52a9&#xff0c;\u65e5\u5fd7&#043;MDC \u624d\u662f\u57fa\u77f3\u3002\u786e\u4fdd\u5355\u4f53\u6216\u5fae\u670d\u52a1\u5185\u90e8\u7684\u6bcf\u4e00\u4e2a log.info() \u6216 log.error() \u7684\u8f93\u51fa\u683c\u5f0f\u4e2d\u90fd\u5305\u542b [%X{traceId}]\u3002\u53ea\u8981\u65e5\u5fd7\u6253\u5f97\u7cbe\u51c6\u4e14\u80fd\u901a\u8fc7 TraceID \u68c0\u7d22&#xff0c;\u5c31\u7b97\u5173\u95ed\u5168\u91cf Trace \u4f20\u8f93&#xff0c;\u4f9d\u7136\u80fd\u5728 3 \u5206\u949f\u5185\u5b8c\u6210\u5b9a\u4f4d\u3002<\/li>\n<li>\u51c6\u5219 3&#xff1a;\u544a\u8b66\u6536\u53e3\u5230\u201c\u670d\u52a1\u7ea7 SLA\u201d\u3002\u907f\u514d\u4e3a\u5355\u53f0\u673a\u5668\u7684\u77ac\u65f6 CPU \u6ce2\u52a8\u8bbe\u7f6e\u7535\u8bdd\u6216\u77ed\u4fe1\u544a\u8b66\u3002\u53ea\u6709\u5f53\u6838\u5fc3 API \u7684 P99 \u5ef6\u8fdf\u7a81\u7834\u9608\u503c&#xff0c;\u6216\u8005 5xx \u9519\u8bef\u7387\u8fde\u7eed 2 \u5206\u949f\u8d85\u8fc7 1% \u65f6&#xff0c;\u624d\u89e6\u53d1\u544a\u8b66\u3002<\/li>\n<\/ul>\n<p>\u7b2c\u4e00\u7248\u53ef\u89c2\u6d4b\u6027\u53ea\u9700\u8986\u76d6\u6838\u5fc3\u8bf7\u6c42\u3001\u5c11\u91cf\u53ef\u884c\u52a8\u7684\u544a\u8b66\u548c\u80fd\u5173\u8054\u65e5\u5fd7\u7684\u8ffd\u8e2a\u4fe1\u606f\u3002\u91c7\u6837\u7387\u3001\u9608\u503c\u548c\u4fdd\u7559\u5468\u671f\u5e94\u6309\u5b9e\u9645\u6d41\u91cf\u8c03\u6574&#xff0c;\u907f\u514d\u4e3a\u4e86\u201c\u5168\u91cf\u53ef\u89c1\u201d\u53cd\u8fc7\u6765\u6324\u5360\u4e1a\u52a1\u8d44\u6e90\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4f01\u4e1a\u540e\u7aef\u67b6\u6784\u7b2c\u4e00\u7248\u8be5\u4fdd\u7559\u54ea\u4e9b\u6838\u5fc3\u80fd\u529b\u53ef\u89c2\u6d4b\u6027\u4f53\u7cfb\u521a\u4e0a\u7ebf\u7684\u7b2c\u4e00\u5468&#xff0c;\u544a\u8b66\u7cfb\u7edf\u7684\u901a\u77e5\u97f3\u5c31\u6ca1\u6709\u505c\u8fc7&#xff1a;1 \u5206\u949f\u5185\u5f39\u51fa\u4e86 5,400 \u6761\u544a\u8b66\u3002\u7edd\u5927\u90e8\u5206\u662f\u201c\u67d0\u4e2a\u65e0\u5173\u7d27\u8981\u7684\u9759\u6001\u8d44\u6e90\u63a5\u53e3 Latency \u7a0d\u5fae\u6ce2\u52a8\u201d\u6216\u201c\u8c03\u7528\u94fe\u8def\u4e2d\u67d0\u4e2a\u975e\u6838\u5fc3 SQL \u8017\u65f6\u8d85\u8fc7 50ms\u201d\u3002<br \/>\n\u66f4\u4ee4\u4eba\u5c34\u5c2c\u7684\u662f&#xff0c;\u7531\u4e8e\u5f00\u542f\u4e86 OpenTelemetry \u7684\u5168\u91cf Trace \u91c7\u6837&#xff08;\u6309\u68c0\u67e5\u7ed3\u679c\u786e\u8ba4 Sampling&#xff09;&#xff0c;\u53ef\u89c2\u6d4b\u6027 Agent \u81ea<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[66,99,101,50,1348],"topic":[],"class_list":["post-98519","post","type-post","status-publish","format-standard","hentry","category-server","tag-ai","tag-java","tag-spring","tag-50","tag-1348"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u4f01\u4e1a\u540e\u7aef\u67b6\u6784\u7b2c\u4e00\u7248\u8be5\u4fdd\u7559\u54ea\u4e9b\u6838\u5fc3\u80fd\u529b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/98519.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u4f01\u4e1a\u540e\u7aef\u67b6\u6784\u7b2c\u4e00\u7248\u8be5\u4fdd\u7559\u54ea\u4e9b\u6838\u5fc3\u80fd\u529b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4f01\u4e1a\u540e\u7aef\u67b6\u6784\u7b2c\u4e00\u7248\u8be5\u4fdd\u7559\u54ea\u4e9b\u6838\u5fc3\u80fd\u529b\u53ef\u89c2\u6d4b\u6027\u4f53\u7cfb\u521a\u4e0a\u7ebf\u7684\u7b2c\u4e00\u5468&#xff0c;\u544a\u8b66\u7cfb\u7edf\u7684\u901a\u77e5\u97f3\u5c31\u6ca1\u6709\u505c\u8fc7&#xff1a;1 \u5206\u949f\u5185\u5f39\u51fa\u4e86 5,400 \u6761\u544a\u8b66\u3002\u7edd\u5927\u90e8\u5206\u662f\u201c\u67d0\u4e2a\u65e0\u5173\u7d27\u8981\u7684\u9759\u6001\u8d44\u6e90\u63a5\u53e3 Latency \u7a0d\u5fae\u6ce2\u52a8\u201d\u6216\u201c\u8c03\u7528\u94fe\u8def\u4e2d\u67d0\u4e2a\u975e\u6838\u5fc3 SQL \u8017\u65f6\u8d85\u8fc7 50ms\u201d\u3002 \u66f4\u4ee4\u4eba\u5c34\u5c2c\u7684\u662f&#xff0c;\u7531\u4e8e\u5f00\u542f\u4e86 OpenTelemetry \u7684\u5168\u91cf Trace \u91c7\u6837&#xff08;\u6309\u68c0\u67e5\u7ed3\u679c\u786e\u8ba4 Sampling&#xff09;&#xff0c;\u53ef\u89c2\u6d4b\u6027 Agent \u81ea\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/98519.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-31T18:16:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260831181652-6a95c5144af6f.webp\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/98519.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/98519.html\",\"name\":\"\u4f01\u4e1a\u540e\u7aef\u67b6\u6784\u7b2c\u4e00\u7248\u8be5\u4fdd\u7559\u54ea\u4e9b\u6838\u5fc3\u80fd\u529b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-08-31T18:16:53+00:00\",\"dateModified\":\"2026-08-31T18:16:53+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/98519.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/98519.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/98519.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u4f01\u4e1a\u540e\u7aef\u67b6\u6784\u7b2c\u4e00\u7248\u8be5\u4fdd\u7559\u54ea\u4e9b\u6838\u5fc3\u80fd\u529b\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u4f01\u4e1a\u540e\u7aef\u67b6\u6784\u7b2c\u4e00\u7248\u8be5\u4fdd\u7559\u54ea\u4e9b\u6838\u5fc3\u80fd\u529b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/98519.html","og_locale":"zh_CN","og_type":"article","og_title":"\u4f01\u4e1a\u540e\u7aef\u67b6\u6784\u7b2c\u4e00\u7248\u8be5\u4fdd\u7559\u54ea\u4e9b\u6838\u5fc3\u80fd\u529b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4f01\u4e1a\u540e\u7aef\u67b6\u6784\u7b2c\u4e00\u7248\u8be5\u4fdd\u7559\u54ea\u4e9b\u6838\u5fc3\u80fd\u529b\u53ef\u89c2\u6d4b\u6027\u4f53\u7cfb\u521a\u4e0a\u7ebf\u7684\u7b2c\u4e00\u5468&#xff0c;\u544a\u8b66\u7cfb\u7edf\u7684\u901a\u77e5\u97f3\u5c31\u6ca1\u6709\u505c\u8fc7&#xff1a;1 \u5206\u949f\u5185\u5f39\u51fa\u4e86 5,400 \u6761\u544a\u8b66\u3002\u7edd\u5927\u90e8\u5206\u662f\u201c\u67d0\u4e2a\u65e0\u5173\u7d27\u8981\u7684\u9759\u6001\u8d44\u6e90\u63a5\u53e3 Latency \u7a0d\u5fae\u6ce2\u52a8\u201d\u6216\u201c\u8c03\u7528\u94fe\u8def\u4e2d\u67d0\u4e2a\u975e\u6838\u5fc3 SQL \u8017\u65f6\u8d85\u8fc7 50ms\u201d\u3002 \u66f4\u4ee4\u4eba\u5c34\u5c2c\u7684\u662f&#xff0c;\u7531\u4e8e\u5f00\u542f\u4e86 OpenTelemetry \u7684\u5168\u91cf Trace \u91c7\u6837&#xff08;\u6309\u68c0\u67e5\u7ed3\u679c\u786e\u8ba4 Sampling&#xff09;&#xff0c;\u53ef\u89c2\u6d4b\u6027 Agent \u81ea","og_url":"https:\/\/www.wsisp.com\/helps\/98519.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-08-31T18:16:53+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/09\/20260831181652-6a95c5144af6f.webp"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"2 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/98519.html","url":"https:\/\/www.wsisp.com\/helps\/98519.html","name":"\u4f01\u4e1a\u540e\u7aef\u67b6\u6784\u7b2c\u4e00\u7248\u8be5\u4fdd\u7559\u54ea\u4e9b\u6838\u5fc3\u80fd\u529b - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-08-31T18:16:53+00:00","dateModified":"2026-08-31T18:16:53+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/98519.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/98519.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/98519.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"\u4f01\u4e1a\u540e\u7aef\u67b6\u6784\u7b2c\u4e00\u7248\u8be5\u4fdd\u7559\u54ea\u4e9b\u6838\u5fc3\u80fd\u529b"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/98519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=98519"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/98519\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=98519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=98519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=98519"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=98519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}