ロードバランシングエクスポーター

ロードバランシングエクスポーターは、スパン、メトリクス、ログを、定義したさまざまなバックエンドにエクスポートします。

ロード バランシング エクスポータは、スパン、メトリクス、ログを複数のバックエンドにエクスポートできる OpenTelemetry Collector コンポーネントです。サポートされるパイプラインタイプは、metricstraceslogs です。

メリット

ロード バランシング エクスポータは、ルーティングポリシーを使用して、テレメトリデータを複数のバックエンドに一度に送信できます。ルーティングポリシーを使用してテレメトリデータをグループにソートし、これらのグループを特定のエンドポイントにマッピングできます。

ロード バランシング エクスポータを使用して、Collector エンドポイントを介して OpenTelemetry Collector の他の実行中のインスタンスにデータを送信することもできます。たとえば、すべてのトレースを Collector の 1 つの実行中のインスタンスに送信し、すべてのログを別の実行中のインスタンスに送信できます。この方法を使用すると、個別の Collector 環境でデータを処理または操作できます。

はじめに

ロードバランシングエクスポーターを使用するには、テレメトリデータを受信できるバックエンドのリストを提供します。

IP アドレスの静的リストまたは DNS ホスト名を指定して解決できます。各タイプのリストを使用するロード バランシング エクスポータの設定例については、「サンプル構成」を参照してください。

ルーティングキー

ロードバランシングエクスポーターは、設定された routing_key に応じて、スパン、メトリクス、ログをエクスポートできます。

routing_key は、スパン、メトリクス、ログをまとめてグループ化します。たとえば、ロード バランシング エクスポータは、同じ traceID に属するすべてのスパンを同じバックエンドに送信します。

次の表は、routing_key のオプションを示しています:

ルーティングキー

使用目的

service

ログ、スパン、メトリクス

traceID

ログ、スパン

resource

メトリクス

metric

メトリクス

デフォルトでは、ルーティングメカニズムは、トレースについては traceID、メトリクスについては service です。

サンプル構成

このセクションでは、ロードバランシングエクスポーターの設定例について詳しく説明します。

静的リスト

以下の例では、ホスト名の静的リストを使用して、別々のバックエンド用にロードバランシングエクスポーターを設定しています:

YAML
receivers:
  otlp:
    protocols:
      grpc:
        endpoint: localhost:4317

processors:

exporters:
  loadbalancing:
    routing_key: "service"
    protocol:
      otlp:
        # all options from the OTLP exporter are supported
        # except the endpoint
        timeout: 1s
    resolver:
      static:
        hostnames:
          - backend-1:4317
          - backend-2:4317
          - backend-3:4317
          - backend-4:4317
      # Notice to config a headless service DNS in Kubernetes
      # dns:
      #  hostname: otelcol-headless.observability.svc.cluster.local

service:
  pipelines:
    traces:
      receivers:
        - otlp
      processors: []
      exporters:
        - loadbalancing
    logs:
      receivers:
        - otlp
      processors: []
      exporters:
        - loadbalancing

Kubernetes リゾルバ

以下の例では、Kubernetes リゾルバのロードバランシングエクスポーターを設定しています:

YAML
receivers:
  otlp:
    protocols:
  grpc:
    endpoint: localhost:4317

processors:

exporters:
  loadbalancing:
    routing_key: "service"
    protocol:
    otlp:
        # all options from the OTLP exporter are supported
        # except the endpoint
        timeout: 1s
    resolver:
    # use k8s service resolver, if collector runs in kubernetes environment
    k8s:
        service: lb-svc.kube-public
        ports:
        - 15317
        - 16317

service:
  pipelines:
    traces:
    receivers:
        - otlp
    processors: []
    exporters:
        - loadbalancing
    logs:
    receivers:
        - otlp
    processors: []
    exporters:
        - loadbalancing

設定

次の表に、ロードバランシングエクスポーターの設定オプションを示します:

同梱

https://raw.githubusercontent.com/splunk/collector-config-tool/main/cfg-metadata/exporter/loadbalancing.yaml

トラブルシューティング

If you are a Splunk Observability Cloud customer and are not able to see your data in Splunk Observability Cloud, you can get help in the following ways.

Available to Splunk Observability Cloud customers

Available to prospective customers and free trial users

  • Ask a question and get answers through community support at Splunk Answers.

  • Join the Splunk community #observability Slack channel to communicate with customers, partners, and Splunk employees worldwide.