検索

第11章 移行

download PDF
重要

Red Hat OpenShift distributed tracing platform (Jaeger) は、非推奨の機能です。非推奨の機能は依然として OpenShift Container Platform に含まれており、引き続きサポートされますが、本製品の今後のリリースで削除されるため、新規デプロイメントでの使用は推奨されません。

OpenShift Container Platform で非推奨となったか、削除された主な機能の最新の一覧は、OpenShift Container Platform リリースノートの 非推奨および削除された機能セクションを参照してください。

アプリケーションに 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/v1alpha1
    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.