Fix BatchLogRecordProcessor default schedule_delay_millis to 1000ms per OTel spec#4998
Fix BatchLogRecordProcessor default schedule_delay_millis to 1000ms per OTel spec#4998Manvi2402 wants to merge 3 commits intoopen-telemetry:mainfrom
Conversation
pmcollins
left a comment
There was a problem hiding this comment.
Thanks for the change. Can you also update the default value in the docstring for OTEL_BLRP_SCHEDULE_DELAY (in environment_variables/__init__.py)?
CHANGELOG.md
Outdated
|
|
||
| ## Unreleased | ||
|
|
||
| - Fix `BatchLogRecordProcessor` default `schedule_delay_millis` to 1000ms per OTel specification |
There was a problem hiding this comment.
| - Fix `BatchLogRecordProcessor` default `schedule_delay_millis` to 1000ms per OTel specification | |
| - Fix `BatchLogRecordProcessor` default `schedule_delay_millis` from 5000ms to 1000ms to comply with the OTel specification. Note: logs will be exported 5x more frequently by default (e.g. for users who don't explicitly set the `OTEL_BLRP_SCHEDULE_DELAY` env var). |
|
Hi @pmcollins , I've made both the requested changes — updated the CHANGELOG wording and the OTEL_BLRP_SCHEDULE_DELAY docstring default to 1000ms. Please let me know if anything else is needed! |
themavik
left a comment
There was a problem hiding this comment.
Summary: Aligns BatchLogRecordProcessor default schedule_delay_millis from 5000ms to 1000ms per OTel spec.
Done well: Changelog clearly documents the 5x export frequency change for users who rely on defaults. All three touchpoints updated consistently: _DEFAULT_SCHEDULE_DELAY_MILLIS, env var docs, and the three test_args_* assertions (5→1 seconds). The test values correctly reflect seconds internally.
Note: Users not setting OTEL_BLRP_SCHEDULE_DELAY will see more frequent exports; the changelog handles this. Consider whether any performance or rate-limit docs should mention the new default.
|
Thank you for the detailed review @themavik . Agreed on the performance/rate-limit docs — that feels like a separate issue. Happy to open one if that would be helpful! |
…er OTel spec
Description
The
BatchLogRecordProcessor._DEFAULT_SCHEDULE_DELAY_MILLISwas set to5000ms, but the OTel specification defines
OTEL_BLRP_SCHEDULE_DELAYdefault as 1000ms.
Fixes #4991
Type of change
How Has This Been Tested?
Updated existing unit tests in
opentelemetry-sdk/tests/logs/test_export.pyto reflect the corrected default value of 1000ms instead of 5000ms.
Does This PR Require a Contrib Repo Change?
Checklist: