{"id":19731,"date":"2024-11-06T17:22:34","date_gmt":"2024-11-06T09:22:34","guid":{"rendered":"https:\/\/www.yunshan.net\/blog\/?p=19731"},"modified":"2024-11-06T17:22:34","modified_gmt":"2024-11-06T09:22:34","slug":"%e8%b5%b0%e8%bf%9bopentelemetry%e6%a0%b8%e5%bf%83%ef%bc%9a%e6%8e%8c%e6%8f%a1%e5%85%88%e8%bf%9b%e7%9b%91%e6%8e%a7%e6%8a%80%e6%9c%af","status":"publish","type":"post","link":"https:\/\/www.yunshan.net\/blog\/archives\/19731.html","title":{"rendered":"\u8d70\u8fdbOpenTelemetry\u6838\u5fc3\uff1a\u638c\u63e1\u5148\u8fdb\u76d1\u63a7\u6280\u672f"},"content":{"rendered":"<p>\t\t\t\t<![CDATA[\n\n<p>OpenTelemetry\u4f5c\u4e3a\u4e00\u79cd\u65b0\u5174\u7684\u76d1\u63a7\u6280\u672f\uff0c\u6b63\u9010\u6e10\u6210\u4e3a\u73b0\u4ee3<a href=\"https:\/\/www.yunshan.net\" target=\"_blank\" style=\"color:blue\" rel=\"noopener noreferrer\">\u5e94\u7528\u6027\u80fd\u7ba1\u7406<\/a>\u548c\u76d1\u63a7\u7684\u884c\u4e1a\u6807\u51c6\u3002\u5b83\u4e0d\u4ec5\u63d0\u4f9b\u4e86\u4e00\u5957\u7edf\u4e00\u7684API\u3001SDK\u548c\u5de5\u5177\u96c6\uff0c\u8fd8\u652f\u6301\u591a\u79cd\u8bed\u8a00\u548c\u6846\u67b6\uff0c\u4f7f\u5f97\u5f00\u53d1\u8005\u80fd\u591f\u8f7b\u677e\u5730\u6536\u96c6\u3001\u5904\u7406\u548c\u5bfc\u51fa\u5e94\u7528\u4e2d\u7684\u9065\u6d4b\u6570\u636e\u3002\u672c\u6587\u5c06\u6df1\u5165\u63a2\u8ba8OpenTelemetry\u7684\u6838\u5fc3\u6982\u5ff5\u3001\u67b6\u6784\u3001\u5173\u952e\u7ec4\u4ef6\u53ca\u5176\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u7684\u4f7f\u7528\u65b9\u6cd5\uff0c\u5e2e\u52a9\u8bfb\u8005\u5168\u9762\u638c\u63e1\u8fd9\u4e00\u5148\u8fdb\u76d1\u63a7\u6280\u672f\u3002<\/p>\n\n\n\n\n<h3>OpenTelemetry\u7684\u80cc\u666f\u4e0e\u610f\u4e49<\/h3>\n\n\n\n\n<p>\u5728\u4e91\u8ba1\u7b97\u548c\u5fae\u670d\u52a1\u67b6\u6784\u76db\u884c\u7684\u4eca\u5929\uff0c\u5e94\u7528\u7684\u590d\u6742\u6027\u548c\u5206\u5e03\u5f0f\u7279\u6027\u4f7f\u5f97\u4f20\u7edf\u7684\u76d1\u63a7\u624b\u6bb5\u96be\u4ee5\u6ee1\u8db3\u9700\u6c42\u3002OpenTelemetry\u5e94\u8fd0\u800c\u751f\uff0c\u65e8\u5728\u63d0\u4f9b\u4e00\u79cd\u6807\u51c6\u5316\u3001\u8de8\u8bed\u8a00\u7684\u76d1\u63a7\u89e3\u51b3\u65b9\u6848\u3002\u5b83\u7531CNCF\uff08\u4e91\u539f\u751f\u8ba1\u7b97\u57fa\u91d1\u4f1a\uff09\u6258\u7ba1\uff0c\u5f97\u5230\u4e86\u5305\u62ecGoogle\u3001Microsoft\u3001AWS\u7b49\u4f17\u591a\u5382\u5546\u7684\u652f\u6301\u3002<\/p>\n\n\n\n\n\n\n\n\n<p align=center><img decoding=\"async\" src=\"https:\/\/www.yunshan.net\/blog\/wp-content\/uploads\/2024\/11\/7904nD8.jpg\" width=1000><\/p>\n\n\n\n\n\n\n\n\n\n<p>OpenTelemetry\u7684\u6838\u5fc3\u7406\u5ff5\u662f\u5c06\u76d1\u63a7\u3001\u8ffd\u8e2a\u548c\u65e5\u5fd7\u7b49\u529f\u80fd\u96c6\u6210\u5230\u4e00\u4e2a\u7edf\u4e00\u7684\u6846\u67b6\u4e2d\uff0c\u7b80\u5316\u4e86\u5f00\u53d1\u8005\u7684\u5de5\u4f5c\u6d41\u7a0b\uff0c\u63d0\u9ad8\u4e86\u76d1\u63a7\u6570\u636e\u7684\u51c6\u786e\u6027\u548c\u4e00\u81f4\u6027\u3002<\/p>\n\n\n\n\n<h3>\u6838\u5fc3\u6982\u5ff5<\/h3>\n\n\n\n\n<h4>\u9065\u6d4b\u6570\u636e<\/h4>\n\n\n\n\n<p>\u9065\u6d4b\u6570\u636e\u662fOpenTelemetry\u5904\u7406\u7684\u6838\u5fc3\u5bf9\u8c61\uff0c\u4e3b\u8981\u5305\u62ec\u4ee5\u4e0b\u4e09\u7c7b\uff1a<\/p>\n\n\n\n\n<ol>\n\n\n<li><strong>Metrics\uff08\u6307\u6807\uff09<\/strong>\uff1a\u7528\u4e8e\u8861\u91cf\u5e94\u7528\u6027\u80fd\u7684\u5404\u79cd\u6570\u503c\uff0c\u5982CPU\u4f7f\u7528\u7387\u3001\u5185\u5b58\u5360\u7528\u3001\u8bf7\u6c42\u5ef6\u8fdf\u7b49\u3002<\/li>\n\n\n\n\n<li><strong>Traces\uff08\u8ffd\u8e2a\uff09<\/strong>\uff1a\u8bb0\u5f55\u8bf7\u6c42\u5728\u7cfb\u7edf\u4e2d\u7684\u6d41\u8f6c\u8def\u5f84\uff0c\u5e2e\u52a9\u5f00\u53d1\u8005\u5b9a\u4f4d\u6027\u80fd\u74f6\u9888\u548c\u6545\u969c\u70b9\u3002<\/li>\n\n\n\n\n<li><strong>Logs\uff08\u65e5\u5fd7\uff09<\/strong>\uff1a\u5e94\u7528\u8fd0\u884c\u8fc7\u7a0b\u4e2d\u4ea7\u751f\u7684\u5404\u79cd\u4e8b\u4ef6\u548c\u72b6\u6001\u4fe1\u606f\u3002<\/li>\n\n\n<\/ol>\n\n\n\n\n<h4>Context\uff08\u4e0a\u4e0b\u6587\uff09<\/h4>\n\n\n\n\n<p>Context\u662fOpenTelemetry\u4e2d\u7528\u4e8e\u4f20\u9012\u9065\u6d4b\u6570\u636e\u7684\u5173\u952e\u673a\u5236\u3002\u5b83\u80fd\u591f\u5728\u4e0d\u540c\u7684\u670d\u52a1\u548c\u7ec4\u4ef6\u4e4b\u95f4\u4f20\u9012\u8ffd\u8e2a\u4fe1\u606f\u548c\u6307\u6807\u6570\u636e\uff0c\u786e\u4fdd\u6570\u636e\u7684\u5b8c\u6574\u6027\u548c\u4e00\u81f4\u6027\u3002<\/p>\n\n\n\n\n<h4>Instrumentation\uff08\u4eea\u8868\u5316\uff09<\/h4>\n\n\n\n\n<p>Instrumentation\u662f\u6307\u5c06OpenTelemetry\u7684\u76d1\u63a7\u4ee3\u7801\u5d4c\u5165\u5230\u5e94\u7528\u4e2d\u7684\u8fc7\u7a0b\u3002\u901a\u8fc7\u4eea\u8868\u5316\uff0c\u5e94\u7528\u80fd\u591f\u5728\u8fd0\u884c\u65f6\u81ea\u52a8\u6536\u96c6\u548c\u53d1\u9001\u9065\u6d4b\u6570\u636e\u3002<\/p>\n\n\n\n\n<h3>\u67b6\u6784\u4e0e\u7ec4\u4ef6<\/h3>\n\n\n\n\n<p>OpenTelemetry\u7684\u67b6\u6784\u53ef\u4ee5\u5206\u4e3a\u4ee5\u4e0b\u51e0\u4e2a\u4e3b\u8981\u7ec4\u4ef6\uff1a<\/p>\n\n\n\n\n<h4>API<\/h4>\n\n\n\n\n<p>API\u5c42\u63d0\u4f9b\u4e86\u7edf\u4e00\u7684\u63a5\u53e3\uff0c\u7528\u4e8e\u751f\u6210\u548c\u6536\u96c6\u9065\u6d4b\u6570\u636e\u3002\u5b83\u652f\u6301\u591a\u79cd\u7f16\u7a0b\u8bed\u8a00\uff0c\u5982Java\u3001Python\u3001Go\u7b49\uff0c\u786e\u4fdd\u4e86\u8de8\u8bed\u8a00\u7684\u4e00\u81f4\u6027\u3002<\/p>\n\n\n\n\n<h4>SDK<\/h4>\n\n\n\n\n<p>SDK\u662fAPI\u7684\u5177\u4f53\u5b9e\u73b0\uff0c\u8d1f\u8d23\u6570\u636e\u7684\u91c7\u96c6\u3001\u5904\u7406\u548c\u5bfc\u51fa\u3002\u6bcf\u4e2a\u652f\u6301\u7684\u8bed\u8a00\u90fd\u6709\u5bf9\u5e94\u7684SDK\uff0c\u63d0\u4f9b\u4e86\u4e30\u5bcc\u7684\u914d\u7f6e\u9009\u9879\u548c\u6269\u5c55\u80fd\u529b\u3002<\/p>\n\n\n\n\n<h4>Exporter<\/h4>\n\n\n\n\n<p>Exporter\u8d1f\u8d23\u5c06\u6536\u96c6\u5230\u7684\u9065\u6d4b\u6570\u636e\u53d1\u9001\u5230\u540e\u7aef\u5b58\u50a8\u6216\u5206\u6790\u7cfb\u7edf\uff0c\u5982<a href=\"https:\/\/www.yunshan.net\" target=\"_blank\" style=\"color:blue\" rel=\"noopener noreferrer\">Prometheus<\/a>\u3001Jaeger\u3001ELK Stack\u7b49\u3002OpenTelemetry\u652f\u6301\u591a\u79cdExporter\uff0c\u6ee1\u8db3\u4e0d\u540c\u7528\u6237\u7684\u9700\u6c42\u3002<\/p>\n\n\n\n\n<h4>Collector<\/h4>\n\n\n\n\n<p>Collector\u662f\u4e00\u4e2a\u72ec\u7acb\u7684\u670d\u52a1\uff0c\u7528\u4e8e\u63a5\u6536\u3001\u5904\u7406\u548c\u8f6c\u53d1\u9065\u6d4b\u6570\u636e\u3002\u5b83\u63d0\u4f9b\u4e86\u6570\u636e\u8fc7\u6ee4\u3001\u8f6c\u6362\u548c\u805a\u5408\u7b49\u529f\u80fd\uff0c\u7b80\u5316\u4e86\u6570\u636e\u7ba1\u7406\u548c\u5206\u6790\u7684\u5de5\u4f5c\u3002<\/p>\n\n\n\n\n<h3>\u5b9e\u9645\u5e94\u7528<\/h3>\n\n\n\n\n<h4>\u5b89\u88c5\u4e0e\u914d\u7f6e<\/h4>\n\n\n\n\n<p>\u4ee5Python\u4e3a\u4f8b\uff0c\u9996\u5148\u9700\u8981\u5b89\u88c5OpenTelemetry\u7684\u5e93\uff1a<\/p>\n\n\n\n\n<pre><code class=\"language-bash\">pip install opentelemetry-api opentelemetry-sdk opentelemetry-exporter-otlp<br \/>\n<\/code><\/pre>\n\n\n\n\n<p>\u7136\u540e\uff0c\u914d\u7f6eSDK\u548cExporter\uff1a<\/p>\n\n\n\n\n<pre><code class=\"language-python\">from opentelemetry import trace<br \/>\nfrom opentelemetry.sdk.trace import TracerProvider<br \/>\nfrom opentelemetry.sdk.trace.export import BatchSpanProcessor<br \/>\nfrom opentelemetry.exporter.otlp.proto.grpc.trace_exporter import OTLPSpanExporter<br \/>\n<br \/>\n# \u8bbe\u7f6eTracerProvider<br \/>\nprovider = TracerProvider()<br \/>\ntrace.set_tracer_provider(provider)<br \/>\n<br \/>\n# \u914d\u7f6eOTLPExporter<br \/>\notlp_exporter = OTLPSpanExporter(endpoint=&quot;localhost:4317&quot;)<br \/>\nspan_processor = BatchSpanProcessor(otlp_exporter)<br \/>\nprovider.add_span_processor(span_processor)<br \/>\n<br \/>\n# \u83b7\u53d6Tracer<br \/>\ntracer = trace.get_tracer(__name__)<br \/>\n<\/code><\/pre>\n\n\n\n\n<h4>\u6570\u636e\u6536\u96c6<\/h4>\n\n\n\n\n<p>\u901a\u8fc7Tracer\u521b\u5efaSpan\uff0c\u8bb0\u5f55\u8ffd\u8e2a\u4fe1\u606f\uff1a<\/p>\n\n\n\n\n<pre><code class=\"language-python\">with tracer.start_as_current_span(&quot;example-span&quot;) as span:<br \/>\n    span.set_attribute(&quot;example-attribute&quot;, &quot;value&quot;)<br \/>\n    # \u6267\u884c\u4e1a\u52a1\u903b\u8f91<br \/>\n<\/code><\/pre>\n\n\n\n\n<h4>\u6307\u6807\u6536\u96c6<\/h4>\n\n\n\n\n<p>\u4f7f\u7528Meter\u548cMetric\u8bb0\u5f55\u6307\u6807\u6570\u636e\uff1a<\/p>\n\n\n\n\n<pre><code class=\"language-python\">from opentelemetry import metrics<br \/>\nfrom opentelemetry.sdk.metrics import MeterProvider<br \/>\nfrom opentelemetry.sdk.metrics.export import PeriodicExportingMetricReader<br \/>\nfrom opentelemetry.exporter.otlp.proto.grpc.metric_exporter import OTLPMetricExporter<br \/>\n<br \/>\n# \u8bbe\u7f6eMeterProvider<br \/>\nprovider = MeterProvider()<br \/>\nmetrics.set_meter_provider(provider)<br \/>\n<br \/>\n# \u914d\u7f6eOTLPMetricExporter<br \/>\notlp_metric_exporter = OTLPMetricExporter(endpoint=&quot;localhost:4317&quot;)<br \/>\nmetric_reader = PeriodicExportingMetricReader(otlp_metric_exporter)<br \/>\nprovider.add_metric_reader(metric_reader)<br \/>\n<br \/>\n# \u83b7\u53d6Meter<br \/>\nmeter = metrics.get_meter(__name__)<br \/>\n<br \/>\n# \u521b\u5efa\u6307\u6807<br \/>\ncounter = meter.create_counter(&quot;example_counter&quot;, description=&quot;Example counter&quot;)<br \/>\n<br \/>\n# \u8bb0\u5f55\u6307\u6807<br \/>\ncounter.add(1, {&quot;example-label&quot;: &quot;value&quot;})<br \/>\n<\/code><\/pre>\n\n\n\n\n<h3>\u9ad8\u7ea7\u7279\u6027<\/h3>\n\n\n\n\n<h4>\u81ea\u5b9a\u4e49Instrumentation<\/h4>\n\n\n\n\n<p>OpenTelemetry\u5141\u8bb8\u5f00\u53d1\u8005\u81ea\u5b9a\u4e49Instrumentation\uff0c\u4ee5\u6ee1\u8db3\u7279\u5b9a\u9700\u6c42\u3002\u4f8b\u5982\uff0c\u53ef\u4ee5\u901a\u8fc7CallableWrapper\u5c01\u88c5\u4e1a\u52a1\u65b9\u6cd5\uff0c\u81ea\u52a8\u521b\u5efa\u548c\u7ed3\u675fSpan\uff1a<\/p>\n\n\n\n\n<pre><code class=\"language-python\">from opentelemetry.instrumentation.instrumentor import BaseInstrumentor<br \/>\n<br \/>\nclass CustomInstrumentor(BaseInstrumentor):<br \/>\n    def instrument(self, kwargs):<br \/>\n        # \u81ea\u5b9a\u4e49\u4eea\u8868\u5316\u903b\u8f91<br \/>\n        pass<br \/>\n<br \/>\n    def uninstrument(self, kwargs):<br \/>\n        # \u6e05\u7406\u4eea\u8868\u5316\u903b\u8f91<br \/>\n        pass<br \/>\n<br \/>\n# \u4f7f\u7528\u81ea\u5b9a\u4e49Instrumentor<br \/>\ninstrumentor = CustomInstrumentor()<br \/>\ninstrumentor.instrument()<br \/>\n<\/code><\/pre>\n\n\n\n\n<h4>\u6570\u636e\u8fc7\u6ee4\u4e0e\u8f6c\u6362<\/h4>\n\n\n\n\n<p>Collector\u63d0\u4f9b\u4e86\u5f3a\u5927\u7684\u6570\u636e\u5904\u7406\u80fd\u529b\uff0c\u53ef\u4ee5\u901a\u8fc7\u914d\u7f6e\u6587\u4ef6\u5b9a\u4e49\u6570\u636e\u8fc7\u6ee4\u548c\u8f6c\u6362\u89c4\u5219\u3002\u4f8b\u5982\uff0c\u8fc7\u6ee4\u6389\u7279\u5b9a\u6807\u7b7e\u7684Span\uff1a<\/p>\n\n\n\n\n<pre><code class=\"language-yaml\">receivers:<br \/>\n  otlp:<br \/>\n    protocols:<br \/>\n      grpc:<br \/>\n      http:<br \/>\n<br \/>\nprocessors:<br \/>\n  filter:<br \/>\n    metrics:<br \/>\n      include:<br \/>\n        match_type: strict<br \/>\n        metric_names:<br \/>\n          - &quot;example_metric&quot;<br \/>\n    traces:<br \/>\n      include:<br \/>\n        match_type: strict<br \/>\n        span_names:<br \/>\n          - &quot;example_span&quot;<br \/>\n<br \/>\nexporters:<br \/>\n  otlp:<br \/>\n    endpoint: &quot;localhost:4317&quot;<br \/>\n<br \/>\nservice:<br \/>\n  pipelines:<br \/>\n    traces:<br \/>\n      receivers: [otlp]<br \/>\n      processors: [filter]<br \/>\n      exporters: [otlp]<br \/>\n    metrics:<br \/>\n      receivers: [otlp]<br \/>\n      processors: [filter]<br \/>\n      exporters: [otlp]<br \/>\n<\/code><\/pre>\n\n\n\n\n<h3>\u6700\u4f73\u5b9e\u8df5<\/h3>\n\n\n\n\n<h4>\u6027\u80fd\u4f18\u5316<\/h4>\n\n\n\n\n<p>\u5728\u4f7f\u7528OpenTelemetry\u65f6\uff0c\u9700\u8981\u6ce8\u610f\u6027\u80fd\u5f71\u54cd\u3002\u4ee5\u4e0b\u662f\u4e00\u4e9b\u4f18\u5316\u5efa\u8bae\uff1a<\/p>\n\n\n\n\n<ol>\n\n\n<li><strong>\u91c7\u6837\u7b56\u7565<\/strong>\uff1a\u5408\u7406\u914d\u7f6e\u91c7\u6837\u7387\uff0c\u907f\u514d\u6536\u96c6\u8fc7\u591a\u65e0\u7528\u7684\u6570\u636e\u3002<\/li>\n\n\n\n\n<li><strong>\u5f02\u6b65\u5904\u7406<\/strong>\uff1a\u4f7f\u7528\u5f02\u6b65Exporter\uff0c\u51cf\u5c11\u5bf9\u4e3b\u7ebf\u7a0b\u7684\u5f71\u54cd\u3002<\/li>\n\n\n\n\n<li><strong>\u8d44\u6e90\u9650\u5236<\/strong>\uff1a\u9650\u5236Collector\u548cExporter\u7684\u8d44\u6e90\u4f7f\u7528\uff0c\u9632\u6b62\u8d44\u6e90\u8017\u5c3d\u3002<\/li>\n\n\n<\/ol>\n\n\n\n\n<h4>\u5b89\u5168\u6027\u8003\u8651<\/h4>\n\n\n\n\n<p>\u5728\u4f20\u8f93\u9065\u6d4b\u6570\u636e\u65f6\uff0c\u9700\u8981\u786e\u4fdd\u6570\u636e\u7684\u5b89\u5168\u6027\uff1a<\/p>\n\n\n\n\n<ol>\n\n\n<li><strong>\u52a0\u5bc6\u4f20\u8f93<\/strong>\uff1a\u4f7f\u7528TLS\u52a0\u5bc6Exporter\u4e0e\u540e\u7aef\u670d\u52a1\u4e4b\u95f4\u7684\u901a\u4fe1\u3002<\/li>\n\n\n\n\n<li><strong>\u8bbf\u95ee\u63a7\u5236<\/strong>\uff1a\u914d\u7f6e\u9002\u5f53\u7684\u8bbf\u95ee\u63a7\u5236\u7b56\u7565\uff0c\u9632\u6b62\u672a\u6388\u6743\u8bbf\u95ee\u3002<\/li>\n\n\n<\/ol>\n\n\n\n\n<h4><a href=\"https:\/\/www.yunshan.net\" target=\"_blank\" style=\"color:blue\" rel=\"noopener noreferrer\">\u53ef\u89c2\u6d4b\u6027\u5e73\u53f0<\/a>\u96c6\u6210<\/h4>\n\n\n\n\n<p>OpenTelemetry\u53ef\u4ee5\u4e0e\u73b0\u6709\u7684<a href=\"https:\/\/www.yunshan.net\" target=\"_blank\" style=\"color:blue\" rel=\"noopener noreferrer\">\u53ef\u89c2\u6d4b\u6027\u5e73\u53f0<\/a>\u65e0\u7f1d\u96c6\u6210\uff0c\u5982<a href=\"https:\/\/www.yunshan.net\" target=\"_blank\" style=\"color:blue\" rel=\"noopener noreferrer\">Prometheus<\/a>\u3001Grafana\u3001Jaeger\u7b49\u3002\u901a\u8fc7\u8fd9\u4e9b\u5e73\u53f0\uff0c\u53ef\u4ee5\u5b9e\u73b0\u5bf9\u5e94\u7528\u6027\u80fd\u7684\u5168\u9762\u76d1\u63a7\u548c\u5206\u6790\u3002<\/p>\n\n\n\n\n<h3>\u672a\u6765\u5c55\u671b<\/h3>\n\n\n\n\n<p>OpenTelemetry\u4f5c\u4e3a\u4e00\u4e2a\u5f00\u6e90\u9879\u76ee\uff0c\u6b63\u5904\u4e8e\u5feb\u901f\u53d1\u5c55\u548c\u5b8c\u5584\u4e2d\u3002\u672a\u6765\uff0c\u5b83\u5c06\u8fdb\u4e00\u6b65\u63d0\u5347\u8de8\u8bed\u8a00\u548c\u8de8\u5e73\u53f0\u7684\u517c\u5bb9\u6027\uff0c\u589e\u52a0\u66f4\u591a\u7684Instrumentation\u548cExporter\u652f\u6301\uff0c\u63d0\u4f9b\u66f4\u5f3a\u5927\u7684\u6570\u636e\u5904\u7406\u548c\u5206\u6790\u80fd\u529b\u3002<\/p>\n\n\n\n\n<p>\u6b64\u5916\uff0c\u968f\u7740\u4e91\u539f\u751f\u6280\u672f\u7684\u4e0d\u65ad\u6f14\u8fdb\uff0cOpenTelemetry\u6709\u671b\u6210\u4e3a\u4e91\u539f\u751f\u5e94\u7528\u76d1\u63a7\u7684\u6807\u914d\u5de5\u5177\uff0c\u4e3a\u5f00\u53d1\u8005\u63d0\u4f9b\u66f4\u52a0\u4fbf\u6377\u548c\u9ad8\u6548\u7684\u76d1\u63a7\u89e3\u51b3\u65b9\u6848\u3002<\/p>\n\n\n\n\n<h3>\u603b\u7ed3<\/h3>\n\n\n\n\n<p>OpenTelemetry\u4ee5\u5176\u6807\u51c6\u5316\u3001\u8de8\u8bed\u8a00\u548c\u53ef\u6269\u5c55\u7684\u7279\u70b9\uff0c\u6b63\u5728\u6210\u4e3a\u73b0\u4ee3\u5e94\u7528\u76d1\u63a7\u7684\u9996\u9009\u6280\u672f\u3002\u901a\u8fc7\u672c\u6587\u7684\u4ecb\u7ecd\uff0c\u8bfb\u8005\u53ef\u4ee5\u5168\u9762\u4e86\u89e3OpenTelemetry\u7684\u6838\u5fc3\u6982\u5ff5\u3001\u67b6\u6784\u3001\u5173\u952e\u7ec4\u4ef6\u53ca\u5176\u5728\u5b9e\u9645\u5e94\u7528\u4e2d\u7684\u4f7f\u7528\u65b9\u6cd5\u3002\u638c\u63e1OpenTelemetry\uff0c\u4e0d\u4ec5\u80fd\u591f\u63d0\u5347\u5e94\u7528\u7684\u76d1\u63a7\u80fd\u529b\uff0c\u8fd8\u80fd\u4e3a\u540e\u7eed\u7684\u6027\u80fd\u4f18\u5316\u548c\u6545\u969c\u6392\u67e5\u63d0\u4f9b\u5f3a\u6709\u529b\u7684\u652f\u6301\u3002\u5e0c\u671b\u672c\u6587\u80fd\u591f\u5e2e\u52a9\u8bfb\u8005\u987a\u5229\u8d70\u8fdbOpenTelemetry\u7684\u4e16\u754c\uff0c\u638c\u63e1\u8fd9\u4e00\u5148\u8fdb\u7684\u76d1\u63a7\u6280\u672f\u3002<\/p>\n\n\n]]>\t\t<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\t\t\t\t<![CDATA[]]>\t\t<\/p>\n","protected":false},"author":5,"featured_media":19732,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-19731","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-discussion"],"_links":{"self":[{"href":"https:\/\/www.yunshan.net\/blog\/wp-json\/wp\/v2\/posts\/19731","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.yunshan.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.yunshan.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.yunshan.net\/blog\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/www.yunshan.net\/blog\/wp-json\/wp\/v2\/comments?post=19731"}],"version-history":[{"count":0,"href":"https:\/\/www.yunshan.net\/blog\/wp-json\/wp\/v2\/posts\/19731\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.yunshan.net\/blog\/wp-json\/wp\/v2\/media\/19732"}],"wp:attachment":[{"href":"https:\/\/www.yunshan.net\/blog\/wp-json\/wp\/v2\/media?parent=19731"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.yunshan.net\/blog\/wp-json\/wp\/v2\/categories?post=19731"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.yunshan.net\/blog\/wp-json\/wp\/v2\/tags?post=19731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}