Discover possibly unused metrics in pkg/metrics/metrics.go
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Enhancement
During a metrics scan in the codebase, the following metrics in pkg/metrics/metrics.go appear to be registered but are not otherwise used in the code:
- [ ] `BatchAddIdxHistogram` and `AddIndexScanRate`
- [ ] `DistSQLScanKeysHistogram` and `DistSQLScanKeysPartialHistogram`
- [ ] `StatsInaccuracyRate`
- [ ] `ValidateReadTSFromPDCount`
- [ ] `GCRegionTooManyLocksCounter`
- [ ] `HandleSchemaValidate`
- [ ] `BindingCacheHitCounter` and `BindingCacheMissCounter`
These metrics might be outdated. We should verify whether they are still actively used, if any usage calls are missing and need to be added, or whether they can be safely removed to reduce maintenance overhead.
Contributor guide
Assessment
This issue has not been assessed yet.