fix(firestore): cross-support opentelemetry-instrumentation-grpc 2.25.0+#13362
fix(firestore): cross-support opentelemetry-instrumentation-grpc 2.25.0+#13362exoego wants to merge 1 commit into
Conversation
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Code Review
This pull request introduces a reflection-based fallback mechanism in EnabledTraceUtil to support both older (< 2.25.0) and newer (>= 2.25.0) versions of opentelemetry-instrumentation-grpc-1.6 by dynamically resolving either createClientInterceptor or newClientInterceptor. It also adds matrix-test profiles in pom.xml to verify compatibility across these versions and includes a unit test to exercise the fallback logic. There are no review comments, so no additional feedback is provided.
Problem
GrpcTelemetry#newClientInterceptorwas removed in 2.25.0 and replaced withcreateClientInterceptor, causing NoSuchMethodError at runtime when users bring in opentelemetry-instrumentation-grpc 2.25.0 or later.Fix
Resolve the method via reflection at class init so the same artifact works across both API versions.