Skip to content

feat: transaction context propagation #195

Backlog

Description

@toddbaert

The SDK doesn't support transaction context propagation. Rust is a server-side (dynamic-context) SDK, so the requirements under 3.3.1 apply:

  • 3.3.1.1: the API has a method for setting a transaction context propagator
  • 3.3.1.2.1: the API has a method for setting the evaluation context of the current transaction
  • 3.3.1.2.2, 3.3.1.2.3: a propagator can set and get the evaluation context of the current transaction
  • 3.2.3: transaction context is merged between API (global) and client context

Without it, application authors have to pass per-request context (user, tenant, etc.) to every evaluation by hand.

Async makes this a bit more interesting than in other SDKs: a thread-local propagator doesn't follow a task across .await points on a multi-threaded runtime. tokio::task_local! does, but ties the propagator to tokio. I think the propagator should be a trait, with an implementation for tokio task-locals (behind a feature flag), so other runtimes can plug in their own. WDYT?

Activity

  1. added
    help wanted
    on Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions