wxbty commented on code in PR #13033: URL: https://github.com/apache/dubbo/pull/13033#discussion_r1321130439
########## dubbo-metrics/dubbo-metrics-api/src/main/java/org/apache/dubbo/metrics/model/MethodMetric.java: ########## @@ -38,10 +41,23 @@ public class MethodMetric extends ServiceKeyMetric { public MethodMetric(ApplicationModel applicationModel, Invocation invocation) { super(applicationModel, MetricsSupport.getInterfaceName(invocation)); - this.methodName = RpcUtils.getMethodName(invocation); this.side = MetricsSupport.getSide(invocation); this.group = MetricsSupport.getGroup(invocation); this.version = MetricsSupport.getVersion(invocation); + if (isServiceLevel(applicationModel)) { + this.methodName = ""; + return; + } + this.methodName = RpcUtils.getMethodName(invocation); Review Comment: Why does methodName need to be assigned an empty string,service-level does not display this label, Will this be more concise? if (!isServiceLevel(applicationModel)) { this.methodName = RpcUtils.getMethodName(invocation); } -- 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: notifications-unsubscr...@dubbo.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org For additional commands, e-mail: notifications-h...@dubbo.apache.org