This is an automated email from the ASF dual-hosted git repository.
wu-sheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 53cc332752 Fix BanyanDB property_index_merge_latency unit:
nanoseconds, not seconds (#13906)
53cc332752 is described below
commit 53cc332752d5b5aa84a0eddf66ccd2a5c1b7d316
Author: 吴晟 Wu Sheng <[email protected]>
AuthorDate: Fri Jun 12 21:40:18 2026 +0800
Fix BanyanDB property_index_merge_latency unit: nanoseconds, not seconds
(#13906)
property_index_merge_latency converted its source with *1000 (seconds->ms),
but
banyandb_property_inverted_index_total_merge_latency is bluge's
inverted-index
ZapTime -- a raw time.Duration in NANOSECONDS (pkg/index/inverted/metrics.go
sets float64(TotFileMergeZapTime); bluge index/merge.go computes
uint64(time.Since(...))), never .Seconds(). So the metric over-reported by
1e6.
Convert ns->ms with /1000000.
---
.../src/main/resources/otel-rules/banyandb/banyandb-endpoint.yaml | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git
a/oap-server/server-starter/src/main/resources/otel-rules/banyandb/banyandb-endpoint.yaml
b/oap-server/server-starter/src/main/resources/otel-rules/banyandb/banyandb-endpoint.yaml
index 448bcf2b61..6090727f47 100644
---
a/oap-server/server-starter/src/main/resources/otel-rules/banyandb/banyandb-endpoint.yaml
+++
b/oap-server/server-starter/src/main/resources/otel-rules/banyandb/banyandb-endpoint.yaml
@@ -132,10 +132,14 @@ metricsRules:
# rate(merge_started) in ms.
banyandb_property_inverted_index_total_merge_started carries
# type=file/mem; .sum() collapses it (file is the on-disk merge). Property
merge IS applicable,
# unlike the _total_written-based write_rate which property never emits.
+ # UNIT: property's merge-latency gauge is the bluge inverted-index ZapTime,
accumulated in
+ # NANOSECONDS (uint64(time.Since(...)), bluge index/merge.go) -- NOT seconds
like the tst
+ # merge_file_latency rules (banyand/measure/merger.go
incTotalMergeLatency(elapsed.Seconds())).
+ # So convert ns -> ms with /1000000, NOT the *1000 (s->ms) used by the tst
latency rules.
- name: property_index_merge_rate
exp: banyandb_property_inverted_index_total_merge_started.sum(['cluster',
'group']).rate('PT1M') * 60
- name: property_index_merge_latency
- exp: banyandb_property_inverted_index_total_merge_latency.sum(['cluster',
'group']).rate('PT1M').safeDiv(banyandb_property_inverted_index_total_merge_started.sum(['cluster',
'group']).rate('PT1M')) * 1000
+ exp: banyandb_property_inverted_index_total_merge_latency.sum(['cluster',
'group']).rate('PT1M').safeDiv(banyandb_property_inverted_index_total_merge_started.sum(['cluster',
'group']).rate('PT1M')) / 1000000
# ---- Series write rate (per data-model type) ----
# inverted-index updates/s for the group (series-write proxy). NOTE:
*_inverted_index_total_updates