cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cxf git commit: CXF-7164: Support tracing using OpenZipkin Brave. Added JAX-WS OSGi sample using Brave/OpenZipkin.
Date Fri, 20 Jan 2017 21:33:51 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 3f350f155 -> 180d0fcc5


CXF-7164: Support tracing using OpenZipkin Brave. Added JAX-WS OSGi sample using Brave/OpenZipkin.


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/180d0fcc
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/180d0fcc
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/180d0fcc

Branch: refs/heads/master
Commit: 180d0fcc5e0d061f339e1a3cb32ec53a3ab32b97
Parents: 3f350f1
Author: reta <drreta@gmail.com>
Authored: Fri Jan 20 16:33:13 2017 -0500
Committer: reta <drreta@gmail.com>
Committed: Fri Jan 20 16:33:13 2017 -0500

----------------------------------------------------------------------
 .../java/demo/jaxrs/tracing/client/Client.java  |  4 +-
 .../demo/jaxrs/tracing/server/CatalogStore.java |  2 +-
 .../demo/jaxrs/tracing/server/CatalogStore.java |  2 +-
 .../samples/jaxws_tracing_brave_osgi/README.txt | 78 +++++++++++++++
 .../samples/jaxws_tracing_brave_osgi/pom.xml    | 99 ++++++++++++++++++++
 .../java/demo/jaxws/tracing/server/Book.java    | 48 ++++++++++
 .../jaxws/tracing/server/CatalogService.java    | 29 ++++++
 .../tracing/server/impl/CatalogServiceImpl.java | 85 +++++++++++++++++
 .../resources/OSGI-INF/blueprint/context.xml    | 60 ++++++++++++
 distribution/src/main/release/samples/pom.xml   |  1 +
 .../apache/cxf/tracing/brave/BraveFeature.java  | 10 ++
 11 files changed, 414 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/180d0fcc/distribution/src/main/release/samples/jax_rs/tracing_brave/src/main/java/demo/jaxrs/tracing/client/Client.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/tracing_brave/src/main/java/demo/jaxrs/tracing/client/Client.java
b/distribution/src/main/release/samples/jax_rs/tracing_brave/src/main/java/demo/jaxrs/tracing/client/Client.java
index f746efe..39ba835 100644
--- a/distribution/src/main/release/samples/jax_rs/tracing_brave/src/main/java/demo/jaxrs/tracing/client/Client.java
+++ b/distribution/src/main/release/samples/jax_rs/tracing_brave/src/main/java/demo/jaxrs/tracing/client/Client.java
@@ -24,11 +24,11 @@ import java.util.Arrays;
 import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.Response;
 
+import com.github.kristofa.brave.Brave;
+
 import org.apache.cxf.jaxrs.client.WebClient;
 import org.apache.cxf.tracing.brave.jaxrs.BraveClientProvider;
 
-import com.github.kristofa.brave.Brave;
-
 public final class Client {
     private Client() {
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/180d0fcc/distribution/src/main/release/samples/jax_rs/tracing_brave/src/main/java/demo/jaxrs/tracing/server/CatalogStore.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/tracing_brave/src/main/java/demo/jaxrs/tracing/server/CatalogStore.java
b/distribution/src/main/release/samples/jax_rs/tracing_brave/src/main/java/demo/jaxrs/tracing/server/CatalogStore.java
index c102dfc..bdbd573 100644
--- a/distribution/src/main/release/samples/jax_rs/tracing_brave/src/main/java/demo/jaxrs/tracing/server/CatalogStore.java
+++ b/distribution/src/main/release/samples/jax_rs/tracing_brave/src/main/java/demo/jaxrs/tracing/server/CatalogStore.java
@@ -35,7 +35,7 @@ public class CatalogStore {
     }
     
     public boolean remove(final String key) throws IOException {
-        return (books.remove(key) != null);
+        return books.remove(key) != null;
     }
     
     public JsonObject get(final String key) throws IOException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/180d0fcc/distribution/src/main/release/samples/jax_rs/tracing_brave_osgi/src/main/java/demo/jaxrs/tracing/server/CatalogStore.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jax_rs/tracing_brave_osgi/src/main/java/demo/jaxrs/tracing/server/CatalogStore.java
b/distribution/src/main/release/samples/jax_rs/tracing_brave_osgi/src/main/java/demo/jaxrs/tracing/server/CatalogStore.java
index c102dfc..bdbd573 100644
--- a/distribution/src/main/release/samples/jax_rs/tracing_brave_osgi/src/main/java/demo/jaxrs/tracing/server/CatalogStore.java
+++ b/distribution/src/main/release/samples/jax_rs/tracing_brave_osgi/src/main/java/demo/jaxrs/tracing/server/CatalogStore.java
@@ -35,7 +35,7 @@ public class CatalogStore {
     }
     
     public boolean remove(final String key) throws IOException {
-        return (books.remove(key) != null);
+        return books.remove(key) != null;
     }
     
     public JsonObject get(final String key) throws IOException {

http://git-wip-us.apache.org/repos/asf/cxf/blob/180d0fcc/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/README.txt
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/README.txt b/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/README.txt
new file mode 100644
index 0000000..9b8903a
--- /dev/null
+++ b/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/README.txt
@@ -0,0 +1,78 @@
+JAX-RS Brave/OpenZipkin Tracing Demo in OSGi container
+=================
+
+The demo shows a basic usage of Brave/OpenZipkin distributed tracer with REST based 
+Web Services using  JAX-RS 2.0 (JSR-339). The REST server provides the 
+following services: 
+
+A RESTful catalog service is provided on URL http://localhost:9000/catalog 
+
+A HTTP GET request to URL http://localhost:8181/cxf/catalog generates following 
+traces:
+
+A HTTP POST request to URL http://localhost:8181/cxf/catalog generates following 
+traces:
+
+A HTTP GET request to URL http://localhost:8181/cxf/catalog/<id> generates following

+traces:
+
+A HTTP DELETE request to URL http://localhost:8181/cxf/catalog/<id> generates following

+traces:
+
+
+Building and running the demo using Maven
+---------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located), the Maven pom.xml file can be used to build and run the demo. 
+
+Using either UNIX or Windows:
+
+  mvn install
+  
+Starting Karaf (refer to http://karaf.apache.org/manual/latest-4.0.x/quick-start.html)
+
+  bin/karaf
+
+
+          __ __                  ____      
+         / //_/____ __________ _/ __/      
+        / ,<  / __ `/ ___/ __ `/ /_        
+       / /| |/ /_/ / /  / /_/ / __/        
+      /_/ |_|\__,_/_/   \__,_/_/         
+  
+    Apache Karaf (4.0.7)
+  
+  Hit '<tab>' for a list of available commands
+  and '[cmd] --help' for help on a specific command.
+  Hit '<ctrl-d>' or type 'system:shutdown' or 'logout' to shutdown Karaf.
+
+
+In order to install CXF's features, you need to add the CXF's features repo using
+
+  feature:repo-add cxf 3.n.m
+
+ where 3.n.m corresponds to a valid CXF version number (e.g., 3.2.0).
+
+Install CXF's cxf-tracing-brave feature that installs all the required bundles
+for this demo bundle.
+
+  feature:install cxf-jaxws
+  feature:install cxf-tracing-brave
+
+Install this demo bundle (using the appropriate bundle version number)
+  
+  install -s mvn:org.apache.cxf.samples/jax_ws_tracing_brave_osgi/3.n.m
+
+You can verify if the CXF JAX-RS OpenZipkin Brave Blueprint Demo is installed and started.
+
+  karaf@root()> list
+  START LEVEL 100 , List Threshold: 50
+   ID | State  | Lvl | Version | Name                              
+  -----------------------------------------------------------------
+  117 | Active |  80 | 3.2.0.SNAPSHOT | JAX-RS Demo Using Distributed Tracing with OpenZipkin
Brave and OSGi
+  karaf@root()>
+
+Now, you will be able to access this CXF JAXWS demo service on your Karaf instance at
+
+  http://localhost:8181/cxf/catalog?wsdl
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cxf/blob/180d0fcc/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/pom.xml b/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/pom.xml
new file mode 100644
index 0000000..102cdf1
--- /dev/null
+++ b/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/pom.xml
@@ -0,0 +1,99 @@
+<?xml version="1.0"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+ 
+  http://www.apache.org/licenses/LICENSE-2.0
+ 
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>jax_ws_tracing_brave_osgi</artifactId>
+    <name>JAX-WS Demo Using Distributed Tracing with OpenZipkin Brave and OSGi</name>
+    <description>JAX-WS Demo Using Distributed Tracing with OpenZipkin Brave and OSGi</description>
+    <packaging>bundle</packaging>
+    <parent>
+        <groupId>org.apache.cxf.samples</groupId>
+        <artifactId>cxf-samples</artifactId>
+        <version>3.2.0-SNAPSHOT</version>
+        <relativePath>../..</relativePath>
+    </parent>
+    <properties>
+        <cxf.version>${project.version}</cxf.version>
+        <httpclient.version>3.1</httpclient.version>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+            <version>3.2.0-SNAPSHOT</version>
+        </dependency>
+        <!-- This dependency is needed if you're using the Jetty container -->
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http-jetty</artifactId>
+            <version>3.2.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>3.2.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-integration-tracing-brave</artifactId>
+            <version>3.2.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-httpclient</groupId>
+            <artifactId>commons-httpclient</artifactId>
+        </dependency>                
+        <dependency>
+            <groupId>javax.ws.rs</groupId>
+            <artifactId>javax.ws.rs-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.eclipse.jetty</groupId>
+            <artifactId>jetty-webapp</artifactId>
+        </dependency>
+    </dependencies>
+    
+     <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.felix</groupId>
+                <artifactId>maven-bundle-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <instructions>
+                        <Bundle-SymbolicName>${project.groupId}.${project.artifactId}</Bundle-SymbolicName>
+                        <Import-Package>
+                            javax.ws.rs,
+                            javax.ws.rs.core,
+                            javax.ws.rs.container,
+                            org.apache.cxf.tracing.brave,
+                            org.osgi.service.blueprint,
+                            javax.annotation;version="[1.2,2)",
+                            org.apache.johnzon.core,
+                            !com.github.kristofa.brave.Brave,
+                            *
+                        </Import-Package>
+                        <Export-Package>
+                        </Export-Package>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

http://git-wip-us.apache.org/repos/asf/cxf/blob/180d0fcc/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/java/demo/jaxws/tracing/server/Book.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/java/demo/jaxws/tracing/server/Book.java
b/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/java/demo/jaxws/tracing/server/Book.java
new file mode 100644
index 0000000..0d5cce4
--- /dev/null
+++ b/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/java/demo/jaxws/tracing/server/Book.java
@@ -0,0 +1,48 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package demo.jaxws.tracing.server;
+
+public class Book {
+    private String id;
+    private String title;
+    
+    public Book() {
+    }
+
+    public Book(String id, String title) {
+        this.id = id;
+        this.title = title;
+    }
+
+    public String getId() {
+        return id;
+    }
+    
+    public void setId(String id) {
+        this.id = id;
+    }
+
+    public String getTitle() {
+        return title;
+    }
+
+    public void setTitle(String title) {
+        this.title = title;
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/180d0fcc/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/java/demo/jaxws/tracing/server/CatalogService.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/java/demo/jaxws/tracing/server/CatalogService.java
b/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/java/demo/jaxws/tracing/server/CatalogService.java
new file mode 100644
index 0000000..1d79122
--- /dev/null
+++ b/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/java/demo/jaxws/tracing/server/CatalogService.java
@@ -0,0 +1,29 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package demo.jaxws.tracing.server;
+
+import javax.jws.WebService;
+
+@WebService
+public interface CatalogService {
+    void addBook(Book book);
+    Book getBook(final String id);
+    void delete(final String id);
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/180d0fcc/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/java/demo/jaxws/tracing/server/impl/CatalogServiceImpl.java
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/java/demo/jaxws/tracing/server/impl/CatalogServiceImpl.java
b/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/java/demo/jaxws/tracing/server/impl/CatalogServiceImpl.java
new file mode 100644
index 0000000..4dd17c1
--- /dev/null
+++ b/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/java/demo/jaxws/tracing/server/impl/CatalogServiceImpl.java
@@ -0,0 +1,85 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package demo.jaxws.tracing.server.impl;
+
+import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.Future;
+
+import javax.xml.ws.AsyncHandler;
+
+import com.github.kristofa.brave.Brave;
+
+import org.apache.cxf.annotations.UseAsyncMethod;
+import org.apache.cxf.jaxws.ServerAsyncResponse;
+
+import demo.jaxws.tracing.server.Book;
+import demo.jaxws.tracing.server.CatalogService;
+import zipkin.Constants;
+
+public class CatalogServiceImpl implements CatalogService {
+    private final ExecutorService executor = Executors.newFixedThreadPool(2);
+    private final Map<String, Book> books = new ConcurrentHashMap<>();
+    private final Brave brave;
+    
+    public CatalogServiceImpl(final Brave brave) {
+        this.brave = brave;
+    }
+    
+    @UseAsyncMethod
+    public void addBook(Book book)  {
+        throw new UnsupportedOperationException("Please use async version of the method");
+    }
+    
+    public Future<?> addBookAsync(Book book, AsyncHandler<Book> handler) {
+        final ServerAsyncResponse<Book> response = new ServerAsyncResponse<Book>();
+
+        executor.submit(() -> {
+            try {
+                brave.localTracer().startNewSpan(Constants.LOCAL_COMPONENT, "Inserting New
Book");
+                books.put(book.getId(), book);
+                handler.handleResponse(response);
+            } finally {
+                brave.localTracer().finishSpan();
+            }
+        });
+        
+        return response;
+    }
+
+    @Override
+    public Book getBook(final String id) {
+        final Book book = books.get(id);
+        
+        if (book == null) {
+            throw new RuntimeException("Book with does not exists: " + id);
+        }
+        
+        return book;
+    }
+    
+    @Override
+    public void delete(final String id) {
+        if (books.remove(id) == null) {
+            throw new RuntimeException("Book with does not exists: " + id);
+        }
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/cxf/blob/180d0fcc/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/resources/OSGI-INF/blueprint/context.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/resources/OSGI-INF/blueprint/context.xml
b/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/resources/OSGI-INF/blueprint/context.xml
new file mode 100644
index 0000000..102bac4
--- /dev/null
+++ b/distribution/src/main/release/samples/jaxws_tracing_brave_osgi/src/main/resources/OSGI-INF/blueprint/context.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one
+  or more contributor license agreements. See the NOTICE file
+  distributed with this work for additional information
+  regarding copyright ownership. The ASF licenses this file
+  to you under the Apache License, Version 2.0 (the
+  "License"); you may not use this file except in compliance
+  with the License. You may obtain a copy of the License at
+  
+  http://www.apache.org/licenses/LICENSE-2.0
+  
+  Unless required by applicable law or agreed to in writing,
+  software distributed under the License is distributed on an
+  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  KIND, either express or implied. See the License for the
+  specific language governing permissions and limitations
+  under the License.
+-->
+<!-- START SNIPPET: blueprint -->
+<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xmlns:cxf="http://cxf.apache.org/blueprint/core"
+       xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws"
+
+       xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
+                           http://cxf.apache.org/blueprint/core http://cxf.apache.org/schemas/blueprint/core.xsd
+                           http://cxf.apache.org/blueprint/jaxws http://cxf.apache.org/schemas/blueprint/jaxws.xsd">
+
+    <!-- CXF BraveFeature -->
+    <bean id="braveFeature" class="org.apache.cxf.tracing.brave.BraveFeature">
+        <argument index="0" ref="brave" />
+    </bean>
+    
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging />
+        </cxf:features>
+    </cxf:bus>
+    
+    <bean id="catalogServiceImpl" class="demo.jaxws.tracing.server.impl.CatalogServiceImpl">
+        <argument index="0" ref="brave" />
+    </bean>
+    
+    <bean id="braveBuilder" class="com.github.kristofa.brave.Brave.Builder">
+        <argument index="0" value="catalog-service" />
+    </bean>
+    
+    <bean id="brave" factory-ref="braveBuilder" factory-method="build" />
+    
+    <jaxws:endpoint
+        implementor="#catalogServiceImpl"
+        address="/catalog"
+        implementorClass="demo.jaxws.tracing.server.impl.CatalogServiceImpl">
+        <jaxws:features>
+            <ref component-id="braveFeature" />
+        </jaxws:features>
+    </jaxws:endpoint>
+</blueprint>
+<!-- END SNIPPET: blueprint -->

http://git-wip-us.apache.org/repos/asf/cxf/blob/180d0fcc/distribution/src/main/release/samples/pom.xml
----------------------------------------------------------------------
diff --git a/distribution/src/main/release/samples/pom.xml b/distribution/src/main/release/samples/pom.xml
index 3ede014..ba10c15 100644
--- a/distribution/src/main/release/samples/pom.xml
+++ b/distribution/src/main/release/samples/pom.xml
@@ -125,6 +125,7 @@
         <module>jax_rs/sse_spring</module>
         <module>jax_rs/tracing_brave</module>
         <module>jax_rs/tracing_brave_osgi</module>
+        <module>jaxws_tracing_brave_osgi</module>
     </modules>
     <dependencyManagement>
         <dependencies>

http://git-wip-us.apache.org/repos/asf/cxf/blob/180d0fcc/integration/tracing/tracing-brave/src/main/java/org/apache/cxf/tracing/brave/BraveFeature.java
----------------------------------------------------------------------
diff --git a/integration/tracing/tracing-brave/src/main/java/org/apache/cxf/tracing/brave/BraveFeature.java
b/integration/tracing/tracing-brave/src/main/java/org/apache/cxf/tracing/brave/BraveFeature.java
index 0ba3fc3..08702b5 100644
--- a/integration/tracing/tracing-brave/src/main/java/org/apache/cxf/tracing/brave/BraveFeature.java
+++ b/integration/tracing/tracing-brave/src/main/java/org/apache/cxf/tracing/brave/BraveFeature.java
@@ -18,6 +18,8 @@
  */
 package org.apache.cxf.tracing.brave;
 
+import java.util.UUID;
+
 import com.github.kristofa.brave.Brave;
 
 import org.apache.cxf.Bus;
@@ -34,6 +36,14 @@ public class BraveFeature extends AbstractFeature {
     private BraveStartInterceptor in;
     private BraveStopInterceptor out;
 
+    public BraveFeature() {
+        this("cxf-svc-" + UUID.randomUUID().toString());
+    }
+    
+    public BraveFeature(final String name) {
+        this(new Brave.Builder(name).build());
+    }
+
     public BraveFeature(Brave brave) {
         in = new BraveStartInterceptor(brave);
         out = new BraveStopInterceptor(brave);


Mime
View raw message