@Override
    public void visit(GetRequest getRequest) {
      boolean isReplicaRequest = getRequest.getClientId().startsWith(GetRequest.Replication_Client_Id_Prefix);
      if (getRequest.getMessageFormatFlag() == MessageFormatFlags.Blob) {
        metrics.getBlobRequestQueueTimeInMs.update(requestQueueTime);
        metrics.getBlobRequestRate.mark();
        metrics.getBlobProcessingTimeInMs.update(requestProcessingTime);
        metrics.updateGetBlobProcessingTimeBySize(responseBlobSize, requestProcessingTime);
        responseQueueTimeHistogram = metrics.getBlobResponseQueueTimeInMs;
        responseSendTimeHistogram = metrics.getBlobSendTimeInMs;
        requestTotalTimeHistogram = metrics.getBlobTotalTimeInMs;
        if (isRequestDropped) {
          metrics.getBlobDroppedRate.mark();
          metrics.totalRequestDroppedRate.mark();
        }
      } else if (getRequest.getMessageFormatFlag() == MessageFormatFlags.BlobProperties) {
        metrics.getBlobPropertiesRequestQueueTimeInMs.update(requestQueueTime);
        metrics.getBlobPropertiesRequestRate.mark();
        metrics.getBlobPropertiesProcessingTimeInMs.update(requestProcessingTime);
        responseQueueTimeHistogram = metrics.getBlobPropertiesResponseQueueTimeInMs;
        responseSendTimeHistogram = metrics.getBlobPropertiesSendTimeInMs;
        requestTotalTimeHistogram = metrics.getBlobPropertiesTotalTimeInMs;
        if (isRequestDropped) {
          metrics.getBlobPropertiesDroppedRate.mark();
          metrics.totalRequestDroppedRate.mark();
        }
      } else if (getRequest.getMessageFormatFlag() == MessageFormatFlags.BlobUserMetadata) {
        metrics.getBlobUserMetadataRequestQueueTimeInMs.update(requestQueueTime);
        metrics.getBlobUserMetadataRequestRate.mark();
        metrics.getBlobUserMetadataProcessingTimeInMs.update(requestProcessingTime);
        responseQueueTimeHistogram = metrics.getBlobUserMetadataResponseQueueTimeInMs;
        responseSendTimeHistogram = metrics.getBlobUserMetadataSendTimeInMs;
        requestTotalTimeHistogram = metrics.getBlobUserMetadataTotalTimeInMs;
        if (isRequestDropped) {
          metrics.getBlobUserMetadataDroppedRate.mark();
          metrics.totalRequestDroppedRate.mark();
        }
      } else if (getRequest.getMessageFormatFlag() == MessageFormatFlags.BlobInfo) {
        metrics.getBlobInfoRequestQueueTimeInMs.update(requestQueueTime);
        metrics.getBlobInfoRequestRate.mark();
        metrics.getBlobInfoProcessingTimeInMs.update(requestProcessingTime);
        responseQueueTimeHistogram = metrics.getBlobInfoResponseQueueTimeInMs;
        responseSendTimeHistogram = metrics.getBlobInfoSendTimeInMs;
        requestTotalTimeHistogram = metrics.getBlobInfoTotalTimeInMs;
        if (isRequestDropped) {
          metrics.getBlobInfoDroppedRate.mark();
          metrics.totalRequestDroppedRate.mark();
        }
      } else if (getRequest.getMessageFormatFlag() == MessageFormatFlags.All) {
        if (isReplicaRequest) {
          metrics.getBlobAllByReplicaRequestQueueTimeInMs.update(requestQueueTime);
          metrics.getBlobAllByReplicaRequestRate.mark();
          metrics.getBlobAllByReplicaProcessingTimeInMs.update(requestProcessingTime);
          // client id now has dc name at the end, for example: ClientId=replication-fetch-abc.example.com[dc1]
          String[] clientStrs = getRequest.getClientId().split("\\[");
          if (clientStrs.length > 1) {
            String clientDc = clientStrs[1].substring(0, clientStrs[1].length() - 1);
            if (!currentNode.getDatacenterName().equals(clientDc)) {
              metrics.updateCrossColoFetchBytesRate(clientDc, responseBlobSize);
            }
          }
          responseQueueTimeHistogram = metrics.getBlobAllByReplicaResponseQueueTimeInMs;
          responseSendTimeHistogram = metrics.getBlobAllByReplicaSendTimeInMs;
          requestTotalTimeHistogram = metrics.getBlobAllByReplicaTotalTimeInMs;
          if (isRequestDropped) {
            metrics.getBlobAllByReplicaDroppedRate.mark();
            metrics.totalRequestDroppedRate.mark();
          }
        } else {
          metrics.getBlobAllRequestQueueTimeInMs.update(requestQueueTime);
          metrics.getBlobAllRequestRate.mark();
          metrics.getBlobAllProcessingTimeInMs.update(requestProcessingTime);
          metrics.updateGetBlobProcessingTimeBySize(responseBlobSize, requestProcessingTime);
          responseQueueTimeHistogram = metrics.getBlobAllResponseQueueTimeInMs;
          responseSendTimeHistogram = metrics.getBlobAllSendTimeInMs;
          requestTotalTimeHistogram = metrics.getBlobAllTotalTimeInMs;
          if (isRequestDropped) {
            metrics.getBlobAllDroppedRate.mark();
            metrics.totalRequestDroppedRate.mark();
          }
        }
      }
    }
Used to update common metrics for the incoming request.
ambry-server/src/main/java/com/github/ambry/server/AmbryRequests.java