This is an automated email from the ASF dual-hosted git repository.
yunhong pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/fluss.git
The following commit(s) were added to refs/heads/main by this push:
new 60bc74f0 [Docs] Coordinator event metrics (#1272)
60bc74f0 is described below
commit 60bc74f0365aebea6910f0071bc7b8607fdff581
Author: xiaozhou <[email protected]>
AuthorDate: Wed Jul 9 13:36:19 2025 +0800
[Docs] Coordinator event metrics (#1272)
* [Docs] Add coordinator event metric document
* [Docs] Add coordinator event metric document
---
.../java/com/alibaba/fluss/metrics/MetricNames.java | 2 +-
.../coordinator/event/CoordinatorEventManager.java | 8 ++++----
.../docs/maintenance/observability/monitor-metrics.md | 19 +++++++++++++++++--
3 files changed, 22 insertions(+), 7 deletions(-)
diff --git
a/fluss-common/src/main/java/com/alibaba/fluss/metrics/MetricNames.java
b/fluss-common/src/main/java/com/alibaba/fluss/metrics/MetricNames.java
index 0c5fed69..dee2aa16 100644
--- a/fluss-common/src/main/java/com/alibaba/fluss/metrics/MetricNames.java
+++ b/fluss-common/src/main/java/com/alibaba/fluss/metrics/MetricNames.java
@@ -44,8 +44,8 @@ public class MetricNames {
// for coordinator event processor
public static final String EVENT_QUEUE_SIZE = "eventQueueSize";
- public static final String EVENT_PROCESS_TIME_MS = "eventProcessTimeMs";
public static final String EVENT_QUEUE_TIME_MS = "eventQueueTimeMs";
+ public static final String EVENT_PROCESSING_TIME_MS =
"eventProcessingTimeMs";
//
--------------------------------------------------------------------------------------------
// metrics for tablet server
diff --git
a/fluss-server/src/main/java/com/alibaba/fluss/server/coordinator/event/CoordinatorEventManager.java
b/fluss-server/src/main/java/com/alibaba/fluss/server/coordinator/event/CoordinatorEventManager.java
index 3e51ebcf..1ecaf8da 100644
---
a/fluss-server/src/main/java/com/alibaba/fluss/server/coordinator/event/CoordinatorEventManager.java
+++
b/fluss-server/src/main/java/com/alibaba/fluss/server/coordinator/event/CoordinatorEventManager.java
@@ -53,7 +53,7 @@ public final class CoordinatorEventManager implements
EventManager {
private final Lock putLock = new ReentrantLock();
// metrics
- private Histogram eventProcessTime;
+ private Histogram eventProcessingTime;
private Histogram eventQueueTime;
private static final int WINDOW_SIZE = 100;
@@ -68,9 +68,9 @@ public final class CoordinatorEventManager implements
EventManager {
private void registerMetrics() {
coordinatorMetricGroup.gauge(MetricNames.EVENT_QUEUE_SIZE,
queue::size);
- eventProcessTime =
+ eventProcessingTime =
coordinatorMetricGroup.histogram(
- MetricNames.EVENT_PROCESS_TIME_MS,
+ MetricNames.EVENT_PROCESSING_TIME_MS,
new DescriptiveStatisticsHistogram(WINDOW_SIZE));
eventQueueTime =
@@ -138,7 +138,7 @@ public final class CoordinatorEventManager implements
EventManager {
log.error("Uncaught error processing event {}.",
coordinatorEvent, e);
} finally {
long eventFinishTimeMs = System.currentTimeMillis();
- eventProcessTime.update(eventFinishTimeMs - eventStartTimeMs);
+ eventProcessingTime.update(eventFinishTimeMs -
eventStartTimeMs);
}
}
}
diff --git a/website/docs/maintenance/observability/monitor-metrics.md
b/website/docs/maintenance/observability/monitor-metrics.md
index 162b87d6..7527a0a3 100644
--- a/website/docs/maintenance/observability/monitor-metrics.md
+++ b/website/docs/maintenance/observability/monitor-metrics.md
@@ -312,8 +312,8 @@ Some metrics might not be exposed when using other JVM
implementations (e.g. IBM
</thead>
<tbody>
<tr>
- <th rowspan="6"><strong>coordinator</strong></th>
- <td style={{textAlign: 'center', verticalAlign: 'middle' }}
rowspan="6">-</td>
+ <th rowspan="9"><strong>coordinator</strong></th>
+ <td style={{textAlign: 'center', verticalAlign: 'middle' }}
rowspan="9">-</td>
<td>activeCoordinatorCount</td>
<td>The number of active CoordinatorServer in this cluster.</td>
<td>Gauge</td>
@@ -343,6 +343,21 @@ Some metrics might not be exposed when using other JVM
implementations (e.g. IBM
<td>The total number of replicas in the progress to be deleted in this
cluster.</td>
<td>Gauge</td>
</tr>
+ <tr>
+ <td>eventQueueSize</td>
+ <td>The number of events waiting to be processed in the queue.</td>
+ <td>Gauge</td>
+ </tr>
+ <tr>
+ <td>eventQueueTimeMs</td>
+ <td>The time that an event spent waiting in the queue to be
processed.</td>
+ <td>Histogram</td>
+ </tr>
+ <tr>
+ <td>eventProcessingTimeMs</td>
+ <td>The time that an event took to be processed.</td>
+ <td>Histogram</td>
+ </tr>
</tbody>
</table>