Skip to content

edspencer/tracing-example

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 

Node JS Distributed Tracing Example

This repo was created in service of the October 2020 blog post at https://edspencer.net/2020/10/13/distributed-tracing-with-node-js/ - see that post for a lot more information about what's going on here.

This is an example of how to use distributing tracing to instrument Node JS applications. It contains 4 very simple dummy services:

  • Gateway
  • Auth
  • Orders
  • Shipping

Requests traverse the services by first hitting the Gateway, are checked against the Auth service, and are then passed on to the Orders and Shipping services. At each step we trace the request using the Jaeger Client module.

To run the applications, just clone this repo and run:

docker-compose up

Then navigate to http://localhost:5000/orders/12345 and hit refresh a few times (the apps are designed to show errors around 50% of the time, which is why you need to refresh a few times to see the various error states in the Jaeger UI). Now navigate to http://localhost:16686/ and you'll see traces in the Jaeger UI.

About

An example of how to use distributing tracing to instrument Node JS applications

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published