このドキュメントでは、BigQuery Studio からトレースデータをクエリする方法について説明します。BigQuery Studio を使用すると、トレースデータを他のビジネスデータと結合できます。
オブザーバビリティ分析の使用を開始するには、トレースのクエリと分析を行うをご覧ください。
始める前に
- Google Cloud アカウントにログインします。 Google Cloudを初めて使用する場合は、 アカウントを作成して、実際のシナリオでの Google プロダクトのパフォーマンスを評価してください。新規のお客様には、ワークロードの実行、テスト、デプロイができる無料クレジット $300 分を差し上げます。
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Cloud Monitoring and Observability APIs.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator role
(
roles/resourcemanager.projectCreator), which contains theresourcemanager.projects.createpermission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
Enable the Cloud Monitoring and Observability APIs.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enablepermission. Learn how to grant roles.-
BigQuery からリンクされたデータセットにクエリを実行するために必要な権限を取得するには、プロジェクトまたはリンクされたデータセットに対する BigQuery データ閲覧者 (
roles/bigquery.dataViewer)IAM ロールを付与するよう管理者に依頼してください。ロールの付与については、プロジェクト、フォルダ、組織に対するアクセス権の管理をご覧ください。 _Traceという名前のオブザーバビリティ バケットのリンクされた BigQuery データセットが存在することを確認します。リンクされた BigQuery データセットが存在しない場合は、作成します。
BigQuery Studio でクエリを実行する
[オブザーバビリティ分析] ページから BigQuery を開き、トレースデータをクエリするには、次の操作を行います。
-
Google Cloud コンソールで、manage_search [オブザーバビリティ分析] ページに移動します。
検索バーを使用してこのページを検索する場合は、小見出しが [Logging] の結果を選択します。
クエリを入力または読み込みます。詳細については、トレースのクエリと分析をご覧ください。
ツールバーで、[クエリを実行] または [BigQuery で実行] というラベルの付いたメニューを開き、[BigQuery で開く] を選択します。
BigQuery Studio が開きます。このページの
FROMステートメントは、BigQuery のテーブルパスの構文を使用して、リンクされたデータセットを指定します。クエリに対して、編集などのサポートされているアクションを実行できます。[BigQuery で開く] オプションが無効になっている場合は、リンクされたデータセットが存在しないか、BigQuery でクエリを開いて表示するために必要な権限がありません。
BigQuery Studio で、[クエリを実行] をクリックします。
料金
BigQuery の使用に関連する費用については、BigQuery の料金をご覧ください。