Compute@Edge ログストリーミング:Google Cloud Pub/Sub
最終更新日 2022-05-10
Fastly の リアルタイムログストリーミング機能は、Google のグローバルメッセージおよびイベントデータ取り込み製品である Cloud Pub/Sub にログファイルを送信することができます。
注意
Fastly ではサードパーティのサービスに関する直接のサポートは行っておりません。詳細については、Fastly サービスの利用規約をご参照ください。
前提条件
Fastly サービスのログエンドポイントとして Cloud Pub/Sub を追加する前に、Google Cloud Platform (GCP) アカウントに登録する必要があります。
- Google の Web サイトでサービスアカウントを作成します。
- Google Cloud コンソールの Pub/Sub セクションに移動します。画面の指示に従って API を有効化します。
- Pub/Sub トピックを作成します。
- Pub/Sub トピックに設定されたサービスアカウントに関連付けられた JSON ファイルから秘密鍵を取得します。
注意
Cloud Pub/Sub の詳細については、Google のドキュメントをご覧ください。
ログエンドポイントとして Cloud Pub/Sub を追加する
次の指示に従って、ログエンドポイントとして Cloud Pub/Sub を追加してください。
-
リモートログストリーミングの設定に関するガイドの情報をご参照ください。
ヒントOur developer documentation provides more information about logging with Compute@Edge code written in Rust, AssemblyScript, and JavaScript.
- Google Cloud Pub/Sub Create endpoint ボタンをクリックします。Google Cloud Pub/Sub エンドポイント作成ページが表示されます。
- Create a Google Cloud Pub/Sub endpoint 欄に以下のように記入します。
- In the Name field, enter the name you specified in your Compute@Edge code. For example, in our Rust code example, the name is
my_endpoint_name
. - Project ID 欄には、Google Cloud Platform プロジェクトの ID を入力します。
- Email 欄に、Pub/Sub トピックに設定されたサービスアカウントのメールアドレスを入力します。
- Topic 欄には、ログを送信先となる Pub/Sub トピックを入力します。
- Secret Key 欄には、Pub/Sub トピックに設定されたサービスアカウントに関連付けられた秘密鍵の正確な値を入力します。
- In the Name field, enter the name you specified in your Compute@Edge code. For example, in our Rust code example, the name is
- Create ボタンをクリックすると、新しいログエンドポイントが作成されます。
- Activate ボタンをクリックして設定変更をデプロイします。