Skip to content

feat(nodejs): switch the layer to NodeSDK and OTel JS SDK 3 - #1

Closed
adityareddy-dev wants to merge 1 commit into
review-base/node-sdk-v3from
nodejs/node-sdk-v3
Closed

adityareddy-dev wants to merge 1 commit into
review-base/node-sdk-v3from
nodejs/node-sdk-v3

Conversation

@adityareddy-dev

Copy link
Copy Markdown
Owner

Moves the Node.js layer to NodeSDK and SDK 3, so the core and contrib renovate PRs can close. It needs the Node 20 drop first.

The OTLP default changes to http/protobuf with this, and wrapper.js goes from 157 KB to 653 KB since NodeSDK brings the grpc and protobuf exporters along.

Build the layer's providers with NodeSDK instead of creating
NodeTracerProvider, MeterProvider and LoggerProvider by hand, and move
the layer to OpenTelemetry JS SDK 3 (core/sdk 3.1, experimental
0.301, matching contrib instrumentations).

The layer keeps what NodeSDK does not cover: the xray and xray-lambda
propagators, the AWS Lambda resource detector, its instrumentation
list and the configure* hooks. Instrumentations are registered again
after sdk.start(), because start() registers them before it creates
the providers and the Lambda instrumentation would otherwise bind the
no-op tracer provider and skip the flush at invocation end.

SDK 3 needs Node.js 22.15 or later, so this depends on nodejs20.x
being dropped from the layer's runtimes.
@adityareddy-dev

Copy link
Copy Markdown
Owner Author

Review copy only. Opened upstream as open-telemetry#2749.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant