Source:
<code>public void handleOptions(RestRequest restRequest, RestResponseChannel restResponseChannel) { long processingStartTime = System.currentTimeMillis(); handlePrechecks(restRequest, restResponseChannel); RestRequestMetrics requestMetrics = restRequest.getSSLSession() != null ? frontendMetrics.optionsSSLMetrics : frontendMetrics.optionsMetrics; restRequest.getMetricsTracker().injectMetrics(requestMetrics); Exception exception = null; try { logger.trace("Handling OPTIONS request - {}", restRequest.getUri()); checkAvailable(); securityService.preProcessRequest(restRequest).get(); long preProcessingEndTime = System.currentTimeMillis(); <START> frontendMetrics.optionsPreProcessingTimeInMs.update(preProcessingEndTime - processingStartTime); <END> securityService.processRequest(restRequest).get(); long securityRequestProcessingEndTime = System.currentTimeMillis(); frontendMetrics.optionsSecurityRequestTimeInMs.update(securityRequestProcessingEndTime - preProcessingEndTime); restResponseChannel.setStatus(ResponseStatus.Ok); restResponseChannel.setHeader(RestUtils.Headers.DATE, new GregorianCalendar().getTime()); restResponseChannel.setHeader(RestUtils.Headers.CONTENT_LENGTH, 0); restResponseChannel.setHeader(Headers.ACCESS_CONTROL_ALLOW_METHODS, frontendConfig.optionsAllowMethods); restResponseChannel.setHeader(Headers.ACCESS_CONTROL_MAX_AGE, frontendConfig.optionsValiditySeconds); securityService.processResponse(restRequest, restResponseChannel, null).get(); long securityResponseProcessingEndTime = System.currentTimeMillis(); frontendMetrics.optionsSecurityResponseTimeInMs.update( securityResponseProcessingEndTime - securityRequestProcessingEndTime); } catch (Exception e) { exception = extractExecutionExceptionCause(e); } submitResponse(restRequest, restResponseChannel, null, exception); }</code><technical_language>In this PR, deleted related requestMetrics injected</technical_language>

Target:
public void handleOptions(RestRequest restRequest, RestResponseChannel restResponseChannel) { long processingStartTime = System.currentTimeMillis(); handlePrechecks(restRequest, restResponseChannel); RestRequestMetrics requestMetrics = restRequest.isSslUsed() ? frontendMetrics.optionsSSLMetrics : frontendMetrics.optionsMetrics; restRequest.getMetricsTracker().injectMetrics(requestMetrics); Exception exception = null; try { logger.trace("Handling OPTIONS request - {}", restRequest.getUri()); checkAvailable(); securityService.preProcessRequest(restRequest).get(); long preProcessingEndTime = System.currentTimeMillis(); frontendMetrics.optionsPreProcessingTimeInMs.update(preProcessingEndTime - processingStartTime); securityService.processRequest(restRequest).get(); long securityRequestProcessingEndTime = System.currentTimeMillis(); frontendMetrics.optionsSecurityRequestTimeInMs.update(securityRequestProcessingEndTime - preProcessingEndTime); restResponseChannel.setStatus(ResponseStatus.Ok); restResponseChannel.setHeader(RestUtils.Headers.DATE, new GregorianCalendar().getTime()); restResponseChannel.setHeader(RestUtils.Headers.CONTENT_LENGTH, 0); restResponseChannel.setHeader(Headers.ACCESS_CONTROL_ALLOW_METHODS, frontendConfig.optionsAllowMethods); restResponseChannel.setHeader(Headers.ACCESS_CONTROL_MAX_AGE, frontendConfig.optionsValiditySeconds); securityService.processResponse(restRequest, restResponseChannel, null).get(); long securityResponseProcessingEndTime = System.currentTimeMillis(); frontendMetrics.optionsSecurityResponseTimeInMs.update( securityResponseProcessingEndTime - securityRequestProcessingEndTime); } catch (Exception e) { exception = extractExecutionExceptionCause(e); } submitResponse(restRequest, restResponseChannel, null, exception); }