Package com.github.kristofa.brave

Examples of com.github.kristofa.brave.EndPointSubmitter.submit()


    @Test
    public void test() throws ClientProtocolException, IOException, InterruptedException {
        // We need to set up our endpoint first because we start a client request from
        // in our test so the brave preprocessor did not set up end point yet.
        final EndPointSubmitter endPointSubmitter = Brave.getEndPointSubmitter();
        endPointSubmitter.submit("127.0.0.1", 8080, "BraveRestEasyIntegration");

        // this initialization only needs to be done once per VM
        RegisterBuiltin.register(ResteasyProviderFactory.getInstance());

        // Create our client. The client will be configured using BraveClientExecutionInterceptor because
View Full Code Here


        WebTarget target = target("/brave-jersey2/test");
        target.register(new BraveClientRequestFilter(clientTracer, Optional.<String>absent()));
        target.register(new BraveClientResponseFilter(clientTracer, Optional.<String>absent()));

        final EndPointSubmitter endPointSubmitter = Brave.getEndPointSubmitter();
        endPointSubmitter.submit("127.0.0.1", 9998, "brave-jersey2");
        final Response response = target.request().get();
        assertEquals(200, response.getStatus());

        final List<Span> collectedSpans = SpanCollectorForTesting.getInstance().getCollectedSpans();
        assertEquals(2, collectedSpans.size());
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.