Red Hat Bugzilla – Bug 1164086
Call Trace gadget should provide a feature for specifying "type" through the UI
Last modified: 2015-11-02 03:12:34 EST
Description of problem: - The current Call Trace gadget functionality is limited to use "Conversation" context type only as the "gadgets.war/calltrace-gadget/gadget.xml" file shipped with FSW 6.0.0 installation does not allow users to input their desired context type to trace. ~~~ ... function makeJSONRequest(){ var prefs = new gadgets.Prefs(); //hack for now. var protocol = parent.window.location.protocol; var host = parent.window.location.host; var ident = getUserPreferenceValue("value"); ... var restUrl = protocol + "//" + host + "/overlord-rtgov/call/trace/instance?value=" + ident; var params = {}; params[gadgets.io.RequestParameters.CONTENT_TYPE] = gadgets.io.ContentType.JSON; params[gadgets.io.RequestParameters.METHOD] = gadgets.io.MethodType.GET; params[gadgets.io.RequestParameters.REFRESH_INTERVAL] = 5; gadgets.io.makeRequest(restUrl, updateResponse, params); } ... ~~~ - The "org.overlord.rtgov.internal.call.trace.rest.RESTCallTraceServer" server code's "instance(...)" method, although it takes two parameters (a Context type and value for the identifier of the business transaction) , but since the Gadget only supplies the "Value" , that's why it only defaults to use "Conversation" as the default accepted Context type for filtering activity records from back end database tables. ~~~ @Path("/call/trace") @ApplicationScoped public class RESTCallTraceServer { private static final Logger LOG=Logger.getLogger(RESTCallTraceServer.class.getName()); private CallTraceService _callTraceService=null; private ActivityServer _activityServer=null; ... @GET @Path("/instance") @Produces("image/svg+xml") public String instance(@DefaultValue("Conversation") @QueryParam("type") String type, @QueryParam("value") String value) throws Exception { String ret=""; CallTrace ct=getCallTrace(type, value); if (ct != null) { byte[] b=CallTraceUtil.serializeCallTrace(ct); if (b != null) { ret = new String(b); } } if (LOG.isLoggable(Level.FINEST)) { LOG.finest("Instance="+ret); } return (ret); } ... ~~~ - I am not sure if future releases of RTGov is supposed to overcome this limitation, but I am still raising this as a Feature Request for FSW 6 product's RTGov component, so as to bring it to the attention of the engineering team. Version-Release number of selected component (if applicable): - RTGov 1.0.1 How reproducible: - Always Steps to Reproduce: 1. Visit the "http://localhost:8080/gadget-web" URL 2. Add Call Trace gadget to the Home page. 3. Try to configure the values for this gadget and you would see that it only allows to add "Value" not "type" Actual results: - Call Trace gadget's settings allows only to provide "Value" Expected results: - Users would expect to specify "type" as well as input for seeking path of a business transaction. Additional info: - NA