Skip to content

[OPIK-5664] [SDK] fix: improve batching warning with actionable alternatives#6142

Merged
alexkuzmik merged 4 commits intomainfrom
aliaksandrk/OPIK-5664-improve-batching-warning-message
Apr 8, 2026
Merged

[OPIK-5664] [SDK] fix: improve batching warning with actionable alternatives#6142
alexkuzmik merged 4 commits intomainfrom
aliaksandrk/OPIK-5664-improve-batching-warning-message

Conversation

@alexkuzmik
Copy link
Copy Markdown
Collaborator

Details

Improves the batching data loss warning message to:

  • Clarify the risk applies specifically to updates shortly after creation
  • Suggest disabling batching via Opik(batching=False)
  • Suggest using @track decorator or start_as_current_span context manager as safer alternatives

Before:

Calling Span.end() with batching enabled may cause data loss — updates can be dropped if they arrive before the create request is flushed.

After:

Calling Span.end() shortly after creation with batching enabled may cause data loss — the update can be dropped if it arrives before the batched create request is flushed. Consider disabling batching via Opik(batching=False), or using the @track decorator or start_as_current_span context manager instead.

Change checklist

  • User facing
  • Documentation update

Issues

  • OPIK-5664

Testing

N/A — message string change only.

Documentation

N/A

alexkuzmik and others added 2 commits April 8, 2026 18:59
…natives

Add guidance to the batching data loss warning: suggest disabling
batching via Opik(batching=False), or using @track decorator or
start_as_current_span context manager instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions bot added python Pull requests that update Python code Python SDK labels Apr 8, 2026
@alexkuzmik alexkuzmik force-pushed the aliaksandrk/OPIK-5664-improve-batching-warning-message branch from 376fb13 to 4ce8cdd Compare April 8, 2026 17:04
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alexkuzmik alexkuzmik force-pushed the aliaksandrk/OPIK-5664-improve-batching-warning-message branch from 4ce8cdd to 8721a3d Compare April 8, 2026 17:05
@alexkuzmik alexkuzmik marked this pull request as ready for review April 8, 2026 17:07
@alexkuzmik alexkuzmik requested a review from a team as a code owner April 8, 2026 17:07
@alexkuzmik alexkuzmik merged commit 0cc5529 into main Apr 8, 2026
7 checks passed
@alexkuzmik alexkuzmik deleted the aliaksandrk/OPIK-5664-improve-batching-warning-message branch April 8, 2026 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Python SDK python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant