Skip to content

Support middleware clients for automatic Rust trace propagation - #16

Merged
meoyawn merged 2 commits into
masterfrom
codex/rust-otel-propagation
Sep 27, 2026
Merged

meoyawn merged 2 commits into
masterfrom
codex/rust-otel-propagation

Conversation

@meoyawn

@meoyawn meoyawn commented Sep 27, 2026

Copy link
Copy Markdown
Collaborator

Generated Rust clients accept a plain Reqwest client, which prevents applications from installing tracing middleware once at construction. Callers otherwise have to route each request through a separate executor.

Accept reqwest_middleware::ClientWithMiddleware and return its request builders so every generated .send() uses the configured middleware. The README now teaches one construction-time insertion point using reqwest-tracing, with compatible dependencies and the required application tracing setup.

Validation: moon run oasmith:check passed. The new Rust regression first failed because the constructor rejected the middleware client, then passed with concurrent requests built before entering their spans. It verifies distinct active traces, HTTP child spans, authentication, JSON error decoding, and streaming SSE responses.

@meoyawn
meoyawn merged commit 300e810 into master Sep 27, 2026
1 check passed
@meoyawn
meoyawn deleted the codex/rust-otel-propagation branch September 27, 2026 03:04
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