Skip to content

Avoid panics on empty metric families#7479

Merged
timvisee merged 1 commit intodevfrom
metrics-avoid-panic
Dec 2, 2025
Merged

Avoid panics on empty metric families#7479
timvisee merged 1 commit intodevfrom
metrics-avoid-panic

Conversation

@JojiiOfficial
Copy link
Contributor

Qdrant panics if we create an empty MetricFamily.
I've run into this a few times since in some cases it requires a manual check that's easy to miss.
One example is #7478.

This PR improves the metrics collection logic to prevent such panics in the future.
It should help avoid most similar issues in future.

@qdrant qdrant deleted a comment from coderabbitai bot Oct 30, 2025
@generall
Copy link
Member

@JojiiOfficial please resolve the conflict

@JojiiOfficial JojiiOfficial force-pushed the metrics-avoid-panic branch 2 times, most recently from 331ad6d to 1d56493 Compare October 31, 2025 14:51
@qdrant qdrant deleted a comment from coderabbitai bot Oct 31, 2025
@qdrant qdrant deleted a comment from coderabbitai bot Dec 1, 2025
@qdrant qdrant deleted a comment from coderabbitai bot Dec 1, 2025
@JojiiOfficial JojiiOfficial requested review from timvisee and removed request for timvisee December 2, 2025 10:35
@timvisee timvisee merged commit b4569d3 into dev Dec 2, 2025
15 checks passed
@timvisee timvisee deleted the metrics-avoid-panic branch December 2, 2025 14:03
timvisee pushed a commit that referenced this pull request Dec 3, 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