10.2. トレース用の APIcast の設定


3scale API のスケーラブルで信頼性の高いゲートウェイインフラストラクチャーを確保するために、トレース用に APIcast を手動で設定できます。これは、API サービスの信頼性とスケーラブルなゲートウェイインフラストラクチャーを確保するのに役立ちます。

手順

  1. APIcast インストルメンテーションの設定ファイルを作成します。

    • 設定ファイルの仕様は、NGINX インストルメンテーションライブラリーリポジトリー で定義されます。

      $ oc apply -f - <<EOF
      Copy to Clipboard Toggle word wrap
      apiVersion: v1
      kind: Secret
      metadata:
        name: otel-config
      type: Opaque
      stringData:
        config.json: |
          # "otlp" is the only supported exporter in APIcast
          exporter = "otlp"
          processor = "simple"
          [exporters.otlp]
          # Alternatively the OTEL_EXPORTER_OTLP_ENDPOINT environment variable can also be used.
          host = "${COLLECTOR_HOST}"
          port = ${COLLECTOR_PORT}
          # Optional: enable SSL, for endpoints that support it
          # use_ssl = true
          # Optional: set a filesystem path to a pem file to be used for SSL encryption
          # (when use_ssl = true)
          # ssl_cert_path = "/path/to/cert.pem"
          [processors.batch]
          max_queue_size = 2048
          schedule_delay_millis = 5000
          max_export_batch_size = 512
          [service]
          name = "apicast" # Opentelemetry resource name
      EOF
      Copy to Clipboard Toggle word wrap
  2. openTelemetry 属性を指定する APIcast カスタムリソース (CR) を定義します。CR 定義で、openTelemetry.tracingConfigSecretRef.name 属性を openTelemetry 設定の詳細を含むシークレットの名前に設定します。以下の例は、openTelemetry の設定に関するコンテンツのみを示しています。

    apiVersion: apps.3scale.net/v1alpha1
    kind: APIcast
    metadata:
      name: apicast1
    spec:
      ...
      openTelemetry:
        enabled: true
        tracingConfigSecretRef:
          name: "$NAME_OF_SECRET"
    Copy to Clipboard Toggle word wrap
トップに戻る
Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

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

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

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

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

会社概要

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

Theme

© 2025 Red Hat