otel-collector

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

OpenTelemetry Collector configuration guide

OpenTelemetry Collector配置指南

Expert guidance for configuring and deploying the OpenTelemetry Collector to receive, process, and export telemetry.
OpenTelemetry Collector配置与部署专家指南,用于接收、处理和导出遥测数据。

Rules

规则

RuleDescription
receiversReceivers — OTLP, Prometheus, filelog, hostmetrics
exportersExporters — OTLP/gRPC to Dash0, debug, authentication
processorsProcessors — memory limiter, resource detection, ordering, sending queue
pipelinesPipelines — service section, per-signal configuration, connectors
deploymentDeployment — agent vs gateway patterns, deployment method selection
dash0-operatorDash0 Kubernetes Operator — automated instrumentation, Collector management, Dash0 export
collector-helm-chartCollector Helm chart — presets, modes, image selection
opentelemetry-operatorOpenTelemetry Operator — Collector CRD, auto-instrumentation, sidecar
raw-manifestsRaw Kubernetes manifests — DaemonSet, Deployment, RBAC, Docker Compose
samplingSampling — head, tail, load balancing
red-metricsRED metrics — span-derived request rate, error rate, duration histograms
规则描述
receivers接收器(Receivers)—— OTLP、Prometheus、filelog、hostmetrics
exporters导出器(Exporters)—— 向Dash0发送OTLP/gRPC数据、调试、身份验证
processors处理器(Processors)—— 内存限制器、资源检测、排序、发送队列
pipelines管道(Pipelines)—— 服务段、按信号配置、连接器
deployment部署(Deployment)—— Agent与Gateway模式、部署方式选择
dash0-operatorDash0 Kubernetes Operator —— 自动插桩、Collector管理、Dash0数据导出
collector-helm-chartCollector Helm Chart —— 预设配置、模式、镜像选择
opentelemetry-operatorOpenTelemetry Operator —— Collector CRD、自动插桩、Sidecar
raw-manifests原生Kubernetes清单 —— DaemonSet、Deployment、RBAC、Docker Compose
sampling采样(Sampling)—— 头部采样、尾部采样、负载均衡
red-metricsRED指标 —— 基于Span生成的请求率、错误率、持续时间直方图

Key principles

核心原则

  • Processor ordering matters. Place
    memory_limiter
    first in every pipeline. Use the exporter's
    sending_queue
    with
    file_storage
    instead of the
    batch
    processor. Incorrect ordering causes memory exhaustion or data loss.
  • One pipeline per signal type. Define separate pipelines for traces, metrics, and logs. Mixing signals in a single pipeline breaks processing and causes runtime errors.
  • Every declared component must appear in a pipeline. The Collector rejects configurations that declare receivers, processors, or exporters not referenced by any pipeline.
  • Consistent resource enrichment across pipelines. Apply processors that enrich resource attributes like
    resourcedetection
    and
    k8sattributes
    to every signal pipeline (traces, metrics, and logs), not just one. If one pipeline enriches telemetry with
    k8s.namespace.name
    or
    host.name
    but another does not, correlation between signals is compromised by incomplete metadata.
  • Memory safety is non-negotiable. Always configure
    memory_limiter
    in production. Without it, a burst of telemetry can cause the Collector to OOM and crash.
  • 处理器顺序至关重要。 在每个管道中优先放置
    memory_limiter
    。 使用导出器的
    sending_queue
    结合
    file_storage
    ,而非
    batch
    处理器。 错误的顺序会导致内存耗尽或数据丢失。
  • 每种信号类型对应一个管道。 为追踪(traces)、指标(metrics)和日志(logs)分别定义独立管道。 在单个管道中混合信号会破坏处理流程并导致运行时错误。
  • 所有声明的组件必须在管道中使用。 如果配置中声明了未被任何管道引用的接收器、处理器或导出器,Collector会拒绝该配置。
  • 跨管道统一资源增强。 将用于增强资源属性的处理器(如
    resourcedetection
    k8sattributes
    )应用于所有信号管道(追踪、指标、日志),而非仅单个管道。 如果一个管道用
    k8s.namespace.name
    host.name
    增强遥测数据,而另一个没有,不完整的元数据会影响信号间的关联分析。
  • 内存安全不容妥协。 生产环境中必须配置
    memory_limiter
    。 若不配置,突发的遥测数据可能导致Collector内存溢出(OOM)并崩溃。

Quick reference

快速参考

What do you need?Rule
Accept OTLP telemetry from applicationsreceivers
Scrape Prometheus endpointsreceivers
Collect log files or host metricsreceivers
Send telemetry to Dash0exporters
Configure retry, queue, or compressionexporters
Set processor orderingprocessors
Add Kubernetes or cloud metadataprocessors
Wire receivers → processors → exporterspipelines
Complete working configurationpipelines
Validate the pipeline with the debug exportercollector-helm-chart, opentelemetry-operator, raw-manifests, or dash0-operator
Deploy as DaemonSet or Deploymentraw-manifests
Deploy with Helmcollector-helm-chart
Deploy with the OTel Operatoropentelemetry-operator
Deploy with the Dash0 Operatordash0-operator
Auto-instrument applications in Kubernetesopentelemetry-operator or dash0-operator
Local development with Docker Composeraw-manifests
Reduce trace volumesampling
Keep errors and slow traces, drop the restsampling
Generate RED metrics from tracesred-metrics
需求场景对应规则
接收来自应用的OTLP遥测数据receivers
采集Prometheus端点数据receivers
收集日志文件或主机指标receivers
将遥测数据发送至Dash0exporters
配置重试、队列或压缩exporters
设置处理器顺序processors
添加Kubernetes或云元数据processors
连接接收器→处理器→导出器pipelines
完整可用配置pipelines
使用调试导出器验证管道collector-helm-chartopentelemetry-operatorraw-manifestsdash0-operator
以DaemonSet或Deployment方式部署raw-manifests
使用Helm部署collector-helm-chart
使用OTel Operator部署opentelemetry-operator
使用Dash0 Operator部署dash0-operator
在Kubernetes中自动为应用插桩opentelemetry-operatordash0-operator
使用Docker Compose进行本地开发raw-manifests
减少追踪数据量sampling
保留错误和慢追踪数据,丢弃其余数据sampling
基于追踪生成RED指标red-metrics

Official documentation

官方文档