Skip to content

opentelemetry-sdk: unify logging force_flush timeout defaults to 10000ms - #5438

Open
avinab-neogy wants to merge 4 commits into
open-telemetry:mainfrom
avinab-neogy:fix/logging-force-flush-timeout-uniformity
Open

opentelemetry-sdk: unify logging force_flush timeout defaults to 10000ms#5438
avinab-neogy wants to merge 4 commits into
open-telemetry:mainfrom
avinab-neogy:fix/logging-force-flush-timeout-uniformity

Conversation

@avinab-neogy

Copy link
Copy Markdown
Contributor

Description

Fixes #5403

Aligns all force_flush timeout defaults in the logging SDK to a single value (10_000ms),
matching the exporters (LogRecordExporter, ConsoleLogRecordExporter, InMemoryLogExporter)
and the OTLP log exporters, which already used 10_000. Previously the logging module split
30000 / 3×10_000 across different processors/exporters.

Also changes BatchLogRecordProcessor.force_flush to require timeout_millis: int instead of
accepting int | None, so its signature matches the abstract LogRecordProcessor.force_flush
it implements — the rest of the hierarchy never accepted None.

Opened as draft: pending confirmation from @carlosalberto on whether 10_000 (vs. 30000,
to match traces) is the right target value, and confirming logging-only scope.

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?

  • pytest opentelemetry-sdk/tests/logs/ -q — 111 passed, no regressions
  • Ran locally on Python 3.10.12 against the modified source (editable install)

Does This PR Require a Contrib Repo Change?

  • Yes. - Link to PR:
  • No.

Checklist:

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

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 days of this comment.
If you're still working on this, please add a comment or push new commits.

@github-actions github-actions Bot added the Stale label Aug 3, 2026
@github-actions github-actions Bot removed the Stale label Aug 4, 2026
@avinab-neogy
avinab-neogy marked this pull request as ready for review August 4, 2026 04:21
@avinab-neogy
avinab-neogy requested a review from a team as a code owner August 4, 2026 04:21
@avinab-neogy

Copy link
Copy Markdown
Contributor Author

@xrmx @carlosalberto Bumping this! It's out of draft and ready for a review. I went with 10_000 to match metrics, but just let me know if you'd rather I align it to 30000 for traces instead and I'll push an update.

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

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Make logging API/SDK timeouts uniform before release

1 participant