Skip to content

feat(bigguery): add url.domain to span tracing#12208

Merged
ldetmer merged 1 commit intomainfrom
url-domain
Mar 27, 2026
Merged

feat(bigguery): add url.domain to span tracing#12208
ldetmer merged 1 commit intomainfrom
url-domain

Conversation

@ldetmer
Copy link
Copy Markdown
Contributor

@ldetmer ldetmer commented Mar 26, 2026

This adds the url.domain attribute to http span tracing. This field should matching the proto domain if not overridden by user, otherwise it should match the user set value.

default domain
user set example

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the OpenTelemetry tracing capabilities within the BigQuery client library by introducing the url.domain attribute to HTTP spans. This addition provides valuable context for understanding the network interactions of BigQuery RPCs, making it easier to diagnose and monitor service calls, whether they target the default BigQuery endpoint or a custom one.

Highlights

  • OpenTelemetry Tracing Enhancement: The url.domain attribute has been added to HTTP span tracing for BigQuery RPC calls, providing more detailed context about the service endpoint.
  • Domain Resolution Logic: The url.domain will reflect the default BigQuery API host or a user-specified host if overridden, ensuring accurate domain information in traces.
  • Test Coverage: New unit tests were introduced to validate the correct capture and reporting of the url.domain attribute under both default and custom host configurations.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Copy Markdown
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 enhances BigQuery RPC tracing by introducing a new url.domain telemetry attribute. The HttpBigQueryRpc class now captures the domain from the resolved API host and attaches it to OpenTelemetry spans. The changes include adding a urlDomain field, initializing it in the constructor, and updating the BigQueryTelemetryTracer to define and use this new attribute. Unit tests have been added to verify the url.domain attribute for both default and custom host configurations. A review comment points out a potential issue where GenericUrl.getHost() could return null if the host lacks a scheme, leading to the silent omission of the url.domain attribute, suggesting improved validation or the use of java.net.URI for robustness.

@ldetmer ldetmer marked this pull request as ready for review March 26, 2026 14:45
@ldetmer ldetmer requested review from a team as code owners March 26, 2026 14:45
@ldetmer ldetmer merged commit 6f79c2d into main Mar 27, 2026
87 checks passed
@ldetmer ldetmer deleted the url-domain branch March 27, 2026 18:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants