Repository navigation
Conversation
tracing 0.1 types are in the public API of irpc. tracing 0.2 is stalled and has no release date, so irpc 1.0 ships with tracing 0.1. This PR prepares the API so that a minor release can add support for a later tracing version under a new feature, for example `tracing-02`, while the current features stay unversioned. * `WithChannels` is `#[non_exhaustive]`, so a new field, for example a tracing 0.2 span, is not a breaking change. The `From` impls create it, and all patterns in this repo already use `..`. * `span_propagation::set_span_parent_from_remote` moves to `__macro_exports`. Only the code of the macro calls it. With only the `rpc` feature, tracing is no longer in the public API. * The allowlist of external types moves `tracing::span::Span` from the 1.0 crates to the stable non-1.0 crates. ## How a `tracing-02` feature would work tracing 0.1 stays in the API in these places: * `WithChannels::span` and `parent_span_opt`, with `spans`: `tracing-02` adds a field with a tracing 0.2 span and an accessor. The `From` impls fill each field from the current span of its tracing version, so both features can be enabled at once. * The macro: the generated code only names items in `__macro_exports`, which can route by the features of irpc. But the macro does not know these features, and the generated `parent_span()` returns a tracing 0.1 span in the API of the crate that uses the macro. tracing 0.2 spans in generated code need an opt-in argument, for example `rpc_requests(tracing_02)`, and new method names. * `span_propagation::Propagator` takes a tracing 0.1 span. tracing 0.2 needs a second trait and `layer` function under the new feature. The wire format does not depend on tracing and stays. * A `tracing-subscriber` 0.4 on tracing 0.1 only needs a second `layer` function under a feature like `tracing-subscriber-04`. `Propagator` stays. Limits: * The default features keep tracing 0.1 for all of 1.x. * irpc logs its own events with tracing 0.1. A subscriber of tracing 0.2 does not see them, unless tracing 0.2 forwards events from 0.1. This is not part of the API. ## Breaking changes * changed: `WithChannels` is `#[non_exhaustive]`. Other crates cannot use struct expressions, or patterns without `..`. * removed: `span_propagation::set_span_parent_from_remote`. The code of the macro calls it through `__macro_exports`.
Frando
marked this pull request as draft
October 5, 2026 15:20
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Based on #129.
tracing 0.1 types are in the public API of irpc. tracing 0.2 is stalled and has no release date, so irpc 1.0 ships with tracing 0.1. This PR prepares the API so that a minor release can add support for a later tracing version under a new feature, for example
tracing-02, while the current features stay unversioned.WithChannelsis#[non_exhaustive], so a new field, for example a tracing 0.2 span, is not a breaking change.span_propagation::set_span_parent_from_remotemoves to__macro_exports. Only the code of the macro calls it. With only therpcfeature, tracing is no longer in the public API.tracing::span::Spanfrom the 1.0 crates to the stable non-1.0 crates.The commit message has an evaluation of how a
tracing-02feature would work, and what it would not cover.Breaking changes
WithChannelsis#[non_exhaustive]. Other crates cannot use struct expressions, or patterns without...span_propagation::set_span_parent_from_remote. The code of the macro calls it through__macro_exports.