shounakmk219 commented on code in PR #12739: URL: https://github.com/apache/pinot/pull/12739#discussion_r1557429067
########## docker/images/pinot/etc/jmx_prometheus_javaagent/configs/broker.yml: ########## @@ -1,76 +1,90 @@ rules: -- pattern: "\"org.apache.pinot.common.metrics\"<type=\"BrokerMetrics\", name=\"pinot.broker.([^\\.]*?).authorization\"><>(\\w+)" - name: "pinot_broker_authorization_$2" +- pattern: "\"org.apache.pinot.common.metrics\"<type=\"BrokerMetrics\", name=\"pinot.broker.(([^\\.]+)\\.)?([^\\.]*?).authorization\"><>(\\w+)" Review Comment: Came across a case where the the unescapped `.` is breaking the metric parsing Metric endpoint result : ``` pinot_controller_segmentCount_Value{database="ncludingReplaced",table="ncludingReplaced.test",tableType="OFFLINE",} 1.0 ``` Actual metric : ``` pinot.controller.segmentCountIncludingReplaced.test_OFFLINE ``` Rule it was supposed to match : ``` pattern: "\"?org\\.apache\\.pinot\\.common\\.metrics\"?<type=\"?\\w+\"?, name=\"?pinot\\.(\\w+)\\.(\\w+)\\.((\\w+)\\.)?(\\w+)_(OFFLINE|REALTIME)\\\"?><>(\\w+)" ``` Rule it actually matched : ``` pattern: "\"org.apache.pinot.common.metrics\"<type=\"ControllerMetrics\", name=\"pinot.controller.segmentCount.(([^\\.]+)\\.)?([^\\.]*?)_(OFFLINE|REALTIME)\"><>(\\w+)" ``` This answers your question @Jackie-Jiang , we need to escape `.` at all places in the pattern string to parse it as a dot literal. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org