pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] merlimat commented on a change in pull request #2914: Beginging to refactor function metrics to use prometheus
Date Sat, 03 Nov 2018 06:52:25 GMT
merlimat commented on a change in pull request #2914: Beginging to refactor function metrics
to use prometheus
URL: https://github.com/apache/pulsar/pull/2914#discussion_r230546947
 
 

 ##########
 File path: pulsar-functions/instance/src/main/java/org/apache/pulsar/functions/instance/JavaInstanceRunnable.java
 ##########
 @@ -205,23 +205,31 @@ public void run() {
                     }
                 }
 
-                // process the message
-                long processAt = System.currentTimeMillis();
-                stats.incrementProcessed(processAt);
                 addLogTopicHandler();
                 JavaExecutionResult result;
 
+                // set last invocation time
+                stats.setLastInvocationTime(System.currentTimeMillis());
+
+                // start time for process latency stat
+                Summary.Timer requestTimer = FunctionStats.statProcessLatency.labels(metricsLabels).startTimer();
 
 Review comment:
   I think we should be able to set the label once in the constructor instead of each time

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message