Red Hat ビルドの OpenTelemetry への移行


Red Hat build of OpenTelemetry 3.8

分散トレースのための Jaeger から OpenTelemetry への移行

Red Hat OpenShift Documentation Team

概要

このドキュメントでは、Red Hat ビルドの Jaeger から Red Hat ビルドの OpenTelemetry に移行する方法について説明します。2 つの移行アプローチについて学びます。Jaeger Agent サイドカーを OpenTelemetry Collector サイドカーに置き換え、スタンドアロンの Collector デプロイメントを使用してサイドカーなしで移行することで、サイドカーでの移行を行います。プロトコルの互換性を維持するように Jaeger receiver を設定する手順、サービスアカウントおよび RBAC パーミッションの設定、サイドカーインジェクションの有効化、およびトレースを TempoStack にエクスポートするようにアプリケーショントレースエンドポイントを更新する手順が含まれます。

第1章 移行

警告

非推奨の Red Hat OpenShift 分散トレースプラットフォーム(Jaeger) 3.5 は、Red Hat がサポートする Red Hat OpenShift 分散トレースプラットフォーム(Jaeger)の最後のリリースでした。

非推奨の Red Hat OpenShift 分散トレースプラットフォーム(Jaeger) 3.5 のサポートおよびメンテナンスはすべて 2025 年 11 月 3 日に終了しました。

それでも Red Hat OpenShift 分散トレースプラットフォーム(Jaeger)を使用する場合は、分散トレースコレクションおよびストレージ用に Red Hat build of OpenTelemetry Operator および Tempo Operator に移行する必要があります。詳細は、Red Hat build of OpenTelemetry ドキュメントのMigrating"、Red Hat build of OpenTelemetry ドキュメントの Installing、および Red Hat OpenShift 分散トレースプラットフォーム(Tempo)ドキュメントの「インストール」を参照してください。

詳細は、Red Hat ナレッジベースソリューション Jaeger Deprecation and Removal in OpenShift を参照してください。

アプリケーションに Red Hat OpenShift distributed tracing platform (Jaeger) をすでに使用している場合は、OpenTelemetry オープンソースプロジェクトに基づく Red Hat build of OpenTelemetry に移行できます。

Red Hat build of OpenTelemetry は、分散システムの可観測性実現に役立つ一連の API、ライブラリー、エージェント、および計装を提供します。Red Hat build of OpenTelemetry に含まれる OpenTelemetry Collector は、Jaeger プロトコルを取り込めるため、アプリケーションの SDK を変更する必要はありません。

distributed tracing platform (Jaeger) から Red Hat build of OpenTelemetry に移行するには、トレースをシームレスにレポートするように OpenTelemetry Collector とアプリケーションを設定する必要があります。サイドカーおよびサイドカーレスデプロイメントを移行できます。

1.1. サイドカーを使った移行

Red Hat build of OpenTelemetry Operator は、デプロイメントワークロードへのサイドカー注入をサポートしているため、distributed tracing platform (Jaeger) サイドカーから Red Hat build of OpenTelemetry サイドカーに移行できます。

前提条件

  • Red Hat OpenShift distributed tracing platform (Jaeger) がクラスターで使用されている。
  • Red Hat build of OpenTelemetry がインストールされている。

手順

  1. OpenTelemetry Collector をサイドカーとして設定します。

    apiVersion: opentelemetry.io/v1beta1
    kind: OpenTelemetryCollector
    metadata:
      name: otel
      namespace: <otel-collector-namespace>
    spec:
      mode: sidecar
      config:
        receivers:
          jaeger:
            protocols:
              grpc: {}
              thrift_binary: {}
              thrift_compact: {}
              thrift_http: {}
        processors:
          batch: {}
          memory_limiter:
            check_interval: 1s
            limit_percentage: 50
            spike_limit_percentage: 30
          resourcedetection:
            detectors: [openshift]
            timeout: 2s
        exporters:
          otlp:
            endpoint: "tempo-<example>-gateway:8090" 
    1
    
            tls:
              insecure: true
        service:
          pipelines:
            traces:
              receivers: [jaeger]
              processors: [memory_limiter, resourcedetection, batch]
              exporters: [otlp]
    Copy to Clipboard Toggle word wrap
    1
    このエンドポイントは、<example> Tempo Operator を使用してデプロイされた TempoStack インスタンスのゲートウェイを指します。
  2. アプリケーションを実行するためのサービスアカウントを作成します。

    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: otel-collector-sidecar
    Copy to Clipboard Toggle word wrap
  3. 一部のプロセッサーで必要な権限のためのクラスターロールを作成します。

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
      name: otel-collector-sidecar
    rules:
      
    1
    
    - apiGroups: ["config.openshift.io"]
      resources: ["infrastructures", "infrastructures/status"]
      verbs: ["get", "watch", "list"]
    Copy to Clipboard Toggle word wrap
    1
    resourcedetectionprocessor には、インフラストラクチャーとインフラストラクチャー/ステータスに対する権限が必要です。
  4. ClusterRoleBinding を作成して、サービスアカウントの権限を設定します。

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: otel-collector-sidecar
    subjects:
    - kind: ServiceAccount
      name: otel-collector-deployment
      namespace: otel-collector-example
    roleRef:
      kind: ClusterRole
      name: otel-collector
      apiGroup: rbac.authorization.k8s.io
    Copy to Clipboard Toggle word wrap
  5. OpenTelemetry Collector をサイドカーとしてデプロイします。
  6. Deployment オブジェクトから "sidecar.jaegertracing.io/inject": "true" アノテーションを削除することで、注入された Jaeger Agent をアプリケーションから削除します。
  7. sidecar.opentelemetry.io/inject: "true" アノテーションを Deployment オブジェクトの .spec.template.metadata.annotations フィールドに追加して、OpenTelemetry サイドカーの自動注入を有効にします。
  8. 作成したサービスアカウントをアプリケーションのデプロイメントに使用します。そうすることで、プロセッサーは正しい情報を取得してトレースに追加できます。

1.2. サイドカーなしで移行

サイドカーをデプロイせずに、distributed tracing platform (Jaeger) から Red Hat build of OpenTelemetry に移行できます。

前提条件

  • Red Hat OpenShift distributed tracing platform (Jaeger) がクラスターで使用されている。
  • Red Hat build of OpenTelemetry がインストールされている。

手順

  1. OpenTelemetry Collector デプロイメントを設定します。
  2. OpenTelemetry Collector のデプロイ先となるプロジェクトを作成します。

    apiVersion: project.openshift.io/v1
    kind: Project
    metadata:
      name: observability
    Copy to Clipboard Toggle word wrap
  3. OpenTelemetry Collector インスタンスを実行するためのサービスアカウントを作成します。

    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: otel-collector-deployment
      namespace: observability
    Copy to Clipboard Toggle word wrap
  4. プロセッサーに必要な権限を設定するためのクラスターロールを作成します。

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRole
    metadata:
      name: otel-collector
    rules:
      
    1
    
      
    2
    
    - apiGroups: ["", "config.openshift.io"]
      resources: ["pods", "namespaces", "infrastructures", "infrastructures/status"]
      verbs: ["get", "watch", "list"]
    Copy to Clipboard Toggle word wrap
    1
    k8sattributesprocessor には、pods および namespace リソースに対する権限が必要です。
    2
    resourcedetectionprocessor には、infrastructures および infrastructures/status に対する権限が必要です。
  5. ClusterRoleBinding を作成して、サービスアカウントの権限を設定します。

    apiVersion: rbac.authorization.k8s.io/v1
    kind: ClusterRoleBinding
    metadata:
      name: otel-collector
    subjects:
    - kind: ServiceAccount
      name: otel-collector-deployment
      namespace: observability
    roleRef:
      kind: ClusterRole
      name: otel-collector
      apiGroup: rbac.authorization.k8s.io
    Copy to Clipboard Toggle word wrap
  6. OpenTelemetry Collector インスタンスを作成します。

    注記

    この Collector は、トレースを TempoStack インスタンスにエクスポートします。Red Hat Tempo Operator を使用して TempoStack インスタンスを作成し、正しいエンドポイントを配置する必要があります。

    apiVersion: opentelemetry.io/v1beta1
    kind: OpenTelemetryCollector
    metadata:
      name: otel
      namespace: observability
    spec:
      mode: deployment
      serviceAccount: otel-collector-deployment
      config:
        receivers:
          jaeger:
            protocols:
              grpc: {}
              thrift_binary: {}
              thrift_compact: {}
              thrift_http: {}
        processors:
          batch: {}
          k8sattributes: {}
          memory_limiter:
            check_interval: 1s
            limit_percentage: 50
            spike_limit_percentage: 30
          resourcedetection:
            detectors: [openshift]
        exporters:
          otlp:
            endpoint: "tempo-example-gateway:8090"
            tls:
              insecure: true
        service:
          pipelines:
            traces:
              receivers: [jaeger]
              processors: [memory_limiter, k8sattributes, resourcedetection, batch]
              exporters: [otlp]
    Copy to Clipboard Toggle word wrap
  7. トレースエンドポイントを OpenTelemetry Operator に指定します。
  8. トレースをアプリケーションから Jaeger に直接エクスポートする場合は、API エンドポイントを Jaeger エンドポイントから OpenTelemetry Collector エンドポイントに変更します。

    Golang を使用する jaegerexporter でトレースをエクスポートする場合の例

    exp, err := jaeger.New(jaeger.WithCollectorEndpoint(jaeger.WithEndpoint(url))) 
    1
    Copy to Clipboard Toggle word wrap

    1
    URL は OpenTelemetry Collector API エンドポイントを指します。

法律上の通知

Copyright © 2025 Red Hat, Inc.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, the Red Hat logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

Red Hat ドキュメントについて

Red Hat をお使いのお客様が、信頼できるコンテンツが含まれている製品やサービスを活用することで、イノベーションを行い、目標を達成できるようにします。 最新の更新を見る.

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

Theme

© 2026 Red Hat
トップに戻る