Skip to content

feat(bigquery): add http tracing telemetry data to Dataset and Model operations#14182

Open
westarle wants to merge 1 commit intogoogleapis:mainfrom
westarle:bigquery-trace-p1-datasets
Open

feat(bigquery): add http tracing telemetry data to Dataset and Model operations#14182
westarle wants to merge 1 commit intogoogleapis:mainfrom
westarle:bigquery-trace-p1-datasets

Conversation

@westarle
Copy link

No description provided.

@westarle westarle requested review from a team as code owners March 16, 2026 04:23
@westarle westarle marked this pull request as draft March 16, 2026 04:23
@product-auto-label product-auto-label bot added the api: bigquery Issues related to the BigQuery API. label Mar 16, 2026
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces HTTP tracing telemetry for Dataset and Model operations, which is a valuable addition for observability. The implementation is well-structured, centralizing the tracing logic into helper functions. The accompanying tests are thorough, covering various API calls and even retry scenarios, which gives confidence in the correctness of the changes. I have one minor suggestion to improve the robustness of the resource name construction.

}

func fullyQualifiedDatasetResourceName(projectID, datasetID string) string {
if strings.Contains(datasetID, "projects/") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Using strings.Contains to check for a fully qualified name format is a bit fragile. If a dataset ID could validly contain the substring projects/, this would lead to incorrect behavior. While current BigQuery dataset ID constraints make this unlikely, using strings.HasPrefix would be more robust and clearly state the assumption that the fully qualified name segment starts with projects/.

Suggested change
if strings.Contains(datasetID, "projects/") {
if strings.HasPrefix(datasetID, "projects/") {

@westarle westarle force-pushed the bigquery-trace-p1-datasets branch 8 times, most recently from 5793d52 to 645badd Compare March 17, 2026 00:03
@westarle westarle force-pushed the bigquery-trace-p1-datasets branch from 645badd to 3790802 Compare March 17, 2026 04:31
@westarle westarle marked this pull request as ready for review March 17, 2026 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api: bigquery Issues related to the BigQuery API.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant