Skip to content

fix(qdrant): remove upload_records removed in qdrant-client v1.16.1#4370

Open
Goutham-Annem wants to merge 1 commit into
traceloop:mainfrom
Goutham-Annem:fix/qdrant-remove-upload-records
Open

fix(qdrant): remove upload_records removed in qdrant-client v1.16.1#4370
Goutham-Annem wants to merge 1 commit into
traceloop:mainfrom
Goutham-Annem:fix/qdrant-remove-upload-records

Conversation

@Goutham-Annem

@Goutham-Annem Goutham-Annem commented Jul 19, 2026

Copy link
Copy Markdown

Problem

qdrant-client v1.16.1 removed the upload_records method from both QdrantClient and AsyncQdrantClient. This causes an AttributeError on instrumentation when the package version constraint allows v1.16.1+.

The _instrument and _uninstrument methods already have a hasattr guard that prevents the crash at patching time, but the method is still listed in qdrant_client_methods.json and async_qdrant_client_methods.json, and there is dead handler code for it in wrapper.py.

Changes

  • Remove the upload_records entry from qdrant_client_methods.json
  • Remove the upload_records entry from async_qdrant_client_methods.json
  • Remove the elif method == "upload_records": branch from wrapper.py

Testing

No test cassettes reference upload_records. The existing test suite covers the remaining methods and can be verified with:

cd packages/opentelemetry-instrumentation-qdrant && uv run pytest tests/

Fixes #3492

Summary by CodeRabbit

  • Bug Fixes
    • Updated Qdrant tracing to stop instrumenting the upload_records operation.
    • Calls to upload_records will no longer generate the associated span or upload point-count attribute.

….16.1

The upload_records method was removed from QdrantClient and AsyncQdrantClient
in qdrant-client v1.16.1. The hasattr guard in _instrument/_uninstrument already
prevents the AttributeError at patching time, but the dead code in wrapper.py
and the stale entries in the JSON methods files should also be cleaned up.

Fixes traceloop#3492

Signed-off-by: Goutham Annem <gouthemannem@gmail.com>
@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@coderabbitai

coderabbitai Bot commented Jul 19, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6f956e1a-6985-4dec-8c30-82602f5815fc

📥 Commits

Reviewing files that changed from the base of the PR and between 93429cf and 24290d2.

📒 Files selected for processing (3)
  • packages/opentelemetry-instrumentation-qdrant/opentelemetry/instrumentation/qdrant/async_qdrant_client_methods.json
  • packages/opentelemetry-instrumentation-qdrant/opentelemetry/instrumentation/qdrant/qdrant_client_methods.json
  • packages/opentelemetry-instrumentation-qdrant/opentelemetry/instrumentation/qdrant/wrapper.py
💤 Files with no reviewable changes (3)
  • packages/opentelemetry-instrumentation-qdrant/opentelemetry/instrumentation/qdrant/wrapper.py
  • packages/opentelemetry-instrumentation-qdrant/opentelemetry/instrumentation/qdrant/qdrant_client_methods.json
  • packages/opentelemetry-instrumentation-qdrant/opentelemetry/instrumentation/qdrant/async_qdrant_client_methods.json

📝 Walkthrough

Walkthrough

The Qdrant instrumentation no longer registers upload_records for synchronous or asynchronous clients and no longer sets upload attributes for that method in the wrapper.

Changes

Qdrant upload_records instrumentation

Layer / File(s) Summary
Remove obsolete method registration and handling
packages/opentelemetry-instrumentation-qdrant/opentelemetry/instrumentation/qdrant/*.json, packages/opentelemetry-instrumentation-qdrant/opentelemetry/instrumentation/qdrant/wrapper.py
The synchronous and asynchronous span mappings for upload_records and its wrapper-specific upload attribute branch were removed.

Estimated code review effort: 2 (Simple) | ~5 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: removing qdrant upload_records support for v1.16.1.
Linked Issues check ✅ Passed The PR removes upload_records references from both client method lists and the wrapper, addressing the AttributeError in #3492.
Out of Scope Changes check ✅ Passed The changes stay focused on qdrant upload_records compatibility and do not introduce unrelated scope.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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.

🐛 Bug Report: opentelemetry-instrumentation-qdrant is incompatible with qdrant-client version 1.16.1

2 participants