Skip to content

fix(sdk): add validation for export_timeout_millis <= 0 in BatchSpanP… - #5650

Open
Dotify71 wants to merge 1 commit into
open-telemetry:mainfrom
Dotify71:fix-batch-span-processor-timeout-validation
Open

fix(sdk): add validation for export_timeout_millis <= 0 in BatchSpanP…#5650
Dotify71 wants to merge 1 commit into
open-telemetry:mainfrom
Dotify71:fix-batch-span-processor-timeout-validation

Conversation

@Dotify71

Copy link
Copy Markdown

Description

Fixes #5648

Currently, BatchSpanProcessor validates max_queue_size, schedule_delay_millis, and max_export_batch_size during initialization to ensure they are positive integers. However, export_timeout_millis was omitted from argument validation, allowing non-positive or negative values (0 or negative integers) to be passed without error.

This PR adds validation for export_timeout_millis in BatchSpanProcessor._validate_arguments(), raising a ValueError if export_timeout_millis <= 0.

Type of change

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

How Has This Been Tested?

  • Unit tests in opentelemetry-sdk/tests/trace/export/test_export.py (test_invalid_export_timeout_millis)

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

@Dotify71
Dotify71 requested a review from a team as a code owner September 10, 2026 06:02
@linux-foundation-easycla

linux-foundation-easycla Bot commented Sep 10, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Dotify71 / name: Dushyant Acharya (9b5daa0)

@opentelemetry-pr-dashboard

Copy link
Copy Markdown

Pull request dashboard status

Waiting on reviewers · refreshed 2026-09-10 21:28 UTC

Review the latest changes.

Status above doesn't look right?
  • Just replied or pushed? Anything around or after the refresh time above may not be picked up yet — give it a few minutes.
  • Anything look wrong? Report it with what you expected; it helps us improve the dashboard.

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.

[bug] BatchSpanProcessor missing validation for export_timeout_millis <= 0

1 participant