hanahmily opened a new pull request, #1155:
URL: https://github.com/apache/skywalking-banyandb/pull/1155
## Summary
The trace package's `StorageMetricsFactory` was using the root `trace`
scope, so per-segment inverted-index metrics from `pkg/index/inverted`
were emitted as `banyandb_trace_inverted_index_*`. The dashboard in
`docs/operation/grafana-cluster.json` (and the sibling `stream` package)
expect `banyandb_trace_storage_inverted_index_*`.
Add a `storageScope` mirroring `banyand/stream/metrics.go:31` and wire
it into `OpenDB`'s `TSDBOpts.StorageMetricsFactory`.
## Changes
- `banyand/trace/metrics.go` — add `storageScope =
streamScope.SubScope("storage")`
- `banyand/trace/metadata.go` — use `storageScope` in
`TSDBOpts.StorageMetricsFactory`
- `banyand/trace/storage_scope_test.go` — new regression test that asserts
the namespace chain (`banyandb_trace`, `banyandb_trace_tst`,
`banyandb_trace_storage`)
- `CHANGES.md` — Bug Fixes entry under 0.11.0
## Breaking change
The metric name `banyandb_trace_inverted_index_*` is renamed to
`banyandb_trace_storage_inverted_index_*`. The old series will disappear
after this rolls out. Sibling metrics affected:
- `banyandb_trace_inverted_index_total_updates` →
`banyandb_trace_storage_inverted_index_total_updates`
- `banyandb_trace_inverted_index_total_doc_count` →
`banyandb_trace_storage_inverted_index_total_doc_count`
- `banyandb_trace_inverted_index_total_term_searchers_started` →
`banyandb_trace_storage_inverted_index_total_term_searchers_started`
Other trace metrics (`trace_tst_*`, `trace_scheduler_*`, etc.) are
unaffected.
## Verification
Local CI (all checks pass):
- `make license-check` ✅
- `make check-req` ✅
- `make build` ✅
- `make lint` ✅ (31 linters, 0 issues)
- `make check` ✅ (no auto-fix changes)
- `./banyand/...` unit tests ✅ (33 suites, 6m 40s)
- `./bydbctl/...` unit tests ✅ (88 specs, 6m 45s)
- `./pkg/...` unit tests ✅ (47 suites, 1m 20s)
- `./fodc/...` unit tests ✅ (19 suites, 2m 51s)
- `./test/integration/standalone/...` ✅ (12 suites, 27m 51s)
- `./test/integration/distributed/...` ✅ (12 suites, 19m 21s)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]