Package com.springsource.insight.intercept.trace

Examples of com.springsource.insight.intercept.trace.SimpleFrameBuilder


        assertEndpointAnalysis(trace, grailsFrame, null);
    }

    @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


                final JaxrsParamType enumType = JaxrsParamType.fromTypeName(paramType);
                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);
            ExternalResourceDescriptor descriptor = externalResourceDescriptors.get(0);
View Full Code Here

        super();
    }

    @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

        TraceError error = errors.get(0);
        assertTrue(error.getMessage().contains("Context not available"));
    }

    Trace createHttpTrace(int statusCode, boolean available) {
        SimpleFrameBuilder builder = new SimpleFrameBuilder();
        Operation httpOp = new Operation()
                .type(OperationType.HTTP);
        httpOp.createMap("request")
                .put(OperationFields.URI, "/path?fuu=bar")
                .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

        EndPointAnalysis result = analyzer.locateEndPoint(trace);
        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);
    }
View Full Code Here

    private Trace createLifecycleEndPointTrace() {
        Operation operation = new Operation()
                .type(LifecycleEndPointAnalyzer.SERVLET_LISTENER_TYPE)
                .put("event", "start");
        SimpleFrameBuilder builder = new SimpleFrameBuilder();
        builder.enter(operation);
        Frame httpFrame = builder.exit();
        return Trace.newInstance(app, TraceId.valueOf("0"), httpFrame);
    }
View Full Code Here

TOP

Related Classes of com.springsource.insight.intercept.trace.SimpleFrameBuilder

Copyright © 2018 www.massapicom. 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.