| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
This reverts commit b7b9e31.
Summary of ChangesHello @diegomarquezp, 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 significantly enhances the observability capabilities of GAX by integrating a robust tracing system based on OpenTelemetry. The design emphasizes extensibility and clear separation of concerns, allowing GAX to record detailed RPC lifecycle events as spans and attributes. It introduces a mechanism to automatically enrich these traces with contextual information, providing deeper insights into client-server interactions. Highlights
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.
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
|
Sorry, something went wrong.
There was a problem hiding this comment.
This pull request introduces a new OpenTelemetry-based tracing system into GAX. Key changes include adding ApiTracerContext to provide endpoint information to tracers, enhancing EndpointContext to extract and store server addresses, and implementing TracingRecorder, TracingTracer, and TracingTracerFactory to integrate OpenTelemetry for operation and attempt spans. Review comments highlight the need to address thread-safety in TracingTracer by using ConcurrentHashMap for attributes, improve the robustness of EndpointContext's server address parsing using java.net.URL, remove a potentially problematic default implementation in TracingRecorder to enforce explicit parent span handling, standardize span naming conventions in TracingTracerFactory to align with OpenTelemetry, and correct the copyright year across several new files.
Sorry, something went wrong.
- Rename SpanHandle to GaxSpan - Simplify adding op and attempt attributes - Use HashMap instead of ConcurrentHashMap - Remove error handling (for now)
|
/gemini review |
Sorry, something went wrong.
There was a problem hiding this comment.
This pull request introduces a new tracing mechanism based on OpenTelemetry, which is a great addition for observability. However, a security concern has been identified regarding how server addresses are parsed for tracing attributes. The current implementation may leak sensitive information (such as credentials or tokens) from the endpoint URL into the tracing system if the URL contains userinfo, paths, or query parameters. A suggestion has been provided to improve the parsing logic to strip these sensitive components. Additionally, feedback has been provided to improve consistency, specifically regarding span naming conventions across different span types and enhancing integration tests for consistent attribute verification across different transport protocols.
Sorry, something went wrong.
There was a problem hiding this comment.
0
Sorry, something went wrong.
|
Sorry, something went wrong.
|
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. Let's rename the AppCentric classes as a quick follow up.
Sorry, something went wrong.
🤖 I have created a release *beep* *boop* --- <details><summary>2.67.0</summary> ## [2.67.0](v2.66.1...v2.67.0) (2026-02-18) ### Features * **observability:** introduce minimal tracing implementation ([#4105](#4105)) ([e4e5e89](e4e5e89)) ### Dependencies * Upgrade Google-Auth-Library to v1.43.0 ([#4114](#4114)) ([825298b](825298b)) * Upgrade grpc to 1.76.3 ([#4106](#4106)) ([c6555f5](c6555f5)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- <details><summary>2.67.0</summary> ## [2.67.0](googleapis/sdk-platform-java@v2.66.1...v2.67.0) (2026-02-18) ### Features * **observability:** introduce minimal tracing implementation ([#4105](googleapis/sdk-platform-java#4105)) ([0ef5c4c](googleapis/sdk-platform-java@0ef5c4c)) ### Dependencies * Upgrade Google-Auth-Library to v1.43.0 ([#4114](googleapis/sdk-platform-java#4114)) ([4a34266](googleapis/sdk-platform-java@4a34266)) * Upgrade grpc to 1.76.3 ([#4106](googleapis/sdk-platform-java#4106)) ([a5dc992](googleapis/sdk-platform-java@a5dc992)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
| Back | FazBrowse Home | New Git URL |
Summary
This PR introduces a new tracing mechanism in GAX that allows recording traces using OpenTelemetry. It provides a way of recording spans and attributes, following the existing ApiTracer class pattern with a few tracing-specific additions. The implementation is meant to be extensible to support other implementations.
New Classes
Approach
Connecting Tracer with Manager
The implementation aims to decouple AppCentricTracer from TraceManager. When a tracer starts an operation or an attempt, it requests a Span from the recorder. This handle allows the tracer to update the span (e.g., adding attributes or recording errors) to keep AppCentricTracer separated from specific recorder implementations (like OpenTelemetry's Span object).
Attribute Inference via ApiTracerContext
To provide a source of Span Attributes that are common to all operations, we introduced ApiTracerContext. This context is passed to ApiTracerFactory and contains information such as serverAddress (provided by EndpointContext). It is operated by ClientContext.
Initially, only serverAddress is contained in this class and it's meant to obtain the server.address attribute.
The class is ultimately operated by AppCentricTracer to extract the necessary attributes.
Integration Tests
A new integration test, ITOtelTracing, was added to the java-showcase module:
Note on java-bigtable downstream check
Since SkipTrailersTest mocks the tracer factory, the EndpointContext call to apiTracerFactory.withContext() returns a null factory, causing a null pointer exception when building the client context.
We expect the test to be adjusted with this change with the next release.
Confirmation in Cloud Trace