[ 
https://issues.apache.org/jira/browse/CXF-7792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16555587#comment-16555587
 ] 

Andriy Redko commented on CXF-7792:
-----------------------------------

Good, it depends on the Zipkin configuration, if you use Thrift fe.
{code:java}
install -s mvn:org.apache.thrift/libthrift/0.9.3
install -s mvn:io.zipkin.reporter/zipkin-sender-libthrift/1.0.{code}
Than configure your context.xml, fe:
{code:java}
    <bean id="braveBuilder" class="brave.Tracing" factory-method="newBuilder" />
    
    <bean id="senderBuilder" class="zipkin.reporter.libthrift.LibthriftSender" 
factory-method="builder" />
    
    <bean id="senderHostBuilder" factory-ref="senderBuilder"  
factory-method="host">
        <argument index="0" value="localhost" />
    </bean>
    
    <bean id="sender" factory-ref="senderBuilder" factory-method="build" />
    
    <bean id="reporterBuilder" class="zipkin.reporter.AsyncReporter" 
factory-method="builder">
        <argument index="0" value="sender" />
    </bean>
    
    <bean id="reporter" factory-ref="reporterBuilder" factory-method="build" />

    <bean id="localServiceNameBuilder" factory-ref="braveBuilder" 
factory-method="localServiceName">
        <argument index="0" value="catalog-service" />
    </bean>
    
    <bean id="braveCatalogBuilder" factory-ref="localServiceNameBuilder" 
factory-method="reporter">
        <argument index="0" value="reporter" />
    </bean>{code}
 

Please notice this bean
{code:java}
  <bean id="senderHostBuilder" factory-ref="senderBuilder"  
factory-method="host">
        <argument index="0" value="localhost" />
    </bean>{code}
Replace the localhost with the right value. Also please go through Brave 
documentation in case you need more fine tuning. Thanks.

> Distributed Tracing with OpenZipkin Brave and OSGi
> --------------------------------------------------
>
>                 Key: CXF-7792
>                 URL: https://issues.apache.org/jira/browse/CXF-7792
>             Project: CXF
>          Issue Type: Wish
>          Components: Tracing Brave
>    Affects Versions: 3.2.5
>            Reporter: bambus
>            Priority: Critical
>         Attachments: image-2018-07-25-09-01-33-506.png
>
>
> I have followed your example and brave example for implementing brave in cxf 
> based application. After I added brave I could not package it like bundle. I 
> always get different errors. Error like: Caused by: 
> java.lang.NoClassDefFoundError: zipkin/reporter/Reporter
>  Another one: Caused by: java.lang.ClassCastException: Cannot cast 
> org.apache.cxf.service.factory.FactoryBeanListenerManager to 
> org.apache.cxf.service.factory.FactoryBeanListenerManager
> I am using Service Mix 7.0.1 with Karaf 4.0.9.
> Can you help me how to pack it like as a bundle. 
>  In this example that thing is missing:
>  
> [https://cwiki.apache.org/confluence/display/CXF20DOC/Using+OpenZipkin+Brave#UsingOpenZipkinBrave-SpringXML-Configuration]
> I have configured the blueprint like in the example.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to