You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/04/21 16:12:18 UTC

[1/3] camel git commit: CAMEL-9795: camel-zipkin - Make sure to start the event notifier

Repository: camel
Updated Branches:
  refs/heads/master 6f3e8d29d -> 622a71d67


CAMEL-9795: camel-zipkin - Make sure to start the event notifier


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

Branch: refs/heads/master
Commit: b4476051d711aebe249ce57e0d42a8ef8ef5baf8
Parents: 270976c
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Apr 21 16:08:54 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Apr 21 16:09:06 2016 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/camel/zipkin/ZipkinTracer.java  | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b4476051/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java
----------------------------------------------------------------------
diff --git a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java b/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java
index 05916f1..0237d26 100644
--- a/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java
+++ b/components/camel-zipkin/src/main/java/org/apache/camel/zipkin/ZipkinTracer.java
@@ -341,20 +341,23 @@ public class ZipkinTracer extends ServiceSupport implements RoutePolicyFactory,
             createBraveForService(pattern, serviceName);
         }
 
-        ServiceHelper.startService(spanCollector);
+        ServiceHelper.startServices(spanCollector, eventNotifier);
     }
 
     @Override
     protected void doStop() throws Exception {
+        // stop event notifier
+        camelContext.getManagementStrategy().removeEventNotifier(eventNotifier);
+        ServiceHelper.stopService(eventNotifier);
+
         // stop and close collector
         ServiceHelper.stopAndShutdownService(spanCollector);
         if (spanCollector instanceof Closeable) {
             IOHelper.close((Closeable) spanCollector);
         }
-
+        // clear braves
         braves.clear();
-
-        camelContext.getManagementStrategy().removeEventNotifier(eventNotifier);
+        // remove route policy
         camelContext.getRoutePolicyFactories().remove(this);
     }
 


[3/3] camel git commit: Add screenshot of zipkin example

Posted by da...@apache.org.
Add screenshot of zipkin example


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/622a71d6
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/622a71d6
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/622a71d6

Branch: refs/heads/master
Commit: 622a71d677ddec5be9774547eeb31f0147627b99
Parents: b447605
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Apr 21 16:12:03 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Apr 21 16:12:03 2016 +0200

----------------------------------------------------------------------
 examples/camel-example-zipkin/README.md           |   8 ++++++++
 .../images/zipkin-web-console-1.png               | Bin 0 -> 47985 bytes
 .../images/zipkin-web-console-2.png               | Bin 0 -> 132664 bytes
 3 files changed, 8 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/622a71d6/examples/camel-example-zipkin/README.md
----------------------------------------------------------------------
diff --git a/examples/camel-example-zipkin/README.md b/examples/camel-example-zipkin/README.md
index 000d1b9..b22e423 100644
--- a/examples/camel-example-zipkin/README.md
+++ b/examples/camel-example-zipkin/README.md
@@ -57,6 +57,14 @@ $ mvn compile camel:run
 You should be able to visualize the traces and timings from this example using the Zipkin Web Console.
 The services are named `service1` and `service2`.
 
+In the screen shot below we are showing a trace of a client calling service1 and service2.
+
+![Zipkin Web Console Trace Details](images/zipkin-web-console-1.png "Detail of a trace")
+
+You can then click on each span and get annotated data from the Camel exchange and about the requests as shown:
+
+![Zipkin Web Console Span Details](images/zipkin-web-console-2.png "Detail of the span")
+
 
 ### Installing Zipkin Server using Docker
 

http://git-wip-us.apache.org/repos/asf/camel/blob/622a71d6/examples/camel-example-zipkin/images/zipkin-web-console-1.png
----------------------------------------------------------------------
diff --git a/examples/camel-example-zipkin/images/zipkin-web-console-1.png b/examples/camel-example-zipkin/images/zipkin-web-console-1.png
new file mode 100644
index 0000000..5d7a848
Binary files /dev/null and b/examples/camel-example-zipkin/images/zipkin-web-console-1.png differ

http://git-wip-us.apache.org/repos/asf/camel/blob/622a71d6/examples/camel-example-zipkin/images/zipkin-web-console-2.png
----------------------------------------------------------------------
diff --git a/examples/camel-example-zipkin/images/zipkin-web-console-2.png b/examples/camel-example-zipkin/images/zipkin-web-console-2.png
new file mode 100644
index 0000000..0d39dff
Binary files /dev/null and b/examples/camel-example-zipkin/images/zipkin-web-console-2.png differ


[2/3] camel git commit: CAMEL-9879: Lets use the thread pool from the group key as default which is what Hystrix suggests.

Posted by da...@apache.org.
CAMEL-9879: Lets use the thread pool from the group key as default which is what Hystrix suggests.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/270976c1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/270976c1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/270976c1

Branch: refs/heads/master
Commit: 270976c1e3debbb2dbeccddf609eabe39ffeb89e
Parents: 6f3e8d2
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Apr 21 15:08:00 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Apr 21 16:09:06 2016 +0200

----------------------------------------------------------------------
 .../component/hystrix/processor/HystrixProcessorFactory.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/270976c1/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorFactory.java
----------------------------------------------------------------------
diff --git a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorFactory.java b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorFactory.java
index 9dbf970..6f63fa4 100644
--- a/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorFactory.java
+++ b/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorFactory.java
@@ -76,7 +76,8 @@ public class HystrixProcessorFactory implements ProcessorFactory {
                 groupKey = HystrixConfigurationDefinition.DEFAULT_GROUP_KEY;
             }
             if (threadPoolKey == null) {
-                threadPoolKey = id + "-threadpool";
+                // by default use the thread pool from the group
+                threadPoolKey = groupKey;
             }
 
             // use the node id as the command key
@@ -109,6 +110,7 @@ public class HystrixProcessorFactory implements ProcessorFactory {
             HystrixCommand.Setter fallbackSetter = null;
             boolean fallbackViaNetwork = cb.getOnFallback() != null && cb.getOnFallback().isFallbackViaNetwork();
             if (fallbackViaNetwork) {
+                // use a different thread pool that is for fallback (should never use the same thread pool as the regular command)
                 HystrixThreadPoolKey tpFallbackKey = HystrixThreadPoolKey.Factory.asKey(threadPoolKey + "-fallback");
 
                 fallbackSetter = HystrixCommand.Setter