peter-toth commented on code in PR #299:
URL: 
https://github.com/apache/spark-kubernetes-operator/pull/299#discussion_r2314314984


##########
spark-operator/src/main/java/org/apache/spark/k8s/operator/metrics/source/OperatorJosdkMetrics.java:
##########
@@ -104,14 +98,17 @@ public void receivedEvent(Event event, Map<String, Object> 
metadata) {
           getResourceClass(metadata);
       final Optional<String> namespaceOptional = 
event.getRelatedCustomResourceID().getNamespace();
       resource.ifPresent(
-          aClass -> getCounter(aClass, action.name().toLowerCase(), RESOURCE, 
EVENT).inc());
+          aClass ->
+              getCounter(getMetricName(aClass, action.name().toLowerCase(), 
RESOURCE, EVENT))

Review Comment:
   As you extracted `BaseOperatorSource` and refactored `getCounter()` / 
`getGauge()` / `getTimer()` to have only one `metricName` argument, you need to 
call `getMetricName()` almost as many times as you call the above APIs.
   I wonder if you could keep an old methods to avoid the changes at these 
callsites.
   
   If you really new, one argument versions then you can add them as overloaded 
methods.



-- 
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: reviews-unsubscr...@spark.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to