mirror of
https://github.com/qdrant/qdrant.git
synced 2026-10-02 19:07:48 -05:00
* Fix incorrect metrics value for cluster commit * Rewrite metrics logic, don't use registry, write values directly * Only report REST timings for requests having HTTP 200 response * Limit metrics reporting of endpoints to whitelist The whitelist contains a selection of search, recommend and upsert endpoints. * Add MetricsParam, remove detail level, keep anonymize * Request metrics in basic API test * Specify content type for metrics endpoint * Add OpenAPI test for metrics endpoint, remove from basic API test This test probes for some strings that must exist in the output * Add note that metrics endpoint whitelist must be sorted
18 lines
513 B
Python
18 lines
513 B
Python
import pytest
|
|
|
|
from .helpers.helpers import request_with_validation
|
|
|
|
|
|
def test_metrics():
|
|
response = request_with_validation(
|
|
api='/metrics',
|
|
method="GET",
|
|
)
|
|
assert response.ok
|
|
|
|
# Probe some strings that must exist in the metrics output
|
|
assert '# HELP app_info information about qdrant server' in response.text
|
|
assert '# TYPE app_info counter' in response.text
|
|
assert 'app_info{name="qdrant",version="' in response.text
|
|
assert 'collections_total ' in response.text
|