Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Opentelemetry-context conflict, please bump google-api-client dependency

Open
#1,138 8 comments 0 reactions 1 assignee View on GitHub

@lahirumaramba is already working on this.

Since Nov 3, 2025.

Assessment

This issue has not been assessed yet.

Description

api: core

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!

Dominant language
Java
Stars
620
Forks
305
Avg merge
3h 23m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from firebase/firebase-admin-java

All issues in firebase/firebase-admin-java

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.