== OpenTracing Example

=== Introduction

This example shows how to use Camel with OpenTracing to trace all
incoming and outgoing Camel messages.

The example uses a logging tracer (based on the MockTracer) to display
tracing information on the console.

The example includes four sub maven modules that implement

* client
* service1
* service2
* loggingtracer

Where client -> service1 -> service2 using HTTP.

=== Build

You will need to compile this example first:

[source,sh]
----
$ mvn compile
----

=== Run the example

Then using three different shells and run service1 and service2 before
the client. These services use an annotation _CamelOpenTracing_ to
indicate that the service should be traced.

[source,sh]
----
$ cd service1
$ mvn compile spring-boot:run
----

When service1 is ready then start service2

[source,sh]
----
$ cd service2
$ mvn compile spring-boot:run
----

And then start the client that calls service1 every 30 seconds.

[source,sh]
----
$ cd client
$ mvn compile camel:run
----

The client application explicitly instantiates and initializes the
OpenTracing Tracer with the _CamelContext_.

The shells will show _SPAN FINISHED_ messages indicating what spans have
been reported from the client and two services.

=== Help and contributions

If you hit any problem using Camel or have some feedback, then please
https://camel.apache.org/support.html[let us know].

We also love contributors, so
https://camel.apache.org/contributing.html[get involved] :-)

The Camel riders!
