Skip to content

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

Open
william-xue wants to merge 1 commit 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 1 commit into
traceloop:mainfrom
william-xue:fix/qdrant-async-query-points

Conversation

@william-xue
Copy link
Copy Markdown

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

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 to provide enhanced observability and performance monitoring capabilities.

Review Change Stack

…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
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 27, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 9f309d34-804b-4108-9a0e-81f0167df1a4

📥 Commits

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

📒 Files selected for processing (1)
  • packages/opentelemetry-instrumentation-qdrant/opentelemetry/instrumentation/qdrant/async_qdrant_client_methods.json

📝 Walkthrough

Walkthrough

The instrumentation configuration for Qdrant's async client is extended with two new method-to-span mappings: query_points and query_batch_points. These additions enable OpenTelemetry tracing for these query methods in the AsyncQdrantClient.

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

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 Two query methods now traced with care,
Spans named for searching Qdrant's lair,
Async client glows in telemetry light,
query_points shines, query_batch takes flight! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The PR description indicates it adds query_points and query_batch_points entries, but the linked issue #3492 reports an incompatibility with missing upload_records method. Clarify whether this PR fully addresses the method incompatibility concerns raised in #3492 or if additional fixes are needed to handle version-specific method availability.
✅ 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 accurately describes the main change: adding query_points and query_batch_points to async client instrumentation in the qdrant package.
Out of Scope Changes check ✅ Passed The changes are limited to adding two method mappings to async_qdrant_client_methods.json, which is directly in scope for the stated PR objective.
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
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.


xueyuan seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

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