You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@fluss.apache.org by "zcoo (via GitHub)" <gi...@apache.org> on 2025/08/13 06:15:53 UTC

[PR] [metric] metrics aggregation [fluss]

zcoo opened a new pull request, #1531:
URL: https://github.com/apache/fluss/pull/1531

   <!--
   *Thank you very much for contributing to Fluss - we are happy that you want to help us improve Fluss. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [GitHub issue](https://github.com/alibaba/fluss/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no issue.
   
     - Name the pull request in the format "[component] Title of the pull request", where *[component]* should be replaced by the name of the component being changed. Typically, this corresponds to the component label assigned to the issue (e.g., [kv], [log], [client], [flink]). Skip *[component]* if you are unsure about which is the best component.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
   
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes.
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
   
   
   **(The sections below can be removed for hotfixes or typos)**
   -->
   
   ### Purpose
   
   <!-- Linking this pull request to the issue -->
   Linked issue: close #1525 
   
   <!-- What is the purpose of the change -->
   
   ### Brief change log
   
   <!-- Please describe the changes made in this pull request and explain how they address the issue -->
   
   ### Tests
   
   <!-- List UT and IT cases to verify this change -->
   
   ### API and Format
   
   <!-- Does this change affect API or storage format -->
   
   ### Documentation
   
   <!-- Does this change introduce a new feature -->
   


-- 
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@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [metric] metrics aggregation [fluss]

Posted by "wuchong (via GitHub)" <gi...@apache.org>.
wuchong merged PR #1531:
URL: https://github.com/apache/fluss/pull/1531


-- 
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@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [metric] metrics aggregation [fluss]

Posted by "swuferhong (via GitHub)" <gi...@apache.org>.
swuferhong commented on code in PR #1531:
URL: https://github.com/apache/fluss/pull/1531#discussion_r2278422185


##########
fluss-common/src/main/java/com/alibaba/fluss/metrics/MetricNames.java:
##########
@@ -100,7 +100,6 @@ public class MetricNames {
 
     // for replica
     public static final String UNDER_REPLICATED = "underReplicated";
-    public static final String IN_SYNC_REPLICAS = "inSyncReplicasCount";
     public static final String UNDER_MIN_ISR = "underMinIsr";
     public static final String AT_MIN_ISR = "atMinIsr";

Review Comment:
   Move these metric names to the `TabletServer section` above, as they now belong to the TabletServer level.



##########
website/docs/maintenance/observability/monitor-metrics.md:
##########
@@ -631,12 +631,7 @@ Some metrics might not be exposed when using other JVM implementations (e.g. IBM
       <td>Meter</td>
     </tr>
     <tr>
-      <td rowspan="7">table_bucket</td>
-      <td>inSyncReplicasCount</td>
-      <td>The inSync replicas count of this table bucket.</td>
-      <td>Gauge</td>
-    </tr>
-     <tr>

Review Comment:
   ditto, Move the modified metrics to correct table plane.



-- 
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@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [metric] metrics aggregation [fluss]

Posted by "wuchong (via GitHub)" <gi...@apache.org>.
wuchong commented on code in PR #1531:
URL: https://github.com/apache/fluss/pull/1531#discussion_r2339217212


##########
fluss-common/src/main/java/org/apache/fluss/metrics/MetricNames.java:
##########
@@ -94,35 +94,37 @@ public class MetricNames {
     public static final String FAILED_PREFIX_LOOKUP_REQUESTS_RATE =
             "failedPrefixLookupRequestsPerSecond";
 
-    // --------------------------------------------------------------------------------------------
-    // metrics for table bucket
-    // --------------------------------------------------------------------------------------------
-
     // for replica
     public static final String UNDER_REPLICATED = "underReplicated";
-    public static final String IN_SYNC_REPLICAS = "inSyncReplicasCount";
     public static final String UNDER_MIN_ISR = "underMinIsr";
     public static final String AT_MIN_ISR = "atMinIsr";
     public static final String ISR_EXPANDS_RATE = "isrExpandsPerSecond";
     public static final String ISR_SHRINKS_RATE = "isrShrinksPerSecond";
     public static final String FAILED_ISR_UPDATES_RATE = "failedIsrUpdatesPerSecond";
 
     // for log tablet
-    public static final String LOG_NUM_SEGMENTS = "numSegments";
-    public static final String LOG_END_OFFSET = "endOffset";
-    public static final String LOG_SIZE = "size";
     public static final String LOG_FLUSH_RATE = "flushPerSecond";

Review Comment:
   Considering this will be moved from bucket-level to server-level, it's better to add "log" prefix to distinguish with the metric of kv. E.g., `logFlushPerSecond` and `logFlushLatencyMs`



##########
fluss-common/src/main/java/org/apache/fluss/metrics/MetricNames.java:
##########
@@ -94,35 +94,37 @@ public class MetricNames {
     public static final String FAILED_PREFIX_LOOKUP_REQUESTS_RATE =
             "failedPrefixLookupRequestsPerSecond";
 
-    // --------------------------------------------------------------------------------------------
-    // metrics for table bucket
-    // --------------------------------------------------------------------------------------------
-
     // for replica
     public static final String UNDER_REPLICATED = "underReplicated";
-    public static final String IN_SYNC_REPLICAS = "inSyncReplicasCount";
     public static final String UNDER_MIN_ISR = "underMinIsr";
     public static final String AT_MIN_ISR = "atMinIsr";
     public static final String ISR_EXPANDS_RATE = "isrExpandsPerSecond";
     public static final String ISR_SHRINKS_RATE = "isrShrinksPerSecond";
     public static final String FAILED_ISR_UPDATES_RATE = "failedIsrUpdatesPerSecond";
 
     // for log tablet
-    public static final String LOG_NUM_SEGMENTS = "numSegments";
-    public static final String LOG_END_OFFSET = "endOffset";
-    public static final String LOG_SIZE = "size";
     public static final String LOG_FLUSH_RATE = "flushPerSecond";
     public static final String LOG_FLUSH_LATENCY_MS = "flushLatencyMs";
 
     // for kv tablet
-    public static final String KV_LATEST_SNAPSHOT_SIZE = "latestSnapshotSize";
     public static final String KV_PRE_WRITE_BUFFER_TRUNCATE_AS_DUPLICATED_RATE =

Review Comment:
   We should remove the `void registerMetrics(BucketMetricGroup bucketMetricGroup)` of `KvTablet`, because we don't need to report bucket-level pre-write-buffer metrics. 



##########
fluss-common/src/main/java/org/apache/fluss/metrics/MetricNames.java:
##########
@@ -94,35 +94,37 @@ public class MetricNames {
     public static final String FAILED_PREFIX_LOOKUP_REQUESTS_RATE =
             "failedPrefixLookupRequestsPerSecond";
 
-    // --------------------------------------------------------------------------------------------
-    // metrics for table bucket
-    // --------------------------------------------------------------------------------------------
-
     // for replica
     public static final String UNDER_REPLICATED = "underReplicated";
-    public static final String IN_SYNC_REPLICAS = "inSyncReplicasCount";
     public static final String UNDER_MIN_ISR = "underMinIsr";
     public static final String AT_MIN_ISR = "atMinIsr";
     public static final String ISR_EXPANDS_RATE = "isrExpandsPerSecond";
     public static final String ISR_SHRINKS_RATE = "isrShrinksPerSecond";
     public static final String FAILED_ISR_UPDATES_RATE = "failedIsrUpdatesPerSecond";
 
     // for log tablet
-    public static final String LOG_NUM_SEGMENTS = "numSegments";
-    public static final String LOG_END_OFFSET = "endOffset";
-    public static final String LOG_SIZE = "size";
     public static final String LOG_FLUSH_RATE = "flushPerSecond";
     public static final String LOG_FLUSH_LATENCY_MS = "flushLatencyMs";
 
     // for kv tablet
-    public static final String KV_LATEST_SNAPSHOT_SIZE = "latestSnapshotSize";
     public static final String KV_PRE_WRITE_BUFFER_TRUNCATE_AS_DUPLICATED_RATE =
             "preWriteBufferTruncateAsDuplicatedPerSecond";
     public static final String KV_PRE_WRITE_BUFFER_TRUNCATE_AS_ERROR_RATE =
             "preWriteBufferTruncateAsErrorPerSecond";
     public static final String KV_PRE_WRITE_BUFFER_FLUSH_RATE = "preWriteBufferFlushPerSecond";
     public static final String KV_PRE_WRITE_BUFFER_FLUSH_LATENCY_MS =
             "preWriteBufferFlushLatencyMs";

Review Comment:
   It's better to name them `kvFlushPerSecond` and `kvFlushLatencyMs` to keep align with the log metrics. 



-- 
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@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [metric] metrics aggregation [fluss]

Posted by "zcoo (via GitHub)" <gi...@apache.org>.
zcoo commented on PR #1531:
URL: https://github.com/apache/fluss/pull/1531#issuecomment-3227172946

   @wuchong Sure. Now conflicts are resolved.


-- 
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@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [metric] metrics aggregation [fluss]

Posted by "wuchong (via GitHub)" <gi...@apache.org>.
wuchong commented on PR #1531:
URL: https://github.com/apache/fluss/pull/1531#issuecomment-3224777106

   @zcoo could you rebase and resolve the conflicts?


-- 
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@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [metric] metrics aggregation [fluss]

Posted by "wuchong (via GitHub)" <gi...@apache.org>.
wuchong commented on PR #1531:
URL: https://github.com/apache/fluss/pull/1531#issuecomment-3278995924

   @zcoo @swuferhong I appended a commit to address above comments, please take a look, especially the metric renaming.


-- 
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@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [metric] metrics aggregation [fluss]

Posted by "zcoo (via GitHub)" <gi...@apache.org>.
zcoo commented on PR #1531:
URL: https://github.com/apache/fluss/pull/1531#issuecomment-3199005661

   Thanks for reviewing @swuferhong . I have adjusted the position and description. PLAT~


-- 
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@fluss.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org