Skip to content

Commit 1d12399

Browse files
committed
Adjust tests and openapi specs
1 parent 234f936 commit 1d12399

4 files changed

Lines changed: 16 additions & 16 deletions

File tree

docs/redoc/master/openapi.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@
332332
"text/plain": {
333333
"schema": {
334334
"type": "string",
335-
"example": "# HELP qdrant_app_info information about qdrant server\n# TYPE qdrant_app_info gauge\nqdrant_app_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP qdrant_cluster_enabled is cluster support enabled\n# TYPE qdrant_cluster_enabled gauge\nqdrant_cluster_enabled 0\n# HELP qdrant_collections_total number of collections\n# TYPE qdrant_collections_total gauge\nqdrant_collections_total 1\n"
335+
"example": "# HELP app_info information about qdrant server\n# TYPE app_info gauge\napp_info{name=\"qdrant\",version=\"0.11.1\"} 1\n# HELP cluster_enabled is cluster support enabled\n# TYPE cluster_enabled gauge\ncluster_enabled 0\n# HELP collections_total number of collections\n# TYPE collections_total gauge\ncollections_total 1\n"
336336
}
337337
}
338338
}

openapi/openapi-service.ytt.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ paths:
6363
schema:
6464
type: string
6565
example: |
66-
# HELP qdrant_app_info information about qdrant server
67-
# TYPE qdrant_app_info gauge
68-
qdrant_app_info{name="qdrant",version="0.11.1"} 1
69-
# HELP qdrant_cluster_enabled is cluster support enabled
70-
# TYPE qdrant_cluster_enabled gauge
71-
qdrant_cluster_enabled 0
72-
# HELP qdrant_collections_total number of collections
73-
# TYPE qdrant_collections_total gauge
74-
qdrant_collections_total 1
66+
# HELP app_info information about qdrant server
67+
# TYPE app_info gauge
68+
app_info{name="qdrant",version="0.11.1"} 1
69+
# HELP cluster_enabled is cluster support enabled
70+
# TYPE cluster_enabled gauge
71+
cluster_enabled 0
72+
# HELP collections_total number of collections
73+
# TYPE collections_total gauge
74+
collections_total 1
7575
"4XX":
7676
description: error
7777

src/common/metrics.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ impl MetricsProvider for TelemetryData {
128128

129129
#[cfg(target_os = "linux")]
130130
match ProcFsMetrics::collect() {
131-
Ok(procfs_provider) => procfs_provider.add_metrics(metrics),
131+
Ok(procfs_provider) => procfs_provider.add_metrics(metrics, prefix),
132132
Err(err) => log::warn!("Error reading procfs infos: {err:?}"),
133133
};
134134
}
@@ -305,8 +305,8 @@ impl MetricsProvider for CollectionsTelemetry {
305305
"amount of vectors grouped by vector name",
306306
MetricType::GAUGE,
307307
vector_count_by_name,
308+
prefix,
308309
));
309-
prefix,
310310
}
311311

312312
if !indexed_only_excluded.is_empty() {

tests/openapi/test_service.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ def test_metrics():
2020
assert response.ok
2121

2222
# Probe some strings that must exist in the metrics output
23-
assert '# HELP qdrant_app_info information about qdrant server' in response.text
24-
assert '# TYPE qdrant_app_info gauge' in response.text
25-
assert 'qdrant_app_info{name="qdrant",version="' in response.text
26-
assert 'qdrant_collections_total ' in response.text
23+
assert '# HELP app_info information about qdrant server' in response.text
24+
assert '# TYPE app_info gauge' in response.text
25+
assert 'app_info{name="qdrant",version="' in response.text
26+
assert 'collections_total ' in response.text
2727

2828

2929
def test_telemetry():

0 commit comments

Comments
 (0)