Package com.springsource.insight.intercept.trace

Examples of com.springsource.insight.intercept.trace.SimpleFrameBuilder.exit()


    @Test
    public void locateEndPointNoHttp() {
        FrameBuilder b = new SimpleFrameBuilder();
        b.enter(new Operation());
        b.enter(grailsOp);
        Frame grailsFrame = b.exit();
        assertNotNull("No grails frame", grailsFrame);
        Frame rootFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), rootFrame);
        assertEndpointAnalysis(trace, grailsFrame, null);
    }
View Full Code Here


        FrameBuilder b = new SimpleFrameBuilder();
        b.enter(new Operation());
        b.enter(grailsOp);
        Frame grailsFrame = b.exit();
        assertNotNull("No grails frame", grailsFrame);
        Frame rootFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), rootFrame);
        assertEndpointAnalysis(trace, grailsFrame, null);
    }

    @Test
View Full Code Here

    public void locateEndPointHttpComesBeforeGrails() {
        FrameBuilder b = new SimpleFrameBuilder();
        b.enter(grailsOp);
        Operation httpOp = new Operation().type(OperationType.HTTP);
        b.enter(httpOp);
        Frame httpFrame = b.exit();
        assertNotNull("No http frame", httpFrame);
        Frame grailsFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), grailsFrame);
        assertEndpointAnalysis(trace, grailsFrame, null);
    }
View Full Code Here

        b.enter(grailsOp);
        Operation httpOp = new Operation().type(OperationType.HTTP);
        b.enter(httpOp);
        Frame httpFrame = b.exit();
        assertNotNull("No http frame", httpFrame);
        Frame grailsFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), grailsFrame);
        assertEndpointAnalysis(trace, grailsFrame, null);
    }

    @Test
View Full Code Here

    public void locateEndPointHttpComesAfterGrails() {
        FrameBuilder b = new SimpleFrameBuilder();
        Operation httpOp = new Operation().type(OperationType.HTTP);
        b.enter(httpOp);
        b.enter(grailsOp);
        Frame grailsFrame = b.exit();
        assertNotNull("No grails frame", grailsFrame);
        Frame httpFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), httpFrame);
        assertEndpointAnalysis(trace, grailsFrame, httpFrame);
    }
View Full Code Here

        Operation httpOp = new Operation().type(OperationType.HTTP);
        b.enter(httpOp);
        b.enter(grailsOp);
        Frame grailsFrame = b.exit();
        assertNotNull("No grails frame", grailsFrame);
        Frame httpFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), httpFrame);
        assertEndpointAnalysis(trace, grailsFrame, httpFrame);
    }

    private static EndPointAnalysis assertEndpointAnalysis(Trace trace, Frame grailsFrame, Frame httpFrame) {
View Full Code Here

            }

            //test external resources
            SimpleFrameBuilder builder = new SimpleFrameBuilder();
            builder.enter(op);
            Frame frame = builder.exit();
            Trace trace = Trace.newInstance(ApplicationName.valueOf("app"), TraceId.valueOf("0"), frame);

            List<ExternalResourceDescriptor> externalResourceDescriptors = (List<ExternalResourceDescriptor>) analyzer.locateExternalResourceName(trace);
            assertNotNull("No descriptors extracted", externalResourceDescriptors);
            ExternalResourceDescriptor descriptor = externalResourceDescriptors.get(0);
View Full Code Here

    @Test
    public void findErrors_noHttpFrame() {
        SimpleFrameBuilder builder = new SimpleFrameBuilder();
        Operation op = new Operation();
        builder.enter(op);
        Frame frame = builder.exit();
        Trace trace = Trace.newInstance(ApplicationName.valueOf("app"), TraceId.valueOf("0"), frame);
        assertTrue(analyzer.locateErrors(trace).isEmpty());
    }

    @Test
View Full Code Here

                .put(OperationFields.CONTEXT_AVAILABLE, available)
                .put("servletName", "My stuff / servlet");
        httpOp.createMap("response")
                .put("statusCode", statusCode);
        builder.enter(httpOp);
        Frame httpFrame = builder.exit();
        return Trace.newInstance(ApplicationName.valueOf("app"), TraceId.valueOf("0"), httpFrame);
    }
}
View Full Code Here

    }

    private Trace createNonLifecycleTrace() {
        SimpleFrameBuilder builder = new SimpleFrameBuilder();
        builder.enter(new Operation());
        Frame topLevelFrame = builder.exit();
        return Trace.newInstance(app, TraceId.valueOf("0"), topLevelFrame);
    }

    private Trace createLifecycleEndPointTrace() {
        Operation operation = new Operation()
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.