The following NPE is thrown when invoke an unavailable resource when Analytics is enabled.
ERROR - AnalyticsMetricsHandler Error Occurred when collecting data
java.lang.NullPointerException: null
at org.wso2.carbon.apimgt.gateway.handlers.analytics.SynapseAnalyticsDataProvider.getBackendLatency_aroundBody54(SynapseAnalyticsDataProvider.java:404) ~[org.wso2.carbon.apimgt.gateway_9.20.74.300.jar:?]
at org.wso2.carbon.apimgt.gateway.handlers.analytics.SynapseAnalyticsDataProvider.getBackendLatency(SynapseAnalyticsDataProvider.java:399) ~[org.wso2.carbon.apimgt.gateway_9.20.74.300.jar:?]
at org.wso2.carbon.apimgt.gateway.handlers.analytics.SynapseAnalyticsDataProvider.getLatencies_aroundBody18(SynapseAnalyticsDataProvider.java:217) ~[org.wso2.carbon.apimgt.gateway_9.20.74.300.jar:?]
at org.wso2.carbon.apimgt.gateway.handlers.analytics.SynapseAnalyticsDataProvider.getLatencies(SynapseAnalyticsDataProvider.java:215) ~[org.wso2.carbon.apimgt.gateway_9.20.74.300.jar:?]
at org.wso2.carbon.apimgt.common.analytics.collectors.impl.SuccessRequestDataCollector.collectData(SuccessRequestDataCollector.java:71) ~[org.wso2.carbon.apimgt.common.analytics_9.20.74.289.jar:?]
at org.wso2.carbon.apimgt.common.analytics.collectors.impl.GenericRequestDataCollector.collectData(GenericRequestDataCollector.java:46) ~[org.wso2.carbon.apimgt.common.analytics_9.20.74.289.jar:?]
at org.wso2.carbon.apimgt.gateway.handlers.analytics.AnalyticsMetricsHandler.handleResponseOutFlow_aroundBody8(AnalyticsMetricsHandler.java:95) ~[org.wso2.carbon.apimgt.gateway_9.20.74.300.jar:?]
at org.wso2.carbon.apimgt.gateway.handlers.analytics.AnalyticsMetricsHandler.handleResponseOutFlow(AnalyticsMetricsHandler.java:81) ~[org.wso2.carbon.apimgt.gateway_9.20.74.300.jar:?]
at org.apache.synapse.core.axis2.Axis2Sender.sendBack(Axis2Sender.java:188) ~[synapse-core_2.1.7.wso2v271_66.jar:2.1.7-wso2v271.66]
To reproduce,
Enable Analytics
[apim.analytics]
enable = true
type = "elk"
Create an API having few methods
Invoke an unavailable method
Thanks
Methma
Steps to Reproduce
Invoke an resource having mediations after enabling analytics.
Description
The following NPE is thrown when invoke an unavailable resource when Analytics is enabled.
To reproduce,
Enable Analytics
Create an API having few methods
Invoke an unavailable method
Thanks Methma
Steps to Reproduce
Invoke an resource having mediations after enabling analytics.
Affected Component
APIM
Version
4.1.0
Environment Details (with versions)
No response
Relevant Log Output
No response
Related Issues
No response
Suggested Labels
No response