Skip to main content

Posts

Showing posts from November 2, 2016

Improving the new relic handler to push api input and output Parameters

In previous post I described how to publish API traffic to new relic[1]. I have done some modifications to the handler to cater $subject. You will need to change the code to match your exact requirements. And I did some improvements to the code as well. Please find my modified code attachment[2]. I have added following code segments to the handler let me describe of each segment. Following segment is to build message when POST type is used. Otherwise inside handler we will get an empty envelop. try { RelayUtils.buildMessage(((Axis2MessageContext)messageContext).getAxis2MessageContext()); } catch (Exception e) { log.warn("Error occured while building message"); if(log.isDebugEnabled()){ log.debug("Exception thrown while building message", e); } } Here I push data to new relic, each parameter as a different column. So please change the code as it match your requirement. Following code segment will extract post da