Commit 2b8c80c
fix(deps): Require otel google-genai instrumentor >=0.7b1 for genai 2.x
Merge google#6102
## Summary
Bump the floor on `opentelemetry-instrumentation-google-genai` from `>=0.6b0` / `>=0.3b0` to `>=0.7b1` in both the `otel-gcp` and `test` extras, so it is compatible with the pinned `google-genai>=2.8,<3`.
## Problem
`opentelemetry-instrumentation-google-genai` versions before `0.7b1` hardcode a runtime gate in `instrumentation_dependencies()`:
```python
return ["google-genai>=1.0.0,<2"]
```
This `<2` cap is **not** in the package metadata (which only declares `google-genai>=1.0.0`), so dependency resolvers happily install e.g. `0.7b0` alongside `google-genai 2.8.0`. The conflict only surfaces at runtime: `instrumentor.instrument()` detects the violation, logs a `DependencyConflict`, and **silently no-ops** — `Models.generate_content` is never wrapped, so genai telemetry is disabled entirely with no hard error.
This was caught by `tests/unittests/telemetry/test_functional.py::test_instrumented_with_opentelemetry_instrumentation_google_genai`, which fails with `assert False` when a pre-`0.7b1` instrumentor is resolved (the post-`instrument()` assertion that the SDK reports as instrumented).
## Fix
`0.7b1` widens the gate to `google-genai>=1.0.0,<3`, which `2.8.0` satisfies. The existing floors allowed resolvers to land on a broken version; raising both to `>=0.7b1` makes the requirement consistent with the genai 2.8 pin and fail-safe.
## Impact
- Restores google-genai OTel instrumentation for users on genai 2.x with the `otel-gcp` extra.
- Prevents the test suite from resolving a broken instrumentor.
## Test plan
- [x] `uv.lock` already resolved to `0.7b1`; no lockfile change needed (only the specifier floor moved).
- [x] `tests/unittests/telemetry/test_functional.py`: 6 passed (previously 1 failed: `test_instrumented_...`).
- [x] pre-commit (`pyproject-fmt`) passes.
Co-authored-by: Wei Sun (Jack) <weisun@google.com>
COPYBARA_INTEGRATE_REVIEW=google#6102 from google:fix/otel-genai-instrumentor-floor 8e2154f
PiperOrigin-RevId: 9314658461 parent fa82929 commit 2b8c80c
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
| |||
226 | 226 | | |
227 | 227 | | |
228 | 228 | | |
229 | | - | |
| 229 | + | |
230 | 230 | | |
231 | 231 | | |
232 | 232 | | |
| |||
0 commit comments