第11章 移行


警告

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

Red Hat OpenShift 分散トレースプラットフォーム 3.5 では、Jaeger および Elasticsearch のサポートは非推奨となりました。

Red Hat OpenShift 分散トレースプラットフォーム(Jaeger)のサポートは 2025 年 11 月 3 日に終了します。

Red Hat OpenShift distributed tracing platform Operator (Jaeger) は、今後のリリースで redhat-operators カタログから 削除される予定 です。詳細は、Red Hat ナレッジベースソリューション Jaeger Deprecation and Removal in OpenShift を参照してください。

分散トレーシングの収集と保存を行うには、Red Hat build of OpenTelemetry Operator と Tempo Operator に移行する必要があります。詳細は、Red Hat build of OpenTelemetry ドキュメントの「移行」、Red Hat build of OpenTelemetry ドキュメントの「インストール」、および distributed tracing platform (Tempo) ドキュメントの「インストール」を参照してください。

アプリケーションに 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 とアプリケーションを設定する必要があります。サイドカーおよびサイドカーレスデプロイメントを移行できます。

11.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]
    1
    このエンドポイントは、<example> Tempo Operator を使用してデプロイされた TempoStack インスタンスのゲートウェイを指します。
  2. アプリケーションを実行するためのサービスアカウントを作成します。

    apiVersion: v1
    kind: ServiceAccount
    metadata:
      name: otel-collector-sidecar
  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"]
    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
  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. 作成したサービスアカウントをアプリケーションのデプロイメントに使用します。そうすることで、プロセッサーは正しい情報を取得してトレースに追加できます。
Red Hat logoGithubRedditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

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

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

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

会社概要

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

© 2024 Red Hat, Inc.