Skip to content

Add num points/vectors to metrics API#7302

Merged
timvisee merged 1 commit intodevfrom
metrics-points-per-collection
Oct 29, 2025
Merged

Add num points/vectors to metrics API#7302
timvisee merged 1 commit intodevfrom
metrics-points-per-collection

Conversation

@JojiiOfficial
Copy link
Contributor

@JojiiOfficial JojiiOfficial commented Sep 24, 2025

Depends on #7301

Add per-collection point and vector approximations to /metrics API:

# HELP collection_points approximate amount of points per collection
# TYPE collection_points gauge
collection_points{id="benchmark"} 100000
collection_points{id="1234"} 100000

# HELP collection_vectors approximate amount of vectors per collection
# TYPE collection_vectors gauge
collection_vectors{id="benchmark"} 100000
collection_vectors{id="1234"} 100000

@JojiiOfficial JojiiOfficial force-pushed the metrics-points-per-collection branch from 9f27753 to 3d94324 Compare September 26, 2025 08:37
@JojiiOfficial JojiiOfficial changed the base branch from metrics-active-replica to metrics-currently-running-optimizers September 26, 2025 08:38
));

metrics.push(metric_family(
"collection_points",
Copy link
Member

Choose a reason for hiding this comment

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

We might need to name it like this?

Suggested change
"collection_points",
"collection_points_total",

We can decide on that separately. I'd be fine with adjusting all metric names at the end in a single PR to follow convention. Then we can review together with some of our cloud people whom are more familiar with this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to the prometheus docs https://prometheus.io/docs/instrumenting/writing_exporters/

_total is a convention for counters, you should use it if you’re using the COUNTER type.

collection_points is a gauge, not counter type so per naming convention, this should not have a _total suffix.
If we already use this suffix for gauges in other places, I'm fine with adding this suffix to make it consistent.

@timvisee
Copy link
Member

timvisee commented Oct 7, 2025

Does it maybe make sense to also partition the vector counts by their vector name?

It could give interesting insights, like a named vector having zero vectors.

@JojiiOfficial JojiiOfficial force-pushed the metrics-currently-running-optimizers branch from df33643 to c4bfa71 Compare October 22, 2025 13:27
@JojiiOfficial JojiiOfficial force-pushed the metrics-points-per-collection branch from 3d94324 to 39f8520 Compare October 22, 2025 14:15
@JojiiOfficial
Copy link
Contributor Author

Does it maybe make sense to also partition the vector counts by their vector name?
It could give interesting insights, like a named vector having zero vectors.

Good Idea! I'll tackle this in a separate PR

Base automatically changed from metrics-currently-running-optimizers to dev October 23, 2025 08:46
@JojiiOfficial JojiiOfficial force-pushed the metrics-points-per-collection branch from 39f8520 to 086d4ff Compare October 23, 2025 09:04
@JojiiOfficial JojiiOfficial force-pushed the metrics-points-per-collection branch from 086d4ff to bc6b84c Compare October 29, 2025 14:09
@JojiiOfficial JojiiOfficial changed the base branch from dev to metrics-active-replica October 29, 2025 14:10
Base automatically changed from metrics-active-replica to dev October 29, 2025 14:59
@JojiiOfficial JojiiOfficial force-pushed the metrics-points-per-collection branch from bc6b84c to 9666988 Compare October 29, 2025 15:19
@qdrant qdrant deleted a comment from coderabbitai bot Oct 29, 2025
@timvisee timvisee merged commit eff9107 into dev Oct 29, 2025
12 checks passed
@timvisee timvisee deleted the metrics-points-per-collection branch October 29, 2025 15:40
timvisee pushed a commit that referenced this pull request Nov 14, 2025
@timvisee timvisee mentioned this pull request Nov 14, 2025
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.

3 participants