Skip to content

Latest commit

 

History

History
88 lines (58 loc) · 1.86 KB

File metadata and controls

88 lines (58 loc) · 1.86 KB

Micrometer Observation Example

Introduction

This example shows how to use Camel with Micrometer Observation to create observations for incoming and outgoing Camel messages.

For Metrics we are using Micrometer Core, for Tracing we’re using Micrometer Tracing with OpenTelemetry.

The example includes four sub maven modules that implement

  • client

  • service1

  • service2

  • loggingtracer

Where client → service1 → service2 using HTTP.

Build in the local environment

You will need to package this example first:

$ mvn package

Run the example

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

$ java -jar service1/target/*.jar

When service1 is ready then start service2

$ java -jar service2/target/*.jar

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

$ java -jar client/target/*.jar

The client application explicitly instantiates and initializes the Micrometer Observation Tracer with the CamelContext.

The shells will show OBSERVATION EVENT messages indicating what event have been observed.

Outcome

Running the docker containers using docker compose it is possible to access to Prometheus, Jaeger and Grafana

$ cd containers
$ docker-compose up

Build and deploy on OpenShift

Refer to dedicated guide

Help and contributions

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!