wuchong commented on code in PR #1466:
URL: https://github.com/apache/fluss/pull/1466#discussion_r2265204032
##########
fluss-server/src/main/java/com/alibaba/fluss/server/coordinator/event/CoordinatorEventManager.java:
##########
@@ -121,6 +126,33 @@ public void clearAndPut(CoordinatorEvent event) {
});
}
+ private Histogram getOrCreateEventProcessTimeHistogram(
+ Class<? extends CoordinatorEvent> eventType) {
+ return eventProcessTimeByType.computeIfAbsent(
+ eventType,
+ type -> {
+ String eventTypeName = type.getSimpleName();
+ MetricGroup eventTypeGroup =
+ coordinatorMetricGroup.addGroup("event_type",
eventTypeName);
Review Comment:
I mean we can create different `MetricGroup` instances with event type in
the variable maps. Such as a `class CoordinatorEventMetricGroup(EventType)`
with event type as constructor parameter, and the parameter will be used in the
variable maps. So that all the event reports the same metric name, but with
different variables (labels).
IIUC, the current implementation can't aggregate different event types in
metric system, as the are different metric names.
--
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]