Skip to content

Submit client span updates eagerly and observe delivery - #134

Closed
Stephen Belanger (Qard) wants to merge 1 commit into
refactor/eager-experiment-readsfrom
refactor/eager-client-span-updates
Closed

Stephen Belanger (Qard) wants to merge 1 commit into
refactor/eager-experiment-readsfrom
refactor/eager-client-span-updates

Conversation

@Qard

Copy link
Copy Markdown
Contributor

Client span updates previously exposed only queue admission: the explicit-credential method returned before delivery, while the login-dependent async method queued nothing until polled and login finished. Make both methods submit immediately and return Completion tokens covering validation, pending login, preparation, and full batch delivery.

  • Separate validated owned patch data from credential resolution. Known scopes are captured immediately; pending login produces the immutable selected scope during queued preparation, so flush/shutdown already cover the write while login is unresolved.
  • Generalize the private deferred-write port to yield a fully scoped PreparedSpan. Experiment registration uses the same path. Keep unresolved identity in the preparation future, with a row ID for diagnostics; rejected preparation is never polled. Ready commands use a box to keep deferred command storage compact.
  • Preserve exported IDs, parent/propagated context, span origin, and explicit credential isolation. Migrate successful explicit-update callers to await delivery rather than unwrap admission.

Stacked on #133. Traced callbacks and the standalone direct API completion facade remain subsequent layers.

Validation: 343 unit/integration tests and 9 doctests passed, with existing ignored tests unchanged. Strict all-target/all-feature Clippy, rustdoc, formatting, and diff checks passed. New consumer regressions cover plain-thread unobserved updates after owner drop, gated pending login through shutdown with organization-selected routing, terminal batch failure and fresh retry, validation and both admission limits, login timeout, and stopped-runtime cleanup when pending scope resolution owns the client. Existing credential, span-origin, parent, finished-span, experiment and pagination tests passed.

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.

1 participant