Skip to content

fix(firestore): cross-support opentelemetry-instrumentation-grpc 2.25.0+#13362

Open
exoego wants to merge 1 commit into
googleapis:mainfrom
exoego:fix-firestore-otel
Open

fix(firestore): cross-support opentelemetry-instrumentation-grpc 2.25.0+#13362
exoego wants to merge 1 commit into
googleapis:mainfrom
exoego:fix-firestore-otel

Conversation

@exoego
Copy link
Copy Markdown

@exoego exoego commented Jun 4, 2026

Problem

GrpcTelemetry#newClientInterceptor was removed in 2.25.0 and replaced with createClientInterceptor, 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.

@exoego exoego requested review from a team as code owners June 4, 2026 05:36
@google-cla
Copy link
Copy Markdown

google-cla Bot commented Jun 4, 2026

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.

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a 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 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.

@exoego exoego changed the title fix(firestore): support opentelemetry-instrumentation-grpc 2.25.0+ fix(firestore): cross-support opentelemetry-instrumentation-grpc 2.25.0+ Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[java-firestore] NoSuchMethodError: 'ClientInterceptor GrpcTelemetry.newClientInterceptor()'

1 participant