You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "errose28 (via GitHub)" <gi...@apache.org> on 2026/06/12 22:58:49 UTC
Re: [PR] HDDS-13133. Display Ratis state machine event timeline in OM web UI [ozone]
errose28 commented on code in PR #10034:
URL: https://github.com/apache/ozone/pull/10034#discussion_r3406654507
##########
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/container/placement/metrics/SCMMetrics.java:
##########
@@ -155,6 +171,22 @@ public void decrContainerStat(ContainerStat deltaStat) {
this.containerReportWriteCount.incr(-1 * deltaStat.getWriteCount().get());
}
+ public void addRatisEvent(String event) {
+ synchronized (ratisEvents) {
+ if (ratisEvents.size() >= maxRatisEvents) {
+ ratisEvents.removeFirst();
+ }
+ ratisEvents.add(Time.formatTime(Time.now()) + "|" + event);
+ }
+ }
+
+ @Metric("Ratis state machine events")
+ public String getRatisEvents() {
+ synchronized (ratisEvents) {
+ return String.join("\n", ratisEvents);
Review Comment:
Newlines are invalid separators in Prometheus. This change prevents all SCM metrics from being ingested into Prometheus. @jojochuang we should:
- Convert this to a different separator like `|`
- Add a command to our acceptance tests to check that all nodes' Prometheus instances have registered metrics.
- Probably `GET http://localhost:9090/api/v1/targets` and ensure that `health=up` for each component.
<img width="1855" height="251" alt="Image" src="https://github.com/user-attachments/assets/12439069-f0ce-4460-9328-2e7239150ccf" />
--
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: issues-unsubscribe@ozone.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org