Opentelemetry-context conflict, please bump google-api-client dependency
@lahirumaramba đang làm issue này rồi.
Từ ngày 3/11/2025.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
Please bump opentelemetry versions to 1.50 or higher.
[READ] Step 1: Are you in the right place?
Yes, this issue is for the code in this repository.
[REQUIRED] Step 2: Describe your environment
Operating System version: Any (e.g., Linux, macOS, Windows)
Firebase SDK version: 9.6.0 (and likely all newer versions)
Library version: 9.6.0
Firebase Product: Admin SDK (Core)
[REQUIRED] Step 3: Describe the problem
The firebase-admin SDK brings in an old version of io.opentelemetry:opentelemetry-context as a transitive dependency. This causes NoSuchMethodError exceptions at runtime for applications that use modern versions of the OpenTelemetry Java SDK.
The dependency chain is as follows:
com.google.firebase:firebase-admin → com.google.api-client:google-api-client → com.google.http-client:google-http-client → io.opentelemetry:opentelemetry-context
Newer OpenTelemetry libraries rely on the Context.getAll() method, which was introduced in opentelemetry-java v1.33.0. The commit that introduced this change is here.
Because firebase-admin depends on an older version of google-api-client, it forces a downgrade of opentelemetry-context, leading to the following error when newer instrumentation libraries are used:
java.lang.NoSuchMethodError: 'java.lang.Iterable io.opentelemetry.context.Context.getAll()
The current workaround is to manually exclude the transitive dependency in the build configuration, but the correct long-term solution is to update the google-api-client dependency in this project.
Steps to reproduce:
Create a new Maven project.
Add a dependency on firebase-admin.
Add a dependency on a newer OpenTelemetry library that requires a modern opentelemetry-context (e.g., opentelemetry-exporter-otlp).
Maven's dependency resolution will either select the older, incompatible version of opentelemetry-context or require manual intervention. If the older version is used, a NoSuchMethodError will occur at runtime when calling code that relies on Context.getAll().
Example code:
https://github.com/steffan-westcott/clj-otel/blob/d5bb87f8b99d8d30c98e320478260194ca559e4c/clj-otel-api/src/steffan_westcott/clj_otel/api/trace/http.clj#L303 (v2.8 & v2.9) doesn't work with io.opentelemetry:opentelemetry-context version 1.47
Thank you!
- Ngôn ngữ chính
- Java
- Star
- 620
- Fork
- 305
- Merge trung bình
- 4 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 4
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của firebase/firebase-admin-java
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 48/100
firebase/firebase-admin-java#1231 ·
-
api: core
firebase/firebase-admin-java#1198 · 3 bình luận · 1 người được giao ·
-
[BUG] RemoteConfig unit tests fail in non-English (e.g., Korean) Locales due to Date Parsing Đang mởapi: remoteconfig
firebase/firebase-admin-java#1196 · 1 bình luận · 2 người được giao ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
firebase/firebase-admin-java#1192 · 3 bình luận ·
-
needs-triage type: feature request
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
firebase/firebase-admin-java#1149 · 1 bình luận ·
Tất cả issue của firebase/firebase-admin-java
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
elastic/gradle-plugins#157 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
cryptomator/hub#497 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
johanhaleby/occurrent#1120 ·