Skip to content

build(deps): remove unused legacy GCP OpenTelemetry exporter dependencies - #7616

Open
psx95 wants to merge 1 commit into
google:mainfrom
psx95:remove-gcp-otel-dependencies
Open

psx95 wants to merge 1 commit into
google:mainfrom
psx95:remove-gcp-otel-dependencies

Conversation

@psx95

@psx95 psx95 commented Oct 19, 2026 •

Copy link
Copy Markdown

Link to Issue or Description of Change

1. Link to an existing issue (if applicable):

  • N/A

2. Or, if no issue exists, describe the change:

Problem:
pyproject.toml still declares the legacy GCP OpenTelemetry exporter packages (opentelemetry-exporter-gcp-logging>=1.9.0a0,<=1.12.0a0, opentelemetry-exporter-gcp-monitoring>=1.9.0a0,<2, and opentelemetry-exporter-gcp-trace>=1.9,<2) in the all, gcp, and test optional dependency groups. However, google.adk.telemetry.google_cloud now exports traces, metrics, and logs to Google Cloud Telemetry (telemetry.googleapis.com) using standard OTLP HTTP exporters (opentelemetry-exporter-otlp-proto-http) and opentelemetry-resourcedetector-gcp. Keeping the unused opentelemetry-exporter-gcp-* dependencies pulls in unnecessary packages and constrains dependency resolution (including a pre-release <=1.12.0a0 upper bound on opentelemetry-exporter-gcp-logging).

Solution:
Remove opentelemetry-exporter-gcp-logging, opentelemetry-exporter-gcp-monitoring, and opentelemetry-exporter-gcp-trace from optional-dependencies.all, optional-dependencies.gcp, and optional-dependencies.test in pyproject.toml, and regenerate constraints-3.11.txt through constraints-3.15.txt via ./scripts/update_constraints.sh.

Testing Plan

Unit Tests:

  • I have added or updated unit tests for my change.
  • All unit tests pass locally.

Ran release dependency contract tests and telemetry unit tests (pytest tests/unittests/test_release_dependencies.py tests/unittests/telemetry/):

  • tests/unittests/test_release_dependencies.py: 20 passed (verifying optional-dependencies.all union invariants and upper-bound checks)
  • tests/unittests/telemetry/test_google_cloud.py: 40 passed
  • tests/unittests/telemetry/: 1,021 passed, 9 xfailed

Manual End-to-End (E2E) Tests:

  • Ran ./scripts/update_constraints.sh --check across Python 3.11–3.15 (✅ constraints-3.{11..15}.txt is up-to-date.).
  • Ran pyproject-fmt --check pyproject.toml and codespell pyproject.toml.
  • Built source and wheel distributions via uv build and verified package metadata.

Checklist

  • I have read the CONTRIBUTING.md document.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.
  • I have manually tested my changes end-to-end.
  • Any dependent changes have been merged and published in downstream modules.

Additional context

None.

…cies

`google.adk.telemetry.google_cloud` exports traces, metrics, and logs to Google Cloud Telemetry (`telemetry.googleapis.com`) using the standard OTLP HTTP exporters (`opentelemetry-exporter-otlp-proto-http`) and `opentelemetry-resourcedetector-gcp`.

The legacy `opentelemetry-exporter-gcp-logging`, `opentelemetry-exporter-gcp-monitoring`, and `opentelemetry-exporter-gcp-trace` packages are no longer imported in `google.adk.telemetry` and unnecessarily constrain dependency resolution (including a pre-release upper bound on `opentelemetry-exporter-gcp-logging`). Remove them from the `all`, `gcp`, and `test` extras in `pyproject.toml` and regenerate `constraints-3.11.txt` through `constraints-3.15.txt`.
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.

2 participants