This document describes how to query your trace data from BigQuery Studio. When you use BigQuery Studio, you can join your trace data with other business data.
To get started with Observability Analytics, see Query and analyze traces.
Before you begin
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
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.-
To get the permissions that you need to query a linked dataset from BigQuery, ask your administrator to grant you the BigQuery Data Viewer (
roles/bigquery.dataViewer) IAM role on your project or linked dataset. For more information about granting roles, see Manage access to projects, folders, and organizations.You might also be able to get the required permissions through custom roles or other predefined roles.
- Verify that the
linked BigQuery dataset
for the observability bucket named
_Traceexists. If the linked BigQuery dataset doesn't exist, then create it.
Run queries on BigQuery Studio
To open BigQuery from the Observability Analytics page and then query your trace data, do the following:
-
In the Google Cloud console, go to the manage_search Observability Analytics page:
If you use the search bar to find this page, then select the result whose subheading is Logging.
Enter or load a query. For more information, see Query and analyze traces.
In the toolbar, expand the menu labeled Run query or Run on BigQuery, and select Open in BigQuery.
BigQuery Studio opens. On this page, the
FROMstatement specifies the linked dataset by using the BigQuery Table path syntax. You can perform any supported actions on the query, such as editing it.If the Open in BigQuery option is disabled, then either a linked dataset doesn't exist or you don't have the necessary permissions to open and view the query in BigQuery.
On BigQuery Studio, click Run query.
Pricing
To learn about the costs associated with using BigQuery, see BigQuery pricing.
What's next
- Monitor your SQL query results with an alerting policy.
- Save and share a SQL query.
- Chart SQL query results.
- Sample SQL queries.