Skip to content

Conversation

@cratelyn
Copy link
Member

@cratelyn cratelyn commented Apr 1, 2025

this commit removes the linkerd-http-executor crate, and replaces all usage of its TracingExecutor type with the TokioExecutor type provided by hyper-util.

this work is based upon hyperium/hyper-util#166. that change, included in the 0.1.11 release, altered the TokioExecutor type so that it propagates tracing context when the tracing feature is enabled.

with that change made, our TracingExecutor type is now redundant.

this commit removes the `linkerd-http-executor` crate, and replaces all
usage of its `TracingExecutor` type with the `TokioExecutor` type
provided by `hyper-util`.

this work is based upon hyperium/hyper-util#166. that change, included
in the 0.1.11 release, altered the `TokioExecutor` type so that it
propagates tracing context when the `tracing` feature is enabled.

with that change made, our `TracingExecutor` type is now redundant.

* hyperium/hyper-util#166
* https://github.com/hyperium/hyper-util/blob/master/CHANGELOG.md#0111-2025-03-31

Signed-off-by: katelyn martin <kate@buoyant.io>
@cratelyn cratelyn marked this pull request as ready for review April 1, 2025 16:42
@cratelyn cratelyn requested a review from a team as a code owner April 1, 2025 16:42
Comment on lines +132 to +135
[workspace.dependencies.hyper-util]
version = "0.1"
default-features = false
features = ["tokio", "tracing"]
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NB: https://github.com/hyperium/hyper-util/pull/166/files#diff-bdb64647cd31ba75babe48b3287899e6116a0a8c8267624ba227f86df5937467

to prevent any footguns wherein we might neglect to set this feature flag, and inadvertently fail to propagate trace context, i've set this at the workspace level.

Comment on lines +37 to -42
pub use hyper_util::rt::tokio::TokioExecutor;
pub use linkerd_http_box::{BoxBody, BoxRequest, BoxResponse, EraseResponse};
pub use linkerd_http_classify as classify;
pub use linkerd_http_detect::{
DetectMetrics, DetectMetricsFamilies, DetectParams, Detection, NewDetect,
};
pub use linkerd_http_executor::TracingExecutor;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i've reexported this from linkerd-proxy-http, as we did for the previous executor.

i took the time to update callers to use the new name, rather than doing this under an alias. vim macros made this a straight-forward bit of work.

@cratelyn cratelyn merged commit 686934c into main Apr 1, 2025
16 checks passed
@cratelyn cratelyn deleted the kate/proxy-http.use-new-hyper-util-executor branch April 1, 2025 17:19
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