Package com.springsource.insight.intercept.trace

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


    @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


                .put("payloadType", "java.lang.String")
                .put("idHeader", "123");

        FrameBuilder b = new SimpleFrameBuilder();
        b.enter(operation);
        b.enter(new Operation());
        Thread.sleep(100);
        b.exit();
        Frame integrationFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), integrationFrame);
        EndPointAnalysis endPoint = endPointAnalyzer.locateEndPoint(trace);
View Full Code Here

    }

    @Test
    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();
View Full Code Here

    @Test
    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

    @Test
    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);
View Full Code Here

    @Test
    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

                assertEquals("Mismatched path param enum", JaxrsParamType.PATH, enumType);
            }

            //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);
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());
    }
View Full Code Here

                .put("method", "GET")
                .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

        assertNull("Unexpected analysis result: " + result, result);
    }

    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() {
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.