Package com.springsource.insight.intercept.trace

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


        assertEquals("Mismatched example", "GET /path?fuu=bar", analysis.getExample());
    }

    @Test
    public void testLocateEndPointNoHttp() {
        Trace trace = createNonHttpTrace();
        EndPointAnalysis analysis = analyzer.locateEndPoint(trace);
        assertNull("Unexpected success: " + analysis, analysis);
    }
View Full Code Here


        builder.enter(new Operation().type(OperationType.METHOD));
        builder.enter(op1);
        builder.exit();
        builder.exit();
        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);
        assertEquals("Mismatched number of descriptors", 2, externalResourceDescriptors.size());
View Full Code Here

        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);
        assertEquals(EndPointName.valueOf("MessageChannel#test"), endPoint.getEndPointName());
        assertEquals(integrationFrame.getRange(), trace.getRange());
    }
View Full Code Here

        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);
        assertEquals(EndPointName.valueOf("MessageHandler#test"), endPoint.getEndPointName());
        assertEquals(integrationFrame.getRange(), trace.getRange());
    }
View Full Code Here

        b.enter(httpOp);
        b.enter(new Operation());
        Frame simpleFrame = b.exit();
        assertNotNull("No simple frame", simpleFrame);
        Frame httpFrame = b.exit();
        Trace trace = Trace.newInstance(app, TraceId.valueOf("0"), httpFrame);
        EndPointAnalysis ep = endPointAnalyzer.locateEndPoint(trace);
        assertNull("Unexpected result: " + ep, ep);
    }
View Full Code Here

        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

        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(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

        return mb;
    }

    static Trace createTrace(Frame root) {
        return new Trace(ServerName.valueOf("srv"), ApplicationName.valueOf("app"), new Date(), TraceId.valueOf("id"), root);
    }
View Full Code Here

    protected Operation runExternalResourceAnalyzer(Operation op, ExternalResourceType expType, String expAddress, int expPort) {
        Frame frame = new SimpleFrame(FrameId.valueOf("1"), null, op,
                TimeRange.milliTimeRange(0, 1L),
                Collections.<Frame>emptyList());
        Trace trace = new Trace(ServerName.valueOf("fake-server"),
                ApplicationName.valueOf("fake-app"),
                new Date(System.currentTimeMillis()),
                TraceId.valueOf("fake-id"),
                frame);
        SocketExternalResourceAnalyzer analyzer = SocketExternalResourceAnalyzer.getInstance();
View Full Code Here

TOP

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

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.