You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2026/06/12 12:44:47 UTC
(skywalking) branch fix/banyandb-property-merge-latency-ns created (now f1d0589f6f)
This is an automated email from the ASF dual-hosted git repository.
wu-sheng pushed a change to branch fix/banyandb-property-merge-latency-ns
in repository https://gitbox.apache.org/repos/asf/skywalking.git
at f1d0589f6f Fix BanyanDB property_index_merge_latency unit: nanoseconds, not seconds
This branch includes the following new commits:
new f1d0589f6f Fix BanyanDB property_index_merge_latency unit: nanoseconds, not seconds
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(skywalking) 01/01: Fix BanyanDB property_index_merge_latency unit: nanoseconds, not seconds
Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wu-sheng pushed a commit to branch fix/banyandb-property-merge-latency-ns
in repository https://gitbox.apache.org/repos/asf/skywalking.git
commit f1d0589f6f2b2b45b0b70d3231da18111d89c7f6
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Fri Jun 12 20:44:36 2026 +0800
Fix BanyanDB property_index_merge_latency unit: nanoseconds, not seconds
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.
Audited every other BanyanDB latency rule against the source: all correct. Every
other family records .Seconds(); the histogram p99 rules get an implicit
seconds->ms from histogram()'s default SECONDS bucket unit (le * toMillis(1)),
so they correctly omit *1000; the safeDiv *1000 rules (query / merge-file
latency) match their seconds source.
Co-Authored-By: Claude Opus 4.8 (1M context) <no...@anthropic.com>
---
.../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