Skip to content

feat(sdk-logs)!: configure force flush timeout per call - #6931

Merged
pichlermarc merged 2 commits into
open-telemetry:mainfrom
LarryHu0217:codex/logger-force-flush-options-6927
Jul 20, 2026
Merged

feat(sdk-logs)!: configure force flush timeout per call#6931
pichlermarc merged 2 commits into
open-telemetry:mainfrom
LarryHu0217:codex/logger-force-flush-options-6927

Conversation

@LarryHu0217

Copy link
Copy Markdown
Contributor

Which problem is this PR solving?

LoggerProviderOptions.forceFlushTimeoutMillis cannot be supplied through declarative configuration because it controls a later forceFlush() call rather than provider construction.

Fixes #6927

Short description of the changes

  • remove forceFlushTimeoutMillis from LoggerProviderOptions
  • add an exported ForceFlushOptions object with timeoutMillis
  • pass the per-call timeout through LoggerProvider to MultiLogRecordProcessor
  • preserve the existing 30-second default when no timeout is supplied
  • update unit-test fixtures and the experimental changelog

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

  • npx --no-install nx run @opentelemetry/sdk-logs:compile --skip-nx-cache
  • npx --no-install nx run @opentelemetry/sdk-logs:test --skip-nx-cache (202 passing, 9 pending browser-only tests)
  • npx --no-install nx run @opentelemetry/sdk-logs:lint --skip-nx-cache
  • Prettier check for all touched TypeScript files
  • Markdown lint for experimental/CHANGELOG.md

Checklist:

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

@LarryHu0217
LarryHu0217 requested a review from a team as a code owner July 17, 2026 19:52
@codecov

codecov Bot commented Jul 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.07%. Comparing base (4e8c9fd) to head (1360413).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6931      +/-   ##
==========================================
- Coverage   95.07%   95.07%   -0.01%     
==========================================
  Files         409      409              
  Lines       14243    14240       -3     
  Branches     3267     3267              
==========================================
- Hits        13542    13539       -3     
  Misses        701      701              
Files with missing lines Coverage Δ
...perimental/packages/sdk-logs/src/LoggerProvider.ts 100.00% <100.00%> (ø)
...l/packages/sdk-logs/src/MultiLogRecordProcessor.ts 100.00% <100.00%> (ø)
...sdk-logs/src/internal/LoggerProviderSharedState.ts 97.29% <ø> (-0.08%) ⬇️
🚀 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.

@opentelemetry-pr-dashboard

opentelemetry-pr-dashboard Bot commented Jul 18, 2026

Copy link
Copy Markdown

Pull request dashboard status

  • Status: Merged.

@pichlermarc
pichlermarc added this pull request to the merge queue Jul 20, 2026
Merged via the queue into open-telemetry:main with commit b4ef7a5 Jul 20, 2026
29 checks passed
@otelbot

otelbot Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Thank you for your contribution @LarryHu0217! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.

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.

[sdk-logs] move forceFlushTimeoutMillis setting to options object in forceFlush()

2 participants