krishan1390 opened a new pull request, #15387: URL: https://github.com/apache/pinot/pull/15387
Adding metrics to all error codes returned by the broker. Currently, the broker emits certain metrics for certain error codes but its not comprehensive nor accurate (there is a many to many relationship between error codes and metrics) Rather than refactor the code, in this PR, we're adding new standardized metrics for query error codes from broker. Will try to add similar metrics from server (which will help identify which server has an issue) Note to reviewers: 1. PR tags to be added - metrics, observability 2. Let me know if anything else needs to be specifically tested Testing Done: 1. Verified new metrics are present through jmxterm ``` "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorAccessDenied",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorBrokerInstanceMissing",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorBrokerRequestSend",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorBrokerResourceMissing",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorBrokerSegmentUnavailable",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorBrokerTimeout",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorExecutionTimeout",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorInternal",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorJsonParsing",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorMergeResponse",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorQueryCancellation",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorQueryExecution",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorQueryPlanning",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorQuerySchedulingTimeout",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorQueryValidation",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorServerNotResponding",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorServerOutOfCapacity",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorServerResourceLimitExceeded",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorServerSegmentMissing",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorServerShuttingDown",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorServerTableMissing",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorSqlParsing",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorSqlRuntime",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorTableDoesNotExist",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorTableIsDisabled",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorTooManyRequests",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorUnknown",type="BrokerMetrics" "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorUnknownColumn",type="BrokerMetrics" ``` 3. Verified count is increasing when issuing a wrong query ``` $>bean "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorUnknownColumn",type="BrokerMetrics" #bean is set to "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorUnknownColumn",type="BrokerMetrics" $>get Count #mbean = "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorUnknownColumn",type="BrokerMetrics": Count = 1; $>get Count #mbean = "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorUnknownColumn",type="BrokerMetrics": Count = 2; $>bean "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorTableDoesNotExist",type="BrokerMetrics" #bean is set to "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorTableDoesNotExist",type="BrokerMetrics" $>get Count #mbean = "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorTableDoesNotExist",type="BrokerMetrics": Count = 1; $>get Count #mbean = "org.apache.pinot.common.metrics":name="pinot.broker.queryErrorTableDoesNotExist",type="BrokerMetrics": Count = 2; ``` -- 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