cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From build...@apache.org
Subject svn commit: r1006562 - in /websites/production/cxf/content: cache/docs.pageCache docs/using-openzipkin-brave.html
Date Sat, 11 Feb 2017 18:47:40 GMT
Author: buildbot
Date: Sat Feb 11 18:47:39 2017
New Revision: 1006562

Log:
Production update by buildbot for cxf

Modified:
    websites/production/cxf/content/cache/docs.pageCache
    websites/production/cxf/content/docs/using-openzipkin-brave.html

Modified: websites/production/cxf/content/cache/docs.pageCache
==============================================================================
Binary files - no diff available.

Modified: websites/production/cxf/content/docs/using-openzipkin-brave.html
==============================================================================
--- websites/production/cxf/content/docs/using-openzipkin-brave.html (original)
+++ websites/production/cxf/content/docs/using-openzipkin-brave.html Sat Feb 11 18:47:39 2017
@@ -118,11 +118,11 @@ Apache CXF -- Using OpenZipkin Brave
            <!-- Content -->
            <div class="wiki-content">
 <div id="ConfluenceContent"><p><style type="text/css">/*<![CDATA[*/
-div.rbtoc1486831628190 {padding: 0px;}
-div.rbtoc1486831628190 ul {list-style: disc;margin-left: 0px;}
-div.rbtoc1486831628190 li {margin-left: 0px;padding-left: 0px;}
+div.rbtoc1486838823550 {padding: 0px;}
+div.rbtoc1486838823550 ul {list-style: disc;margin-left: 0px;}
+div.rbtoc1486838823550 li {margin-left: 0px;padding-left: 0px;}
 
-/*]]>*/</style></p><div class="toc-macro rbtoc1486831628190">
+/*]]>*/</style></p><div class="toc-macro rbtoc1486838823550">
 <ul class="toc-indentation"><li><a shape="rect" href="#UsingOpenZipkinBrave-Overview">Overview</a></li><li><a
shape="rect" href="#UsingOpenZipkinBrave-DistributedTracinginApacheCXFusingOpenZipkinBrave">Distributed
Tracing in Apache CXF using OpenZipkin Brave</a></li><li><a shape="rect"
href="#UsingOpenZipkinBrave-configuringclientConfiguringClient">Configuring Client</a></li><li><a
shape="rect" href="#UsingOpenZipkinBrave-configuringserverConfiguringServer">Configuring
Server</a></li><li><a shape="rect" href="#UsingOpenZipkinBrave-DistributedTracingInAction:UsageScenarios">Distributed
Tracing In Action: Usage Scenarios</a>
 <ul class="toc-indentation"><li><a shape="rect" href="#UsingOpenZipkinBrave-Example#1:ClientandServerwithdefaultdistributedtracingconfigured">Example
#1: Client and Server with default distributed tracing configured</a></li><li><a
shape="rect" href="#UsingOpenZipkinBrave-Example#2:ClientandServerwithnestedtrace">Example
#2: Client and Server with nested trace</a></li><li><a shape="rect" href="#UsingOpenZipkinBrave-Example#3:ClientandServertracewithannotations">Example
#3: Client and Server trace with annotations</a></li><li><a shape="rect"
href="#UsingOpenZipkinBrave-Example#4:ClientandServerwithbinaryannotations(key/value)">Example
#4: Client and Server with binary annotations (key/value)</a></li><li><a
shape="rect" href="#UsingOpenZipkinBrave-Example#5:ClientandServerwithparalleltrace(involvingthreadpools)">Example
#5: Client and Server with parallel trace (involving thread pools)</a></li><li><a
shape="rect" href="#UsingOpenZipkinBrave-Example#6:ClientandServerwithasynchronousJAX-
 RSservice(server-side)">Example #6: Client and Server with asynchronous JAX-RS service
(server-side)</a></li><li><a shape="rect" href="#UsingOpenZipkinBrave-Example#7:ClientandServerwithasynchronousinvocation(client-side)">Example
#7: Client and Server with asynchronous invocation (client-side)</a></li></ul>
 </li><li><a shape="rect" href="#UsingOpenZipkinBrave-DistributedTracingwithOpenZipkinBraveandJAX-WSsupport">Distributed
Tracing with OpenZipkin Brave and JAX-WS support</a></li><li><a shape="rect"
href="#UsingOpenZipkinBrave-DistributedTracingwithOpenZipkinBraveandOSGi">Distributed Tracing
with OpenZipkin Brave and OSGi</a></li><li><a shape="rect" href="#UsingOpenZipkinBrave-Migratingfrombrave-cxf3">Migrating
from brave-cxf3</a></li></ul>
@@ -438,7 +438,33 @@ sf.create();
         &lt;/jaxws:features&gt;
     &lt;/jaxws:endpoint&gt;
 &lt;/blueprint&gt;</pre>
-</div></div><p>&#160;</p><h1 id="UsingOpenZipkinBrave-Migratingfrombrave-cxf3">Migrating
from brave-cxf3</h1><p>// TODO</p></div>
+</div></div><h1 id="UsingOpenZipkinBrave-Migratingfrombrave-cxf3">Migrating
from brave-cxf3</h1><p>The migration path from <a shape="rect" class="external-link"
href="https://github.com/openzipkin/brave/tree/master/brave-cxf3" rel="nofollow">OpenZipkin
Brave / CXF</a> to <a shape="rect" href="http://cxf.apache.org/">Apache CXF</a>
integration is pretty straightforward and essentially boils down to using JAX-RS ( <strong>BraveFeature</strong>
for server side / <strong>BraveClientFeature</strong>&#160;for client side
(imported from <strong>org.apache.cxf.tracing.brave.jaxrs</strong> package), for
example:</p><div class="code panel pdl" style="border-width: 1px;"><div class="codeContent
panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">JAXRSServerFactoryBean
serverFactory = new JAXRSServerFactoryBean();
+serverFactory.setServiceBeans(new RestFooService());
+serverFactory.setAddress("http://localhost:9001/");
+serverFactory.getFeatures().add(new BraveFeature(brave));
+serverFactory.create();</pre>
+</div></div><p>Although you may continue to use <a shape="rect" class="external-link"
href="https://github.com/openzipkin/brave" rel="nofollow">OpenZipkin Brave</a> API
directly, for the server-side it is preferable to inject <strong>@Context TracerContext&#160;</strong>
into your JAX-RS services in order to interface with the tracer.</p><div class="code
panel pdl" style="border-width: 1px;"><div class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">JAXRSClientFactoryBean
clientFactory = new JAXRSClientFactoryBean();
+clientFactory.setAddress("http://localhost:9001/");
+clientFactory.setServiceClass(FooService.class);
+clientFactory.getFeatures().add(new BraveClientFeature(brave));
+FooService client = (FooService) clientFactory.create()</pre>
+</div></div><p>&#160;</p><p>Similarly for JAX-WS <strong>BraveFeature</strong>
for server side / <strong>BraveClientFeature</strong>&#160;for client side
(imported from <strong>org.apache.cxf.tracing.brave </strong>package), for example:</p><div
class="code panel pdl" style="border-width: 1px;"><div class="codeContent panelContent
pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">JaxWsServerFactoryBean
serverFactory = new JaxWsServerFactoryBean();
+serverFactory.setAddress("http://localhost:9000/test");
+serverFactory.setServiceClass(FooService.class);
+serverFactory.setServiceBean(fooServiceImplementation);
+serverFactory.getFeatures().add(new BraveFeature(brave));
+
+serverFactory.create();</pre>
+</div></div><div class="code panel pdl" style="border-width: 1px;"><div
class="codeContent panelContent pdl">
+<pre class="brush: java; gutter: false; theme: Default" style="font-size:12px;">JAXRSClientFactoryBean
clientFactory = new JAXRSClientFactoryBean();
+clientFactory.setAddress("http://localhost:9001/");
+clientFactory.setServiceClass(FooService.class);
+clientFactory.getFeatures().add(new BraveClientFeature(brave));
+FooService client = (FooService) clientFactory.create();</pre>
+</div></div></div>
            </div>
            <!-- Content -->
          </td>



Mime
View raw message