Skip to content

fix(sdk-node): warn and ignore zero exporter timeout in declarative config#6711

Merged
trentm merged 5 commits into
open-telemetry:mainfrom
honeycombio:mike/warn-zero-exporter-timeout
May 15, 2026
Merged

fix(sdk-node): warn and ignore zero exporter timeout in declarative config#6711
trentm merged 5 commits into
open-telemetry:mainfrom
honeycombio:mike/warn-zero-exporter-timeout

Conversation

@MikeGoldsmith

Copy link
Copy Markdown
Member

Which problem is this PR solving?

The declarative config schema says a timeout of 0 means "no limit (infinity)" for OTLP exporters. However, the JS exporters don't support infinite timeout yet (#6617). Currently, timeout: 0 is passed through silently and may cause unexpected behavior.

Short description of the changes

Add validateExporterTimeout() helper in sdk-node's utils.ts that checks for zero timeout values when creating exporters from declarative config. When timeout: 0 is configured:

  • Emits a diag.warn explaining that infinite timeout is not supported
  • Returns undefined so the exporter falls back to its default timeout (10000ms)

Applied to all OTLP trace exporter creation paths (HTTP json, HTTP protobuf, gRPC).

Note: the metric and log exporter paths don't currently pass timeout through — that's being addressed in #6707 and #6708. Once those merge, this validation should be applied there too.

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

189 sdk-node tests pass. Full lint passes.

Checklist:

  • Followed the style guidelines of this project
  • Unit tests have been added
  • Documentation has been updated

Closes #6618

The spec says timeout of 0 means "no limit (infinity)" but the JS
exporters don't support that yet (open-telemetry#6617). Add validateExporterTimeout
that warns and returns undefined for zero values, causing the exporter
to fall back to its default timeout.

Closes open-telemetry#6618

Assisted-by: Claude Opus 4.6
@MikeGoldsmith
MikeGoldsmith requested a review from a team as a code owner May 13, 2026 14:43
@codecov

codecov Bot commented May 13, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.86%. Comparing base (81e20d0) to head (758bbf7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6711   +/-   ##
=======================================
  Coverage   94.86%   94.86%           
=======================================
  Files         376      376           
  Lines       12712    12717    +5     
  Branches     2883     2884    +1     
=======================================
+ Hits        12059    12064    +5     
  Misses        653      653           
Files with missing lines Coverage Δ
...ental/packages/opentelemetry-sdk-node/src/utils.ts 97.19% <100.00%> (+0.02%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@trentm
trentm added this pull request to the merge queue May 14, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch May 14, 2026
…rter-timeout

# Conflicts:
#	experimental/CHANGELOG.md
#	experimental/packages/opentelemetry-sdk-node/src/utils.ts
…bio/opentelemetry-js into mike/warn-zero-exporter-timeout

# Conflicts:
#	experimental/CHANGELOG.md
@trentm
trentm added this pull request to the merge queue May 15, 2026
Merged via the queue into open-telemetry:main with commit c390f54 May 15, 2026
29 checks passed
trentm added a commit to trentm/opentelemetry-js that referenced this pull request May 19, 2026
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.

[configuration] warn and ignore a zero value for *.exporter.timeout in declarative config

2 participants