Skip to content

Conversation

@Aaron1011
Copy link
Member

@Aaron1011 Aaron1011 commented Jan 23, 2026

This should result in Sentry displaying a link from the task execution trace (where 'await_event' is called) back to the trace that performed the 'emit_event' call

Note that this is a breaking change, as we now wrap the user's payload in a struct when reading/writing to the database. Going forward, we'll be able to add new (optional) fields to this wrapper struct without breaking existing durable deployments


Note

Introduces trace-aware event payloads and links traces across emit/await.

  • Adds EventPayloadWrapper and wraps all event payloads in client.emit_event[_with], injecting trace_context when telemetry is enabled; DB now stores the wrapper instead of raw payload (breaking change)
  • Updates TaskContext.await_event to decode the wrapper and (telemetry) add a span link to the emitter trace; caches the wrapped JSON
  • Refactors TaskContext.emit_event to delegate to client and adds TaskError::EmitEventFailed (with serialization for persistence)
  • Adjusts tests to emit wrapper-shaped JSON directly when calling SQL

Written by Cursor Bugbot for commit 04cf09d. This will update automatically on new commits. Configure here.

This should result in Sentry displaying a link from the task
execution trace (where 'await_event' is called) back to the trace
that performed the 'emit_event' call

Note that this is a *breaking change*, as we now wrap the user's payload
in a struct when reading/writing to the database. Going forward, we'll
be able to add new (optional) fields to this wrapper struct without
breaking existing durable deployments
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.

3 participants