同步操作将从 寒松/camel-spring-boot-examples2 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
This example shows how to use Camel with Zipkin to trace/timing all incoming and outgoing Camel messages.
The example requires a running Zipkin Server.
The example includes three sub maven modules that implement
client
service1
service2
Where client → service1 → service2 using HTTP.
This example assumes you will run Zipkin on the same host using the default collector port of 9410. If you wish to change those, you can do so using these files:
Service1 is configured in the
src/main/resources/application.properties
properties file. Service2
is configured in the src/main/java/sample/camel/Service2Route.java
source file. Client is configured in the
src/main/java/sample/camel/ClientApplication.java
source file.
First, start Zipkin as described below in the Installing Zipkin Server section
Then compile this example:
$ mvn compile
Then using three different shells and run service1 and service2 before the client.
$ cd service1
$ mvn compile spring-boot:run
When service1 is ready then start service2
$ cd service2
$ mvn compile camel:run
And then start the client that calls service1 every 30th seconds.
$ cd client
$ mvn compile camel:run
You should be able to visualize the traces and timings from this example
using the Zipkin UI. The services are named service1
and
service2
.
In the screen shot below we are showing a trace of a client calling service1 and service2.
You can then click on each span and get annotated data from the Camel exchange and about the requests as shown:
The quickest way to get Zipkin started is to fetch the latest released server as a self-contained executable jar.
curl -sSL https://zipkin.io/quickstart.sh | bash -s
and then run it
java -jar zipkin.jar
Finally, browse to http://localhost:9411 to find traces!
If you want to try Zipkin locally then you quickly try that using Docker.
There is a quickstart guide at
zipkin that has further instructions. Remember to configure the IP
address and port number in the application.properties
file.
You can find the IP using docker-machine ls
If you hit any problem using Camel or have some feedback, then please let us know.
We also love contributors, so get involved :-)
The Camel riders!
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。