Skip to content

[OPIK-5664] [E2E] fix: replace span.end() with end_time at creation#6139

Merged
alexkuzmik merged 1 commit intomainfrom
aliaksandrk/OPIK-5664-fix-e2e-span-end
Apr 8, 2026
Merged

[OPIK-5664] [E2E] fix: replace span.end() with end_time at creation#6139
alexkuzmik merged 1 commit intomainfrom
aliaksandrk/OPIK-5664-fix-e2e-span-end

Conversation

@alexkuzmik
Copy link
Copy Markdown
Collaborator

Details

Replace span.end() calls with end_time passed at span creation time in the E2E test helper service. With batching enabled (now the default), calling .end() shortly after creation sends an update message that can arrive at the server before the batched create request is flushed, causing the update to be silently dropped (data loss).

Three callsites fixed in tests_end_to_end/test-helper-service/routes/traces.py:

  • create-traces-client endpoint
  • create-traces-with-spans-client endpoint
  • create-trace-with-attachment endpoint

Change checklist

  • User facing
  • Documentation update

Issues

  • OPIK-5664

Testing

Existing E2E tests cover these endpoints — the behavior is unchanged (spans still get an end_time), just set at creation instead of via a separate update message.

Documentation

N/A

Pass end_time directly to span constructor instead of calling .end()
shortly after creation. With batching enabled, .end() sends an update
that can arrive before the batched create is flushed, causing data loss.

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 tests Including test files, or tests related like configuration. labels Apr 8, 2026
@alexkuzmik alexkuzmik marked this pull request as ready for review April 8, 2026 17:06
@alexkuzmik alexkuzmik requested review from a team as code owners April 8, 2026 17:06
@alexkuzmik alexkuzmik merged commit 50ee0ba into main Apr 8, 2026
11 checks passed
@alexkuzmik alexkuzmik deleted the aliaksandrk/OPIK-5664-fix-e2e-span-end 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 Pull requests that update Python code tests Including test files, or tests related like configuration.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant