public void exitAndDiscard() { builder.setHintIfRoot(FrameBuilder.HINT_DISCARD, Boolean.TRUE); Frame frame = _exitNormal(); if (builder.isFrameInTrace(frame)) { discard(frame); } }
public void exitAndDiscard(Object returnValue) { builder.setHintIfRoot(FrameBuilder.HINT_DISCARD, Boolean.TRUE); Frame frame = _exitNormal(returnValue); if (builder.isFrameInTrace(frame)) { discard(frame); } }
private void traceNextValve(Request request, Response response, TraceId traceId) throws IOException, ServletException { Operation operation = new Operation().type(OperationType.HTTP); frameBuilder.enter(operation); // TODO: What happens when this throws an exception? We will never add it to the // frame stack ... // Moreover, if we want to try / finally it, do we have enough valid information // in the response to compose the details? getNext().invoke(request, response); try { ApplicationName appName = getApplication(request); frameBuilder.setHintIfRoot(FrameBuilder.HINT_APPNAME, appName); frameBuilder.setHintIfRoot(FrameBuilder.HINT_TRACEID, traceId); fillInOperation(operation, request, response); frameBuilder.exit(); } catch(Throwable e) { // This can happen when frameBuilder.exit() throws an exception // (for instance with an imbalanced frame stack) if (enableLogging) { log.log(SEVERE, "Exception while logging trace to dispatcher", e); } } }
private void afterEvent(ApplicationName applicationName) { if (insightConfig.isContextIgnored(applicationName)) { frameBuilder.dump(); return; } applicationName = applicationMetaData.getApplicationName(applicationName); String application = applicationMetaData.getLabel(applicationName); frameBuilder.setHintIfRoot(FrameBuilder.HINT_APPNAME, applicationName); Operation operation = frameBuilder.peek(); operation.put("application", application) .label("Application Lifecycle: " + application + " " + operation.get("event")); frameBuilder.exit(); }