Skip to content

Commit

Permalink
Fix: Analytics Type conversion issue
Browse files Browse the repository at this point in the history
  • Loading branch information
BLasan committed Aug 16, 2024
1 parent a9442fd commit 110deef
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,12 @@ public boolean handleResponse(MessageContext messageContext) {
org.apache.axis2.context.MessageContext.setCurrentMessageContext(axis2MC);
if (messageContext.getProperty(APIMgtGatewayConstants.BACKEND_REQUEST_END_TIME) == null) {
messageContext.setProperty(APIMgtGatewayConstants.BACKEND_REQUEST_END_TIME, System.currentTimeMillis());
if (APIUtil.isAnalyticsEnabled()) {
long executionStartTime = Long.parseLong((String) messageContext.getProperty(APIMgtGatewayConstants
.BACKEND_REQUEST_START_TIME));
messageContext.setProperty(APIMgtGatewayConstants.BACKEND_LATENCY, System.currentTimeMillis() -
executionStartTime);
if (APIUtil.isAnalyticsEnabled()
&& messageContext.getProperty(APIMgtGatewayConstants.BACKEND_REQUEST_START_TIME) != null) {
long executionStartTime = Long.parseLong(
(String) messageContext.getProperty(APIMgtGatewayConstants.BACKEND_REQUEST_START_TIME));
messageContext.setProperty(APIMgtGatewayConstants.BACKEND_LATENCY,
System.currentTimeMillis() - executionStartTime);
}
}
return true;
Expand Down

0 comments on commit 110deef

Please sign in to comment.