[Bug] HStore Spring Actuator Metrics Sink Initialization once causes missing metrics
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java, spring-boot
- Domain
- databases, observability
Research direction
Start with the MetricsConfig registerMeters bean shown in the issue and trace the initialization timing for StoreMetrics, RocksDBMetrics, JRaftMetrics, ProcfsMetrics, and GRpcExMetrics. Use the /actuator/prometheus endpoint to compare metrics after HStore startup; done means the listed JRaft metrics are present reliably after initialization.
Written by the indexing model from the issue text.
Description
Bug Type (问题类型)
logic (逻辑设计问题)
Before submit
- 我已经确认现有的 Issues 与 FAQ 中没有相同 / 重复问题 (I have confirmed and searched that there are no similar problems in the historical issue and documents)
Environment (环境信息)
- Server Version: master
- Backend: HStore
Expected & Actual behavior (期望与实际表现)
期望结果
通过Spring Actuator 接口获取正确的 JRaft 监控指标
curl http://ip:8620/actuator/prometheus
BUG 详情
HStore 节点初始化后,通过prometheus 定时拉取指标,此时会造成指标丢失
BUG根本原因是初始化仅一次,JRaft 有些埋点暂时还未注册,因此造成缺失
具体错误逻辑代码如下
@Configuration
public class MetricsConfig {
@Bean
public MeterRegistryCustomizer<MeterRegistry> metricsCommonTags() {
return (registry) -> registry.config().commonTags("hg", "store");
}
@Bean
public MeterRegistryCustomizer<MeterRegistry> registerMeters() {
return (registry) -> {
StoreMetrics.init(registry);
RocksDBMetrics.init(registry);
JRaftMetrics.init(registry);
ProcfsMetrics.init(registry);
GRpcExMetrics.init(registry);
};
}
}
具体指标
append-logs
fsm-apply-tasks
fsm-commit
fsm-leader-stop
fsm-snapshot-load
fsm-snapshot-save
fsm-start-following
fsm-stop-following
handle-append-entries
handle-heartbeat-requests
pre-vote
request-vote
replicate-entries
save-raft-meta
truncate-log-prefix
Vertex/Edge example (问题点 / 边数据举例)
No response
Schema [VertexLabel, EdgeLabel, IndexLabel] (元数据结构)
No response
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 637
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 23
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/hugegraph
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 5/5 Over a week Newbie friendliness 28/100
All issues in apache/hugegraph
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100