Skip to content

inngest/nodejs-opentelemetry-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Node.js OpenTelemetry Example

Minimal Express + Inngest demo instrumented with OpenTelemetry, exporting traces over OTLP HTTP (default http://localhost:4318/v1/traces).

Prerequisites

  • Node.js 18+ (ESM project)
  • Jaeger with OTLP HTTP enabled (example Docker: docker run -d --name jaeger -p 16686:16686 -p 4318:4318 -e COLLECTOR_OTLP_ENABLED=true jaegertracing/all-in-one:latest)

Install

npm install

Start the Express API

npm start

The API listens on http://localhost:3000.

Start the Inngest Dev Server

npx inngest-cli@latest dev -u http://localhost:3000/api/inngest --no-discovery

Trigger a trace

curl -X POST http://localhost:3000/users \
  -H "Content-Type: application/json" \
  -d '{"name":"John Doe","email":"john.doe@example.com"}'

Open the Jaeger UI to inspect the trace

Once Jaeger is running, you can access the Jaeger UI by navigating to http://localhost:16686 in your web browser.

In the Jaeger UI, you can view the spans generated by your Express application. By selecting the “nodejs-open-telemetry-example” service and click on “Find Traces”, a list of traces will display. This will help you understand the flow of requests and identify any performance bottlenecks.


License Apache

About

A template of a Node.js Express application using Inngest with OpenTelemetry configured

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published