This is a fork of the Remix Jokes Tutorial Repo that adds OpenTelemetry tracing instrumentation to showcase the instrumentation plugins available in the justindsmith/opentelemetry-instrumentations-js repository.
To add tracing instrumentation, a tracing.js file was added to include the necessary instrumentation libraries. The calling of the remix cli was updated in package.json to require the tracing script before booting the server to allow the instrumentation to properly patch the necessary dependencies. This approach should work for most node server deployments.
node -r ./tracing.js node_modules/.bin/remix dev
Install dependencies:
npm install
Start Jaeger using docker (this will collect all the emitted information):
docker run -d --name jaeger \
-e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \
-p 5775:5775/udp \
-p 6831:6831/udp \
-p 6832:6832/udp \
-p 5778:5778 \
-p 16686:16686 \
-p 14250:14250 \
-p 14268:14268 \
-p 14269:14269 \
-p 9411:9411 \
jaegertracing/all-in-one:1.30
Start the server in dev mode:
npm run dev
Load the Remix Jokes UI and click around:
http://localhost:3000
Access Jaeger UI to view the emitted traces:
http://localhost:16686