Skip to content

fix(auth): add InternalOptions.TelemetryAttributes for internal client use#13641

Merged
quartzmo merged 2 commits intogoogleapis:mainfrom
quartzmo:auth-telemetry-attributes
Jan 20, 2026
Merged

fix(auth): add InternalOptions.TelemetryAttributes for internal client use#13641
quartzmo merged 2 commits intogoogleapis:mainfrom
quartzmo:auth-telemetry-attributes

Conversation

@quartzmo
Copy link
Copy Markdown
Member

@quartzmo quartzmo requested a review from a team as a code owner January 16, 2026 23:41
@quartzmo quartzmo requested a review from a team January 16, 2026 23:41
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @quartzmo, 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 internal client options by adding a mechanism to attach static telemetry attributes to OpenTelemetry signals. This change aims to improve the observability of internal client operations by providing consistent identification across various telemetry data, such as traces and metrics, without affecting external API consumers.

Highlights

  • New TelemetryAttributes Field: Introduced a new TelemetryAttributes field of type map[string]string to the InternalOptions struct in both gRPC and HTTP transport packages.
  • OpenTelemetry Integration: This new field allows internal clients to specify telemetry attributes for OpenTelemetry signals (tracing and metrics), ensuring consistent static identity across these signals for enhanced observability.
  • Internal Use Only: The TelemetryAttributes field is explicitly marked for internal use by generated clients, similar to other fields within InternalOptions.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

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.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

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 introduces a new field TelemetryAttributes to the InternalOptions struct in both grpctransport and httptransport packages. This change allows internal clients to specify telemetry attributes for OpenTelemetry signals. The implementation is straightforward and correct, adding the field and its corresponding documentation. The changes are consistent across both packages and follow Go conventions. I've added a couple of suggestions to improve the documentation for this new field to clarify ownership of the map and prevent potential misuse, given that maps are reference types.

shollyman
shollyman previously approved these changes Jan 20, 2026
@quartzmo quartzmo requested a review from westarle January 20, 2026 19:02
@quartzmo quartzmo merged commit 3876978 into googleapis:main Jan 20, 2026
10 checks passed
@quartzmo quartzmo deleted the auth-telemetry-attributes branch January 20, 2026 20:47
quartzmo pushed a commit that referenced this pull request Jan 21, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.8.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/librarian-go@sha256:d2dee66d7c8c1d673fac26280164ea24015b79491b7f9d6ba369e6a98ab3420c
<details><summary>auth: 0.18.1</summary>

##
[0.18.1](auth/v0.18.0...auth/v0.18.1)
(2026-01-21)

### Bug Fixes

* add InternalOptions.TelemetryAttributes for internal client use
(#13641)
([3876978](38769789))

* remove singleton and restore normal usage of otelgrpc.clientHandler
(#13522)
([673d4b0](673d4b05))

</details>
krishnamd-jkp pushed a commit that referenced this pull request Jan 28, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.8.0
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/librarian-go@sha256:d2dee66d7c8c1d673fac26280164ea24015b79491b7f9d6ba369e6a98ab3420c
<details><summary>auth: 0.18.1</summary>

##
[0.18.1](auth/v0.18.0...auth/v0.18.1)
(2026-01-21)

### Bug Fixes

* add InternalOptions.TelemetryAttributes for internal client use
(#13641)
([3876978](38769789))

* remove singleton and restore normal usage of otelgrpc.clientHandler
(#13522)
([673d4b0](673d4b05))

</details>
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