Repository navigation
feat(gax): populate java client and method names in ApiTracerContext - #14616
jinseopkim0 wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for propagating the Java client name and Java method name to the ApiTracerContext for tracing purposes. It updates the GAPIC generator to output getJavaClientName() in stub settings and setJavaMethodName() in transport settings, and updates GAX library classes (GrpcCallSettings, HttpJsonCallSettings, ClientContext, and tracer factories) to store and pass these names. A review comment highlights that in HttpJsonCallableFactory.java, only createUnaryCallable was updated to pass the full settings object to getApiTracerContext, while other factory methods (such as batching and operation callables) still pass the method descriptor, which prevents the Java method name from being correctly populated for those callables.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request updates the Java GAPIC generator and GAX library to propagate the Java client name and Java method name to the tracing context (ApiTracerContext). This is achieved by adding getJavaClientName() to StubSettings and setJavaMethodName() to GrpcCallSettings and HttpJsonCallSettings, with corresponding updates to the generator, GAX runtime, and generated goldens. Additionally, a change in assembly.gradle.tmpl places mavenLocal() before mavenCentral(). Feedback suggests reverting this repository order to prevent non-reproducible builds and build performance degradation.
a1e78ff to
df2241b
Compare
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces javaClientName and javaMethodName fields to ApiTracerContext to enable the propagation of Java-specific client and method names for tracing. It updates GrpcCallSettings, HttpJsonCallSettings, and their respective callable factories to capture and pass these names when creating tracers. Additionally, StubSettings and ClientContext are updated to support retrieving and passing the Java client name. Feedback on the changes suggests adding the @VisibleForTesting annotation to HttpJsonCallableFactory.getApiTracerContext(ApiMethodDescriptor) for consistency with the gRPC implementation, and ensuring that all callable creation methods in HttpJsonCallableFactory are updated to propagate the javaMethodName correctly.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request enhances telemetry and tracing capabilities by propagating the Java client name and Java method name to ApiTracerContext. It introduces javaMethodName to both GrpcCallSettings and HttpJsonCallSettings, and javaClientName to StubSettings, ensuring these fields are populated and merged correctly within ApiTracerContext. The review feedback suggests making the package-private getJavaMethodName() getters in GrpcCallSettings and HttpJsonCallSettings public and annotated with @internalapi to align with their setters and facilitate custom telemetry or tracing implementations.
|
@gemini-code-assist review |
There was a problem hiding this comment.
Code Review
This pull request introduces the ability to propagate the fully qualified Java client class name and the Java method name of the RPC into the ApiTracerContext. This is achieved by adding javaClientName and javaMethodName fields to ApiTracerContext, updating GrpcCallSettings and HttpJsonCallSettings to hold the Java method name, and updating StubSettings to provide the Java client name. The ClientContext and callable factories (GrpcCallableFactory, HttpJsonCallableFactory) have been updated to populate these fields when building the tracer context. Corresponding unit tests have been added to verify the new behavior. There are no review comments, so I have no feedback to provide.
|
|





Adds support for propagating the Java client name (
javaClientName) and Java RPC method name (javaMethodName) toApiTracerContextviaStubSettings,ClientContext,GrpcCallSettings, andHttpJsonCallSettings.b/541322523#comment7