Skip to content

feat(client): Use span streaming exclusively - #828

Merged
untitaker merged 1 commit into
mainfrom
ivana/span-streaming
Oct 22, 2026
Merged

untitaker merged 1 commit into
mainfrom
ivana/span-streaming

Conversation

@sentrivana

@sentrivana sentrivana commented Oct 22, 2026 •

Copy link
Copy Markdown
Contributor

Sentry already uses span streaming, so remove the legacy transaction-based-tracing paths.

This is a prerequisite to ultimately move taskbroker to SDK 3.0, which supports span streaming exclusively.


Drop the transaction-based tracing path from the Python client and always use the sentry_sdk.traces span streaming API. Bumps sentry-sdk to >=2.73.0.

Breaking: apps using taskbroker-client must set trace_lifecycle="stream" in sentry_sdk.init(). Otherwise the SDK returns no-op spans (and warns on every task), so no taskworker spans are emitted.

Changes:

  • sdk.py: remove the has_span_streaming_enabled branching, start_transaction, and set_data calls. Rename start_transaction to start_segment.
  • Set sentry.origin on streamed spans. The streaming path previously didn't, so spans reported manual instead of taskworker.
  • Remove taskworker-task.args/kwargs span data. This was only ever set on transactions; it was deliberately skipped for streamed spans because eager serialization increases memory use.
  • Tests: replace start_transaction usage and drop the static trace lifecycle parametrization.

Drop the transaction-based tracing path and always use the
sentry_sdk.traces span streaming API. Bump sentry-sdk to 2.73.0.

Apps using taskbroker-client must set trace_lifecycle="stream" in
sentry_sdk.init(), otherwise no taskworker spans are emitted.

- Rename sdk.start_transaction to start_segment
- Set sentry.origin on streamed spans (previously defaulted to "manual")
- Remove task args/kwargs span data, which was only set on transactions
@sentrivana
sentrivana marked this pull request as ready for review October 22, 2026 11:27
@sentrivana
sentrivana requested a review from a team as a code owner October 22, 2026 11:27
@untitaker
untitaker merged commit 20d542c into main Oct 22, 2026
36 checks passed
@untitaker
untitaker deleted the ivana/span-streaming branch October 22, 2026 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants