Either log or rethrow the exception
Sonar Link:
https://sonar.onap.org/component_issues?id=org.onap.dmaap.messagerouter.msgrtr%3Amsgrtr#resolved=false|severities=CRITICAL|assignees=dthakur
Location:
src/main/java/com/att/nsa/apiServer/metrics/cambria/DMaaPMetricsSender.java
Line No-163
Change-Id: I731cb00d4a9fe6591a3f101072f63668bea6e574
Issue-ID: DMAAP-274
Signed-off-by: Dushyant Singh Thakur <dt00503496@techmahindra.com>
o.put("transactionEnabled", false);
fCambria.send(fHostname, o.toString());
} catch (JSONException e) {
- log.warn("Error posting metrics to Cambria: " + e.getMessage());
+ log.error("Error posting metrics to Cambria at send(): " + e);
} catch (IOException e) {
- log.warn("Error posting metrics to Cambria: " + e.getMessage());
+ log.error("Error posting metrics to Cambria at send(): " + e);
}
}