Skip to content

Spans are not visible in Jaeger when running auto-instrumentation with Node.js v18 #3176

@lukeina2z

Description

@lukeina2z

What version of OpenTelemetry are you using?

    "@opentelemetry/api": "^1.9.0",
    "@opentelemetry/auto-instrumentations-node": "^0.65.0"

What version of Node are you using?

18.20.2

What did you do?

Repro Steps:

  1. Set up Jaeger
docker run --rm --name jaeger \
  -p 16686:16686 \
  -p 4317:4317 \
  -p 4318:4318 \
  -p 5778:5778 \
  -p 9411:9411 \
  jaegertracing/jaeger:2.4.0
  1. Enable Node.js LTS v18.20.2

  2. Build a simple Node.js app that sends HTTP GET requests. For example this one: https://github.com/lukeina2z/playground/tree/main/repro/nodebug

  3. Enable zero code auto instrumentation by following https://opentelemetry.io/docs/zero-code/js/

  4. Run the app with OTel JS auto instrumentation.
    Commands used:

rm -fr ./build
rm -fr ./node_modules
rm ./package-lock.json

npm install
npm install --save @opentelemetry/api
npm install --save @opentelemetry/auto-instrumentations-node

npm run build

OTEL_SERVICE_NAME=otel-node-test \
  OTEL_NODE_RESOURCE_DETECTORS="env,host,os,process" \
  OTEL_TRACES_EXPORTER=otlp \
  OTEL_EXPORTER_OTLP_TRACES_ENDPOINT=http://localhost:4318/v1/traces \
  node --require @opentelemetry/auto-instrumentations-node/register ./build/index.js

Expected Result

HTTP spans should appear in the Jaeger UI at http://localhost:16686
.

Actual Result

No spans are visible in Jaeger.

Note:
If you switch to Node.js v20 or v22, the HTTP spans become visible in Jaeger.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions