Kubernetes用のOpenTelemetryオペレーター

OpenTelemetryの計装ライブラリを使用して、コレクターとワークロードの自動計装を管理するKubernetesオペレーターの実装。

はじめに

OpenTelemetryオペレーターは、Kubernetesオペレーターの実装のひとつです。

Operatorは以下を管理します。

Getting started

既存のクラスターにオペレーターをインストールするには、まず cert-manager がインストールされていることを確認し、以下のコマンドを実行します。

kubectl apply -f https://github.com/open-telemetry/opentelemetry-operator/releases/latest/download/opentelemetry-operator.yaml

opentelemetry-operator のDeploymentが準備できたら、OpenTelemetryコレクター (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:
      # NOTE: v0.86.0より前では `debug` の代わりに `logging` を使用します。
      debug: {}

    service:
      pipelines:
        traces:
          receivers: [otlp]
          processors: [memory_limiter, batch]
          exporters: [debug]
EOF

より詳細な設定オプションや、OpenTelemetryの計装ライブラリを使用したワークロードの自動計装を挿入する設定については、Kubernetes用のOpenTelemetryオペレーターを参照してください。


Injecting Auto-instrumentation

An implementation of auto-instrumentation using the OpenTelemetry Operator.

Horizontal Pod Autoscaling

Configure Horizontal Pod Autoscaling with your OpenTelemetry Collector

Target Allocator

A tool to distribute targets of the PrometheusReceiver on all deployed Collector instances

Troubleshooting the OpenTelemetry Operator for Kubernetes

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.


最終更新 June 18, 2025: Results from /fix directive (d4cef507)