Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
java-cassandra
java-dropwizard
java-wildfly-swarm
js-express
python-pyramid
ruby-rack
README.adoc
architecture.dia
architecture.png
docker-compose.yml
hawkular-apm-createUser-detail.png
hawkular-apm-createUser.png
zipkin-createUser.png

README.adoc

Example Polyglot Application Instrumented with Zipkin Libraries

Example applications demonstrating polyglot environment instrumented with several Zipkin instrumentation libraries.

Used instrumentations:

Architecture

Architecture diagram shows dependencies between services. The whole environment can be executed with docker-compose. Some of the services can be used in standalone mode, however some of the endpoints might not work as they are calling external services. Feel free to experiment and add new endpoints or services.

Run

Before running ensure that containers from previous run were removed.

$ export KAFKA_ZOOKEEPER=172.17.0.1
$ export TRACING_SERVER=172.17.0.1
$ export TRACING_PORT=8080

$ docker-compose pull
$ docker-compose up

$ docker-compose down -> stop and remove all containers (when you finish)

Open other terminal and run tracing server (Hawkular APM or Zipkin). It has to be started after docker-compose (it depends on Kafka broker).

$ export KAFKA_ZOOKEEPER=172.17.0.1
$ /bin/standalone.sh -b 0.0.0.0 -Djboss.http.port=8080
  • TRACING_SERVER - address of tracing server. It cannot be localhost, therefore bind tracing server to 0.0.0.0 address or 172.17.0.1 (docker0 interface).

  • TRACING_PORT - port of the tracing server. Hawkular APM 8080 or zipkin 9411.

  • KAFKA_ZOOKEEPER - enables kafka consumer in APM and Zipkin server. It should be an address of the machine with docker engine.

Example requests

$ curl -ivX GET 'http://localhost:3001/nodejs/hello'
$ curl -ivX GET 'http://localhost:3000/dropwizard/hello'
$ curl -ivX GET 'http://localhost:3003/wildfly-swarm/hello'
$ curl -ivX GET 'http://localhost:3002/roda/hello'
$ curl -ivX GET 'http://localhost:3004/pyramid/hello'
-> hello calls

$ curl -ivX POST -H 'Content-Type: application/json' 'http://localhost:3001/nodejs/createUser' -d '{"name": "admin"}'
-> multi service call for user creation
$ curl -ivX POST -H 'Content-Type: application/json' 'http://localhost:3000/dropwizard/users' -d '{"name": "admin"}'
$ curl -ivX GET 'http://localhost:3000/dropwizard/users'
-> create and get users in dropwizard (using MySQL)
$ curl -ivX POST -H 'Content-Type: application/json' 'http://localhost:3003/wildfly-swarm/users' -d '{"name": "admin"}'
$ curl -ivX GET 'http://localhost:3003/wildfly-swarm/users'
-> create and get users in wildfly-swarm (using Cassandra)
$ curl -ivX GET 'http://localhost:3000/dropwizard/asyncTwoOutgoingCalls'
-> asynchronous call
$ curl -ivX GET 'http://localhost:3000/dropwizard/A'
-> chaining requests within one service
$ curl -ivX GET 'http://localhost:3004/pyramid/loop'
-> chaining requests within one service

Screenshots

Hawkular APM UI

 

Hawkular APM UI

 

Zipkin UI
You can’t perform that action at this time.