Logging and Tracing - with Log4j and Zipkin
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea/runConfigurations
00_common
10_simple
20_programmatic_mdc
30_interceptors
40_sleuth
50_zipkin
.gitignore
LICENSE
README.adoc
pom.xml

README.adoc

Logging and tracing with Context - comparing Log4j and Zipkin

About

This is an examples project for logging and tracing with Log4j and Zipkin.

This is an add-on to a talk I presented.

Disclaimer

This code is presented as examples for learning and not as ready-to-use production code.

Running the examples

During my talks I usually run the examples from my IntelliJ IDE. Matching run configurations are part of this repository. This makes it easy to explore and debug them.

Once the examples run you can point your browser to the following URL: http://localhost:8080/

To run the Zipkin example you’ll need to have a Zipkin server up-and-running (for testing an instance started with Docker will do).

You can run the examples from the command line like this:

mvn -am -pl 10_simple spring-boot:run
mvn -am -pl 20_programmatic_mdc spring-boot:run
mvn -am -pl 30_interceptors spring-boot:run
mvn -am -pl 40_sleuth spring-boot:run

The last example runs two services on different ports in two different processes. Therefore two commands are necessary to be run in different terminals:

mvn -am -pl 50_zipkin spring-boot:run
mvn -am -pl 50_zipkin spring-boot:run@run-external

License

Copyright 2016-2017 Alexander Schwartz

Licensed 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

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.