- Sample featuring two Node.js applications we'll be tracing: one sends a simple request to the other, we can then view the spans on our Zipkin server.
- Useful for showing developers what we get with Zipkin.
- Features
idt.jsfor easy deployments. - Tested with Node.js 8.9.0, appmetrics-zipkin 1.0.4 (using zipkin 0.10), Zipkin 2.0.0 as part of the Microservice Builder Fabric.
- Created with
yo nodeserver. - The extended documentation here covers Kubernetes deployments.
nodeandnpm: version 6 or 8.java: version 8 for Zipkin.- Optional: a Kubernetes cluster (see our documentation here).
- Run
./do-it-all.shto download the Zipkin jar and to start the servers (both the frontend and backend) as background processes - In your web browser visit
localhost:9411for Zipkin, set the start/end times to be suitably far apart, sort by newest traces first. - In a new web browser window or tab, visit
localhost:3000, fill in the text field with the length of the string you want to pass, then click the button labeled with "Generate a string...". - Click "Find traces" in Zipkin then explore the web UI to view the gathered trace information.
- To restart both applications (e.g. after making changes) run
./restart-servers.sh. This will also kill the Zipkin server so start that up again withstart-zipkin.sh. - If the environment variable
USE_ZIPKINis set, e.g. as part of thenpm startcommand in getter or pusher's package.json OR in the Dockerfile, data will be sent to the Zipkin server.
This is handled by ./do-it-all.sh, specifically it does:
./get-zipkin.sh../start-zipkin.sh.- Kill it later with
./kill-zipkin.sh: it's a Java process running withjava -jar zipkin.jar
More information on Zipkin itself and the trace data we can collect can be accessed at https://zipkin.io.
Documented here under the kubernetes folder.
An example is provided under the https-example folder involving a self-signed certificate.
You are free to use and modify anything here as you want so long as the Apache 2 license permits it!
Java, JavaScript and all Java-based trademarks and logos are
trademarks or registered trademarks of Oracle and/or its affiliates.
Node.js is an official trademark of Joyent.
IBM SDK for Node.js(TM) is not formally related to or endorsed by the
official Node.js open source or commercial project.