Conversation
- Adds HTTP_URL_FULL_ATTRIBUTE to ObservabilityAttributes - Introduces requestUrlResolved into ApiTracer - Implements redaction logic in ObservabilityUtils - Passes tracer into HTTP/JSON transport to record the URL
Summary of ChangesHello, 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 by introducing a new Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
This pull request introduces tracing capabilities for HTTP JSON calls by integrating ApiTracer into HttpJsonCallOptions and HttpJsonClientCalls. It adds a new requestUrlResolved method to ApiTracer and SpanTracer to record the full HTTP URL. A significant part of the change is the addition of ObservabilityUtils.sanitizeUrlFull and redactSensitiveQueryValues to redact sensitive information (user info and specific query parameters like API keys or signatures) from URLs before they are recorded, aligning with OpenTelemetry semantic conventions. New tests were added to cover this sanitization logic. A review comment highlights an issue in redactSensitiveQueryValues where key-only query parameters are incorrectly modified, suggesting a fix and an additional test case.
sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/tracing/ObservabilityUtils.java
Show resolved
Hide resolved
…y parameter redaction and fixes HttpJsonClientCallsTest test failure.
Note: Following Footnote 3, the spec indicates logging implementations MAY expose a configuration to override redacted fields. This implementation does not expose this configurability to provide a consistent and optimally safe baseline out of the box.