GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(o11y): Introduce `rpc.system.name` and `rpc.method` in gRPC by diegomarquezp · Pull Request #4121 · googleapis/sdk-platform-java

This repository was archived by the owner on Oct 29, 2026. It is now read-only.

Conversation

@diegomarquezp

@diegomarquezp diegomarquezp commented Feb 25, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

This PR introduces the rpc.system.name and rpc.method span attributes in gRPC.

To achieve this, all Traced*Callable classes were modified with a constructor overload that accepts an ApiTracerContext instance. Such an instance will be preferred over SpanName when deciding which (also newly introduced) overload of ApiTracerFactory.newTracer() will be called.

The new method in ApiTracerFactory, newTracer(ApiTracer parent, ApiTracerContext tracerContext, OperationType operationType) will by default merge the existing factory's context with the new one and simply create a new SpanName.

However, the logic in SpanTracerFactory will use the context to create the span name directly.

The rpc.system.name and rpc.method properties are obtained from GrpcCallableFactory and stored in ApiTracerContext, which now holds the regexes for parsing client and method names (used when building SpanNames).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@product-auto-label product-auto-label Bot added the size: m Pull request size is medium. label Feb 25, 2026
@gemini-code-assist

gemini-code-assist Bot commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @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 introduces significant improvements to the observability framework by enriching tracing contexts with RPC system and method information. It refactors the tracing mechanism to be more flexible and less dependent on specific span naming conventions, allowing for better integration with standardized observability practices. The changes streamline how RPC details are captured and propagated through the tracing system, enhancing the clarity and utility of generated traces.

Highlights

  • Enhanced Tracing Context: The ApiTracerContext has been significantly enhanced to include rpc.system.name and rpc.method attributes, along with clientName and methodName. This allows for more granular and standardized observability data in tracing spans.
  • Decoupling Tracing from SpanName: The tracing mechanism no longer directly relies on the SpanName object. Instead, ApiTracerFactory and related callable wrappers now receive an ApiTracerFactory that is pre-configured with the necessary context, including RPC system and method details.
  • Automated RPC Context Extraction: New static factory methods (fromGrpcMethodName and fromHttpJsonMethodName) have been added to ApiTracerContext to automatically parse full method names (gRPC or HTTP/JSON) and extract the rpcSystem, rpcMethod, clientName, and methodName for tracing.
  • Refactored Callable Factories: Both GrpcCallableFactory and HttpJsonCallableFactory have been updated to utilize the new ApiTracerContext for creating tracers, simplifying the tracing setup within these factories and removing redundant logic for extracting method names.
Changelog
  • gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/GrpcCallableFactory.java
    • Removed InternalApi and SpanName related imports.
    • Removed the FULL_METHOD_NAME_REGEX pattern and its usage.
    • Updated various create*Callable methods to use a new getTracerFactory helper method for obtaining ApiTracerFactory instances.
    • Introduced a new private static method getTracerFactory to construct ApiTracerContext from gRPC method descriptors.
  • gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonCallableFactory.java
    • Removed InternalApi and SpanName related imports.
    • Removed the FULL_METHOD_NAME_REGEX pattern and its usage.
    • Updated createUnaryCallable to use a new getTracerFactory helper method.
    • Introduced a new private static method getTracerFactory to construct ApiTracerContext from HTTP/JSON method descriptors.
  • gax-java/gax/src/main/java/com/google/api/gax/tracing/ApiTracerContext.java
    • Added new fields: rpcSystem, rpcMethod, clientName, and methodName.
    • Updated getAttemptAttributes to include rpc.system.name and rpc.method.
    • Added merge method for combining ApiTracerContext instances.
    • Introduced static factory methods fromGrpcMethodName and fromHttpJsonMethodName for parsing method names.
    • Added corresponding builder methods for the new fields.
  • gax-java/gax/src/main/java/com/google/api/gax/tracing/ApiTracerFactory.java
    • Modified the newTracer method signature to remove the SpanName parameter.
  • gax-java/gax/src/main/java/com/google/api/gax/tracing/BaseApiTracerFactory.java
    • Updated the newTracer method signature to align with the ApiTracerFactory interface.
  • gax-java/gax/src/main/java/com/google/api/gax/tracing/ObservabilityAttributes.java
    • Added new constants RPC_SYSTEM_NAME_ATTRIBUTE and RPC_METHOD_ATTRIBUTE.
  • gax-java/gax/src/main/java/com/google/api/gax/tracing/SpanTracerFactory.java
    • Modified the newTracer method signature to remove the SpanName parameter.
    • Updated the attemptSpanName calculation to use apiTracerContext fields.
    • Modified withContext to merge the provided context with the existing apiTracerContext.
  • gax-java/gax/src/main/java/com/google/api/gax/tracing/TracedUnaryCallable.java
    • Removed the spanName field and its usage.
    • Updated the constructor and futureCall method to no longer accept or use SpanName.
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. ↩

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot]
gemini-code-assist Bot reviewed Feb 25, 2026
View reviewed changes

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

Copy link
Copy Markdown
Contributor

There was a problem hiding this 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 significant and beneficial refactoring to the tracing infrastructure. By replacing the explicit SpanName with a more structured ApiTracerContext carried by ApiTracerFactory, the code becomes more maintainable and extensible. The introduction of rpc.system.name and rpc.method attributes aligns with modern observability practices.

However, there are a couple of points that need attention:

  1. Missing Tests (Critical): The PR adds new logic (e.g., in ApiTracerContext) and refactors existing components, but it lacks corresponding unit tests. The repository's contribution guidelines (line 148: Testing: All new logic should be accompanied by tests.) are not being met. Please add tests for the new functionality, especially for the parsing logic in ApiTracerContext.fromGrpcMethodName and ApiTracerContext.fromHttpJsonMethodName, and ensure existing tests are updated to reflect the API changes.

  2. Robustness: There's a potential for a NullPointerException in SpanTracerFactory which can be addressed with a defensive check.

Overall, this is a good direction, but the lack of tests is a critical issue that must be addressed before merging.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread gax-java/gax/src/main/java/com/google/api/gax/tracing/SpanTracerFactory.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@diegomarquezp diegomarquezp added do not merge Indicates a pull request not ready for merge, due to either quality or timing. needs work This is a pull request that needs a little love. wip Work in Progress labels Feb 25, 2026
Base automatically changed from observability/tracing-attr/repo-artifact to main February 26, 2026 19:03
@diegomarquezp
feat: pass whole context to traced callables
e5b927a
@diegomarquezp
diegomarquezp force-pushed the observability/tracing-attr/rpc.method-and-rpc.system branch from b32f09a to e5b927a Compare February 26, 2026 20:13
diegomarquezp added 3 commits February 26, 2026 15:41
@diegomarquezp
fix: provide getter of SpanName with suffix
956ae29
@diegomarquezp
fix: concise logic in http callable factory
dfe6216
@diegomarquezp
chore: expose newTracer method without SpanName
0ee9f4a
@product-auto-label product-auto-label Bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Feb 27, 2026
diegomarquezp added 4 commits February 27, 2026 14:02
@diegomarquezp
test: adapt tests
3cddc1b
@diegomarquezp
test: move span name tests
2880286
@diegomarquezp
fix: remove SpanName out of ApiTracerContext
74f97f6
@diegomarquezp
fix: keep suffix in the context class
418b954
diegomarquezp
diegomarquezp commented Feb 27, 2026
View reviewed changes
Comment thread gax-java/gax/src/main/java/com/google/api/gax/tracing/TracedUnaryCallable.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

diegomarquezp
diegomarquezp commented Feb 27, 2026
View reviewed changes
Comment thread gax-java/gax/src/main/java/com/google/api/gax/tracing/ApiTracerFactory.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

diegomarquezp added 7 commits March 2, 2026 11:30
@diegomarquezp
fix: revert changes in httpjson
7189841
@diegomarquezp
feat: merge context in factory method
e648a63
@diegomarquezp
test: revert traced callable tests
6b679d5
@diegomarquezp
feat: SpanTracerFactory to implement newTracer with context
6fbcc08
@diegomarquezp
chore: rename rpcMethod to fullMethodName
8b0a403
@diegomarquezp
test: adapt traced callable tests
b45401e
@diegomarquezp
test: adapt showcase it
a49828f
@product-auto-label product-auto-label Bot added size: xl Pull request size is extra large. and removed size: l Pull request size is large. labels Mar 2, 2026
@diegomarquezp
test: expand tests of SpanTracerFactory
5ecf1b0
@diegomarquezp
diegomarquezp requested a review from blakeli0 March 4, 2026 16:29
@diegomarquezp

diegomarquezp commented Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

/gemini review

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

gemini-code-assist[bot]
gemini-code-assist Bot reviewed Mar 4, 2026
View reviewed changes

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

Copy link
Copy Markdown
Contributor

There was a problem hiding this 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 rpc.system.name and rpc.method span attributes for gRPC tracing, which is a great enhancement for observability. The implementation is well-structured, refactoring tracing context creation into a new ApiTracerContext class and adding new overloads to the Traced*Callable classes and ApiTracerFactory. The test coverage is excellent, with new parameterized tests to handle both old and new code paths, and an integration test to verify the new attributes are correctly added to spans. I have a couple of minor suggestions to improve documentation and code consistency.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread gax-java/gax/src/main/java/com/google/api/gax/tracing/ObservabilityAttributes.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread gax-java/gax/src/main/java/com/google/api/gax/tracing/TracedUnaryCallable.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

diegomarquezp and others added 3 commits March 4, 2026 12:26
@diegomarquezp @gemini-code-assist
Update gax-java/gax/src/main/java/com/google/api/gax/tracing/Observab…
aa2c2af
…ilityAttributes.java

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@diegomarquezp
chore: mark TracedUnaryCallable nullable properties
efd2841
@diegomarquezp
Merge branch 'observability/tracing-attr/rpc.method-and-rpc.system' of …
cee771f
…https://github.com/googleapis/sdk-platform-java into observability/tracing-attr/rpc.method-and-rpc.system
blakeli0
blakeli0 reviewed Mar 4, 2026
View reviewed changes
Comment thread gax-java/gax/src/main/java/com/google/api/gax/tracing/SpanName.java
* @return a new {@link SpanName} with the parsed client name and method name
*/
public static SpanName of(ApiTracerContext apiTracerContext) {
Preconditions.checkState(apiTracerContext.fullMethodName() != null, "rpcMethod must be set");

@blakeli0 blakeli0 Mar 4, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I don't think fullMethodName() is nullable? Also can we only pass a String to this method?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@diegomarquezp diegomarquezp Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I don't think fullMethodName() is nullable?

I made it @Nullable considering the client-level vs method-def-level contexts we can have. ClientContext will not populate fullMethodName().

Also can we only pass a String to this method?

The problem with SpanName.of(apiTracerContext.getFullMethodName()) is that the callable factories cannot access the package-private method.

sdk-platform-java/gax-java/gax-httpjson/src/main/java/com/google/api/gax/httpjson/HttpJsonCallableFactory.java

Lines 224 to 234 in cee771f

@InternalApi("Visible for testing")
static SpanName getSpanName(@Nonnull ApiMethodDescriptor<?, ?> methodDescriptor) {
ApiTracerContext apiTracerContext =
ApiTracerContext.newBuilder()
.setFullMethodName(methodDescriptor.getFullMethodName())
.setTransport(ApiTracerContext.Transport.HTTP)
.setLibraryMetadata(LibraryMetadata.empty())
.build();
return SpanName.of(apiTracerContext);
}
}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@blakeli0 blakeli0 Mar 4, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I made it @nullable considering the client-level vs method-def-level contexts we can have. ClientContext will not populate fullMethodName()

I see, makes sense. This might be another data point that it's time to create a ClientTracerContext that only contains client level tracer info. And we can merge it with method/request level before we create a request level tracer. I feel we have a lot of nullable fields in ApiTracerContext only because we don't have the info initially. But we can do it in another PR.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@diegomarquezp diegomarquezp Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sounds good, I'll follow up with separating the contexts.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread gax-java/gax/src/main/java/com/google/api/gax/tracing/TracedUnaryCallable.java Outdated
this.innerCallable = innerCallable;
this.tracerFactory = tracerFactory;
this.apiTracerContext = apiTracerContext;
this.spanName = null;

@blakeli0 blakeli0 Mar 4, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

We can create a spanName from ApiTracerContext now.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@diegomarquezp diegomarquezp Mar 4, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

But we wouldn't use it if we have the context, right?

AFAIU we are trying to provide logic that only handles a context object as the SoT for SpanName. That's why we made this change in ApiTracer:

sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/tracing/TracedUnaryCallable.java

Lines 84 to 88 in cee771f

if (apiTracerContext != null) {
tracer = tracerFactory.newTracer(context.getTracer(), apiTracerContext, OperationType.Unary);
} else {
tracer = tracerFactory.newTracer(context.getTracer(), spanName, OperationType.Unary);
}

sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/tracing/ApiTracerFactory.java

Lines 72 to 76 in cee771f

default ApiTracer newTracer(
ApiTracer parent, ApiTracerContext tracerContext, OperationType operationType) {
SpanName spanName = SpanName.of(tracerContext);
return newTracer(parent, spanName, operationType);
}

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@blakeli0 blakeli0 Mar 4, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Agreed. Even if we don't use it, I think it's safer to populate it instead of making it nullable.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

diegomarquezp reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@diegomarquezp diegomarquezp Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Sounds good, done.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread gax-java/gax/src/main/java/com/google/api/gax/tracing/TracedUnaryCallable.java Outdated
private final UnaryCallable<RequestT, ResponseT> innerCallable;
private final ApiTracerFactory tracerFactory;
private final SpanName spanName;
@Nullable private final SpanName spanName;

@blakeli0 blakeli0 Mar 4, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I think we can keep this spanName not nullable.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@diegomarquezp diegomarquezp Mar 4, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I'll do it once we confirm my question in #4121 (comment)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@blakeli0 blakeli0 Mar 4, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

See answers below. Ideally we probably want to remove SpanName as a field, and only use ApiTracerContext as the source of truth. But it can not be done until we migrated all Callables to use ApiTracerContext.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

diegomarquezp reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@diegomarquezp diegomarquezp Mar 5, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

until we migrated all Callables to use ApiTracerContext

I thought the problem was with other classes that create the callables, such as GrpcCallableFactory. Are there usages of Traced*Callable in downstream libraries?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@diegomarquezp
fix: make spanName non-nullable in traced callables
f5c2381
blakeli0
blakeli0 approved these changes Mar 5, 2026
View reviewed changes
blakeli0
blakeli0 reviewed Mar 5, 2026
View reviewed changes
Comment thread gax-java/gax/src/main/java/com/google/api/gax/tracing/ApiTracerFactory.java Outdated
* @param tracerContext the method-definition-specific tracer context
* @param operationType the type of operation that the tracer will trace
*/
default ApiTracer newTracer(

@blakeli0 blakeli0 Mar 5, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The downstream failure in bigtable is legit. One possible solution is to move OperationType to ApiTracerContext

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

diegomarquezp reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@blakeli0 blakeli0 Mar 10, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@diegomarquezp Thanks for adding a new overloaded method! We need to remove this method as well.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@diegomarquezp diegomarquezp Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Replace L85 with this method impl. and delete this method.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@diegomarquezp diegomarquezp Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Regarding Bigtable: Removed method.

Regarding Spanner: The traced callables were not setting apiTracerContext.setOperationType and a null check in the Spanner tracer was failing. I was surprised our tests didn't catch it, so I added a null check in MetricsTracerFactory and OpencensusTracerFactory.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
diegomarquezp added 8 commits March 5, 2026 13:41
@diegomarquezp
fix: rpc.method only in grpc
97d1aac
@diegomarquezp
fix: move OperationType to ApiTracerContext
1b47eb9
@diegomarquezp
Merge remote-tracking branch 'origin/main' into observability/tracing…
ea86930
…-attr/rpc.method-and-rpc.system
@diegomarquezp
fix: use isNullOrEmpty() check
c7ea2e9
@diegomarquezp
fix: remove unnecessary overload
233f429
@diegomarquezp
chore: lint
af531a4
@diegomarquezp
fix: set OperationType on traced callables context
7443c37
@diegomarquezp
chore: fix typo
8242e37
blakeli0
blakeli0 reviewed Mar 10, 2026
View reviewed changes
Comment thread gax-java/gax/src/main/java/com/google/api/gax/tracing/TracedServerStreamingCallable.java Outdated
this.tracerFactory = Preconditions.checkNotNull(tracerFactory, "tracerFactory can't be null");
this.apiTracerContext =
Preconditions.checkNotNull(apiTracerContext, "apiTracerContext can't be null").toBuilder()
.setOperationType(OperationType.ClientStreaming)

@blakeli0 blakeli0 Mar 10, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This should be ServerStreaming

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@blakeli0 blakeli0 Mar 10, 2026

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Can we also add unit tests for these default OperationType?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@diegomarquezp diegomarquezp Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thanks for the catch. Done.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@diegomarquezp diegomarquezp Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Can we also add unit tests for these default OperationType?

Done in 6b67410

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
diegomarquezp added 2 commits March 10, 2026 16:41
@diegomarquezp
fix: use right operation type in server streaming callable
1cd4717
@diegomarquezp
test: confirm operation type is set in traced callables
6b67410
@sonarqubecloud

sonarqubecloud Bot commented Mar 10, 2026

Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed for 'gapic-generator-java-root'

Issues
1 New issue
0 Accepted issues

Measures
0 Security Hotspots
94.1% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarQube Cloud

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

blakeli0
blakeli0 approved these changes Mar 10, 2026
View reviewed changes
@sonarqubecloud

sonarqubecloud Bot commented Mar 10, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed for 'java_showcase_integration_tests'

Failed conditions
78.7% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@diegomarquezp
diegomarquezp merged commit 7ab6d2e into main Mar 10, 2026
55 of 57 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@diegomarquezp
diegomarquezp deleted the observability/tracing-attr/rpc.method-and-rpc.system branch March 10, 2026 21:35
@release-please release-please Bot mentioned this pull request Mar 10, 2026
chore(main): release 2.68.0 #4123
Merged
@diegomarquezp diegomarquezp mentioned this pull request Mar 13, 2026
chore(observability/tracing-attr/gcp.client.version-2): release 2.68.0 #4141
Closed
lqiu96 pushed a commit that referenced this pull request Mar 17, 2026
@release-please
chore(main): release 2.68.0 (#4123)
7eca195
🤖 I have created a release *beep* *boop*
---


<details><summary>2.68.0</summary>

##
[2.68.0](v2.67.0...v2.68.0)
(2026-03-17)


### Features

* Add client request duration metric.
([#4132](#4132))
([6a76397](6a76397))
* Add more attributes to golden signals metrics.
([#4135](#4135))
([59d0624](59d0624))
* **gax-httpjson:** add HttpJsonErrorParser utility
([#4137](#4137))
([a1b7565](a1b7565))
* **generator:** add extra allowed modules that will not be removed from
the monorepo if they are present
([#4124](#4124))
([774fe6e](774fe6e))
* **o11y:** introduce `gcp.client.repo` and `gcp.client.artifact`
attributes
([#4120](#4120))
([105f644](105f644))
* **o11y:** Introduce `rpc.system.name` and `rpc.method` in gRPC
([#4121](#4121))
([7ab6d2e](7ab6d2e))
* **o11y:** introduce server.port attribute
([#4128](#4128))
([56aa343](56aa343))


### Bug Fixes

* add null checks for ApiTracerFactory in ClientContext
([#4122](#4122))
([4b3dbe2](4b3dbe2))
* Decrease log level for directpath warnings outside GCE
([#4139](#4139))
([c9651e7](c9651e7))
* **gax-grpc:** add pick_first fallback to direct path service config
([#4143](#4143))
([b150fe9](b150fe9))
* Populate method level attributes in metrics recording
([#4149](#4149))
([7b7e6c9](7b7e6c9))
* suppress warnings in generated projects for non-idiomatic durations
([#4119](#4119))
([4206e6e](4206e6e))
* Use ServiceName + MethodName as the regex for Otel
([#2543](#2543))
([b9ae73f](b9ae73f))


### Documentation

* **hermetic_build:** fix config field name in readme
([#4130](#4130))
([a0c8f67](a0c8f67))
</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>
chingor13 pushed a commit to googleapis/google-cloud-java that referenced this pull request Mar 20, 2026
@release-please
chore(main): release 2.68.0 (#4123)
a0fb119
🤖 I have created a release *beep* *boop*
---


<details><summary>2.68.0</summary>

##
[2.68.0](googleapis/sdk-platform-java@v2.67.0...v2.68.0)
(2026-03-17)


### Features

* Add client request duration metric.
([#4132](googleapis/sdk-platform-java#4132))
([487650e](googleapis/sdk-platform-java@487650e))
* Add more attributes to golden signals metrics.
([#4135](googleapis/sdk-platform-java#4135))
([bc82dcb](googleapis/sdk-platform-java@bc82dcb))
* **gax-httpjson:** add HttpJsonErrorParser utility
([#4137](googleapis/sdk-platform-java#4137))
([6fe2446](googleapis/sdk-platform-java@6fe2446))
* **generator:** add extra allowed modules that will not be removed from
the monorepo if they are present
([#4124](googleapis/sdk-platform-java#4124))
([6a440da](googleapis/sdk-platform-java@6a440da))
* **o11y:** introduce `gcp.client.repo` and `gcp.client.artifact`
attributes
([#4120](googleapis/sdk-platform-java#4120))
([4954de5](googleapis/sdk-platform-java@4954de5))
* **o11y:** Introduce `rpc.system.name` and `rpc.method` in gRPC
([#4121](googleapis/sdk-platform-java#4121))
([3593c30](googleapis/sdk-platform-java@3593c30))
* **o11y:** introduce server.port attribute
([#4128](googleapis/sdk-platform-java#4128))
([1b10e02](googleapis/sdk-platform-java@1b10e02))


### Bug Fixes

* add null checks for ApiTracerFactory in ClientContext
([#4122](googleapis/sdk-platform-java#4122))
([ded1922](googleapis/sdk-platform-java@ded1922))
* Decrease log level for directpath warnings outside GCE
([#4139](googleapis/sdk-platform-java#4139))
([5151f34](googleapis/sdk-platform-java@5151f34))
* **gax-grpc:** add pick_first fallback to direct path service config
([#4143](googleapis/sdk-platform-java#4143))
([4934ad8](googleapis/sdk-platform-java@4934ad8))
* Populate method level attributes in metrics recording
([#4149](googleapis/sdk-platform-java#4149))
([69aabf8](googleapis/sdk-platform-java@69aabf8))
* suppress warnings in generated projects for non-idiomatic durations
([#4119](googleapis/sdk-platform-java#4119))
([8a0c565](googleapis/sdk-platform-java@8a0c565))
* Use ServiceName + MethodName as the regex for Otel
([#2543](googleapis/sdk-platform-java#2543))
([8196b8f](googleapis/sdk-platform-java@8196b8f))


### Documentation

* **hermetic_build:** fix config field name in readme
([#4130](googleapis/sdk-platform-java#4130))
([0d98c37](googleapis/sdk-platform-java@0d98c37))
</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>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

2 more reviewers
@gemini-code-assist gemini-code-assist[bot] gemini-code-assist[bot] left review comments
@blakeli0 blakeli0 blakeli0 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size: xl Pull request size is extra large.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@diegomarquezp @blakeli0
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.