Skip to content

fix(qdrant): add query_points and query_batch_points to async client instrumentation#4196

Open
william-xue wants to merge 2 commits into
traceloop:mainfrom
william-xue:fix/qdrant-async-query-points
Open

fix(qdrant): add query_points and query_batch_points to async client instrumentation#4196
william-xue wants to merge 2 commits into
traceloop:mainfrom
william-xue:fix/qdrant-async-query-points

Conversation

@william-xue

@william-xue william-xue commented May 27, 2026

Copy link
Copy Markdown

Summary

The sync QdrantClient instrumentation includes query_points and query_batch_points in its method config, but the async AsyncQdrantClient config was missing both. This means async users get no tracing spans when calling these methods.

This PR adds the two missing entries to async_qdrant_client_methods.json, bringing async instrumentation to parity with the sync client.

The instrumentor already uses hasattr checks (line 55 in __init__.py), so this is safe across all qdrant-client versions — if a version doesn't have these methods, they're silently skipped.

Changes

  • Added query_points and query_batch_points to async_qdrant_client_methods.json

Test plan

  • All 4 existing tests pass with pytest tests/ -v
  • Verified AsyncQdrantClient has both query_points and query_batch_points methods (qdrant-client 1.18.0)
  • Verified the JSON is valid and loads correctly

Related issues

Summary by CodeRabbit

  • New Features
    • Extended instrumentation coverage for async query operations, adding additional spans to improve observability and performance monitoring of asynchronous queries.

@coderabbitai

coderabbitai Bot commented May 27, 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: ce986fda-7da1-4489-b317-5637148d74e9

📥 Commits

Reviewing files that changed from the base of the PR and between e61bd87 and a4e0780.

📒 Files selected for processing (1)
  • packages/opentelemetry-instrumentation-qdrant/opentelemetry/instrumentation/qdrant/async_qdrant_client_methods.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/opentelemetry-instrumentation-qdrant/opentelemetry/instrumentation/qdrant/async_qdrant_client_methods.json

📝 Walkthrough

Walkthrough

The async Qdrant instrumentation mapping adds two new span definitions for AsyncQdrantClient: query_points -> qdrant.query_points and query_batch_points -> qdrant.query_batch_points to enable tracing for those methods.

Changes

Async Qdrant client instrumentation extensions

Layer / File(s) Summary
Query points span mappings
packages/opentelemetry-instrumentation-qdrant/opentelemetry/instrumentation/qdrant/async_qdrant_client_methods.json
Added OpenTelemetry span definitions for query_points and query_batch_points methods on AsyncQdrantClient, mapping them to qdrant.query_points and qdrant.query_batch_points span names respectively.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 I hopped through JSON, swift and spry,
Two query spans now wink an eye,
Async calls traced, both near and far,
A tiny hop toward observability star ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The PR addresses the core issue by adding missing methods to async client instrumentation, but does not fully implement the broader objective of ensuring cross-version compatibility. Verify that the instrumentor uses hasattr checks to prevent AttributeError for missing methods, and ensure sync/async parity is maintained across qdrant-client versions.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main change: adding two missing method entries to async client instrumentation.
Out of Scope Changes check ✅ Passed All changes are limited to adding two method mappings to the async client JSON config, directly addressing the PR objectives without introducing unrelated modifications.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 and usage tips.

@CLAassistant

CLAassistant commented May 27, 2026

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.

@william-xue

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

recheck

…instrumentation

The sync QdrantClient had query_points and query_batch_points in its
instrumentation config, but AsyncQdrantClient was missing both methods.
This caused async users to not get spans for these operations.

Closes traceloop#3492
@william-xue william-xue force-pushed the fix/qdrant-async-query-points branch from e61bd87 to a4e0780 Compare June 11, 2026 02:27
@william-xue

Copy link
Copy Markdown
Author

Rebased this branch on the latest upstream main and updated the commit author to my GitHub noreply address so the CLA check can associate it with my GitHub account.

recheck

@william-xue

Copy link
Copy Markdown
Author

@traceloop maintainers: I rebased the branch and updated the only commit so both author and committer resolve to my GitHub account william-xue using the GitHub noreply email (20151622+william-xue@users.noreply.github.com). I also posted the CLA signature comment and recheck, but the CLA status is still pending.

Could you please re-run/refresh the CLA check or advise if another signature step is needed?

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