featzhang commented on code in PR #27560:
URL: https://github.com/apache/flink/pull/27560#discussion_r2791988363


##########
flink-table/flink-table-common/src/main/java/org/apache/flink/table/functions/PredictFunction.java:
##########
@@ -29,28 +32,159 @@
  * A wrapper class of {@link TableFunction} for synchronous model inference.
  *
  * <p>The output type of this table function is fixed as {@link RowData}.
+ *
+ * <p>This class provides built-in metrics for monitoring model inference 
performance, including:
+ *
+ * <ul>
+ *   <li>inference_requests: Total number of inference requests
+ *   <li>inference_requests_success: Number of successful inference requests
+ *   <li>inference_requests_failure: Number of failed inference requests
+ *   <li>inference_latency: Histogram of inference latency in milliseconds
+ *   <li>inference_rows_output: Total number of output rows from inference
+ * </ul>
  */
 @PublicEvolving
 public abstract class PredictFunction extends TableFunction<RowData> {
 
+    // ------------------------------------------------------------------------

Review Comment:
   Thanks for the suggestion.
   
   This PR only adds unified metrics around model invocation in this class and 
does not modify the existing functional logic. I’ve added additional comments 
to clarify the metric behavior and integration.
   
   If you still think we should add explicit unit tests for these metric hooks, 
I’m happy to extend the test coverage accordingly.



-- 
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]

Reply via email to