Injecting Auto-instrumentation
An implementation of auto-instrumentation using the OpenTelemetry Operator.
OpenTelemetry Operator 是 Kubernetes Operator 的一个实现。
Operator 管理以下内容:
要在已有集群中安装 Operator,请确保已安装 cert-manager
,然后运行:
kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml
一旦 opentelemetry-operator
部署就绪,创建一个 OpenTelemetry Collector(otelcol)实例,如下所示:
$ kubectl apply -f - <<EOF
apiVersion: opentelemetry.io/v1beta1
kind: OpenTelemetryCollector
metadata:
name: simplest
spec:
config:
receivers:
otlp:
protocols:
grpc:
endpoint: 0.0.0.0:4317
http:
endpoint: 0.0.0.0:4318
processors:
memory_limiter:
check_interval: 1s
limit_percentage: 75
spike_limit_percentage: 15
batch:
send_batch_size: 10000
timeout: 10s
exporters:
# 注意:较旧版本中请使用 `logging` 替代 `debug`。
debug: {}
service:
pipelines:
traces:
receivers: [otlp]
processors: [memory_limiter, batch]
exporters: [debug]
EOF
默认情况下,opentelemetry-operator
使用的是
opentelemetry-collector
镜像。
当通过 Helm Chart 安装 Operator 时,使用的是
opentelemetry-collector-k8s
镜像。
如果你需要使用这些版本中未包含的组件,可能需要构建你自己的 Collector。
有关更多配置选项以及如何使用 OpenTelemetry 插桩库注入自动插桩,请参见 Kubernetes 专用的 OpenTelemetry Operator。
An implementation of auto-instrumentation using the OpenTelemetry Operator.
Configure Horizontal Pod Autoscaling with your OpenTelemetry Collector
A tool to distribute targets of the PrometheusReceiver on all deployed Collector instances
Contains a collection of tips for troubleshooting various aspects of the OpenTelemetry Kubernetes Operator. For example, what to do when the target allocator is failing to discover scrape targets.
Was this page helpful?
Thank you. Your feedback is appreciated!
Please let us know how we can improve this page. Your feedback is appreciated!