Skip to content

fix: sync GRPC_ENDPOINT_WHITELIST with its REST metrics sibling - #10968

Merged
timvisee merged 3 commits into
qdrant:devfrom
avanish-garg:fix/grpc-metrics-whitelist-parity
Nov 26, 2026
Merged

timvisee merged 3 commits into
qdrant:devfrom
avanish-garg:fix/grpc-metrics-whitelist-parity

Conversation

@avanish-garg

Copy link
Copy Markdown

Fixes #10943

DeleteVectors, CreateFieldIndex, DeleteFieldIndex, SearchMatrixPairs, and SearchMatrixOffsets each already have a whitelisted REST endpoint in REST_ENDPOINT_WHITELIST, but were missing from the gRPC whitelist, so grpc_responses_total and latency metrics were silently absent for these operations while rest_responses_total had them. Same drift pattern and fix shape as #4812 (scroll endpoints).

What

  • Adds five entries to GRPC_ENDPOINT_WHITELIST in src/common/metrics/requests.rs:
    /qdrant.Points/DeleteVectors, /qdrant.Points/CreateFieldIndex, /qdrant.Points/DeleteFieldIndex,
    /qdrant.Points/SearchMatrixPairs and /qdrant.Points/SearchMatrixOffsets.
  • The array is binary-searched, so it stays sorted.

How I checked

  • New test test_grpc_whitelist_matches_rest_sibling_endpoints. The existing sortedness test still passes.
  • Checked live against a debug build. I called all five RPCs plus Search with grpcurl and read /metrics:
    • On dev, only /qdrant.Points/Search was listed.
    • On this branch, CreateFieldIndex, DeleteFieldIndex, DeleteVectors, SearchMatrixOffsets and SearchMatrixPairs are listed too.
  • cargo +1.99.0 test --bin qdrant common::metrics::requests (7 passed), cargo +nightly fmt --all, and clippy on the binary.

All Submissions:

  • My PR targets the dev branch (not master) and my branch was created from dev.
  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?

New Feature Submissions:

  1. Does your submission pass tests?
  2. Have you formatted your code locally using cargo +nightly fmt --all command prior to submission?
  3. Have you checked your code using cargo clippy --workspace --all-features command?

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

AI disclosure

  • Commits: 1, labelled [AI] ([AI] fix: sync GRPC_ENDPOINT_WHITELIST with its REST metrics sibling). No [manual] commits.
  • Tool: Claude Code.
  • Prompts used: a research prompt asking for gaps between the REST and gRPC APIs and for observability and metrics gaps in qdrant/qdrant ("verify against the real code, negative-check against existing issues and PRs, do not write code"). Then the instruction "Build 1, 2, and 3" for the candidates it returned. This PR is the gRPC metrics whitelist gap.
  • I read the diff, ran the checks above, and can answer questions about it.
  • This description was drafted with AI assistance and edited by me.

DeleteVectors, CreateFieldIndex, DeleteFieldIndex, SearchMatrixPairs,
and SearchMatrixOffsets each already have a whitelisted REST endpoint
in REST_ENDPOINT_WHITELIST, but were missing from the gRPC whitelist,
so grpc_responses_total/latency metrics were silently absent for these
operations while rest_responses_total had them. Same drift pattern and
fix shape as qdrant#4812 (scroll endpoints).
@coderabbitai

coderabbitai Bot commented Oct 6, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The REST metrics endpoint whitelist adds /collections/{collection_name}/index/{field_name}. The gRPC whitelist adds CreateFieldIndex, DeleteFieldIndex, DeleteVectors, SearchMatrixOffsets, and SearchMatrixPairs.

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

Change: Bug fix · Severity of issue fixed: Low

Suggested reviewers: generall

Merge Risk: Minimal · up to 0e723

This change adds five gRPC methods and one REST route to the metrics whitelists so their metrics appear at /metrics. No actionable merge risk remains.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the change: adding five RPCs to the gRPC metrics endpoint whitelist so they match the REST whitelist. It uses the fix: prefix and states the sync target. The changeset only adds whitel…
Description check Passed The description states the purpose: five Points RPCs were missing from GRPC_ENDPOINT_WHITELIST while their REST siblings were whitelisted. It lists the five entries added to requests.rs, the binary-se…
Linked Issues check Passed Issue #10943 requires gRPC whitelist entries for DeleteVectors, CreateFieldIndex, DeleteFieldIndex, SearchMatrixPairs and SearchMatrixOffsets in GRPC_ENDPOINT_WHITELIST. The reviewed head file `src/co…
Out of Scope Changes check Passed The gRPC entries match issue #10943. The raw summary also reports a REST whitelist entry /collections/{collection_name}/index/{field_name}, which is present at the reviewed head. The PR description …
Full details: Title check

Explanation

The title names the change: adding five RPCs to the gRPC metrics endpoint whitelist so they match the REST whitelist. It uses the fix: prefix and states the sync target. The changeset only adds whitelist entries in requests.rs, so the title matches the main change. It is concise and specific.

Full details: Description check

Explanation

The description states the purpose: five Points RPCs were missing from GRPC_ENDPOINT_WHITELIST while their REST siblings were whitelisted. It lists the five entries added to requests.rs, the binary-search sortedness note, the new test, and the manual verification steps. It relates directly to the changeset.

Full details: Linked Issues check

Explanation

Issue #10943 requires gRPC whitelist entries for DeleteVectors, CreateFieldIndex, DeleteFieldIndex, SearchMatrixPairs and SearchMatrixOffsets in GRPC_ENDPOINT_WHITELIST. The reviewed head file src/common/metrics/requests.rs contains all five entries as /qdrant.Points/... strings. They are in lexicographic order between their neighbours, so the binary search still works. The existing test test_endpoint_whitelists_sorted checks this ordering. The issue names no non-coding tasks. The PR description says a new test test_grpc_whitelist_matches_rest_sibling_endpoints was added. The objectives say that test was removed as redundant. The head file view was truncated before the end of the test module, so this test was not confirmed. The issue does not require a new test, so this does not change the verdict.

Full details: Out of Scope Changes check

Explanation

The gRPC entries match issue #10943. The raw summary also reports a REST whitelist entry /collections/{collection_name}/index/{field_name}, which is present at the reviewed head. The PR description does not mention this REST change. The objectives' commit summary says it covers the DELETE field-index route, which is the REST side of DeleteFieldIndex, one of the five operations named in #10943. This connects the REST change to the issue's stated goal of matching REST and gRPC metrics coverage, so it is not an unrelated change. The repository diff could not be read (changed blobs missing from checkout), so the exact base-to-head change set is not confirmed. No unrelated change was identified in the files that could be read.

  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Repository UI (base), Organization UI (inherited)
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: b56ac6c0-c772-427b-9b70-6804a314707a
Commits

Reviewing files that changed from the base of the PR and between faf7502 and 0e7233c.

Files selected for processing: 1

  • src/common/metrics/requests.rs

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@avanish-garg avanish-garg changed the title [AI] fix: sync GRPC_ENDPOINT_WHITELIST with its REST metrics sibling fix: sync GRPC_ENDPOINT_WHITELIST with its REST metrics sibling Oct 6, 2026
@avanish-garg

Copy link
Copy Markdown
Author

Friendly ping: this small fix (syncing GRPC_ENDPOINT_WHITELIST with its REST metrics sibling, so grpc_responses_total covers the missing endpoints from #10943) is still mergeable against dev. Happy to make changes if you'd like it done differently.

timvisee and others added 2 commits November 26, 2026 14:01
DELETE /collections/{collection_name}/index/{field_name} is recorded under
its own route pattern, which was missing from REST_ENDPOINT_WHITELIST, so
rest_responses_total never reported field index deletions. The existing
/index entry only matches the PUT create route.

Extend the sibling test to check both whitelists for each gRPC/REST pair.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The test only re-asserted a hardcoded list of entries; sortedness is
already covered by test_endpoint_whitelists_sorted.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

@timvisee timvisee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! 😄

I've added another endpoint we added over time.

I've removed the test as I don't think it adds much value versus the constant list itself.

@timvisee
timvisee merged commit 838c561 into qdrant:dev Nov 26, 2026
32 checks passed
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