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 need the 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]