wu-sheng commented on issue #5973: URL: https://github.com/apache/skywalking/issues/5973#issuecomment-740510997
> swctl metrics top 10 --name="endpoint_cpm" --service=="xxx", the user set --service but its scope is Endpoint. So I think inferring the scope from the metric name is effective. Let's talk about `top n` separately. Have you taken a look at the UI configuration page? There is a `typeOfMetric` query like this, https://github.com/apache/skywalking-query-protocol/blob/4be8e459b0ff56ed5d41a3b5c2173ba83668831e/metrics-v2.graphqls#L138 You are using name referencing is very dangerous, and users can't follow, as the OAL script basically could be named by anyone. UI is configurable and not sensitive about this. So, the scope is really necessary in some cases.  ____ About the metrics naming, it is just related to the OAL variable name, https://github.com/apache/skywalking/blob/4aa9f301d0d97198f023e2d91779222e1a5787dc/oap-server/server-bootstrap/src/main/resources/oal/core.oal#L24 Even we could change it at any minute, we can't afford CLI breaks due to this. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
