Skip to content

fix(nodejs): give configureMeter the default OTLP reader again - #2769

Open
adityareddy-dev wants to merge 1 commit into
open-telemetry:mainfrom
adityareddy-dev:nodejs/meter-default-otlp-reader
Open

adityareddy-dev wants to merge 1 commit into
open-telemetry:mainfrom
adityareddy-dev:nodejs/meter-default-otlp-reader

Conversation

@adityareddy-dev

Copy link
Copy Markdown
Member

Before #2749, the config passed to configureMeter already held the OTLP reader. A hook that did config.readers.push(myReader) got OTLP export plus its own reader. Since #2749 the hook gets an empty readers list, so that hook now sends only its own reader and OTLP metrics export stops.

This gives the hook the readers NodeSDK would build from OTEL_METRICS_EXPORTER, with the OTLP protocol from OTEL_EXPORTER_OTLP_METRICS_PROTOCOL or OTEL_EXPORTER_OTLP_PROTOCOL. If the hook returns them unchanged, NodeSDK still builds its own. Readers set through configureSdk are passed as before. Prometheus is left out because its exporter starts a server as soon as it is created.

Before NodeSDK, the config passed to configureMeter already held the
OTLP reader, so a hook that pushed its own reader kept OTLP export.
Since open-telemetry#2749 the hook gets an empty list and that export stops.

The hook now gets the readers NodeSDK would build from
OTEL_METRICS_EXPORTER. When it returns them unchanged, NodeSDK still
builds its own.
@adityareddy-dev

Copy link
Copy Markdown
Member Author

@thompson-tomo this is the default OTLP reader option from your note: #2749 (comment)

@github-actions github-actions Bot added the javascript Pull requests that update Javascript code label Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update Javascript code

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant