The opentelemetry-otlp, opentelemetry-aws, opentelemetry-prometheus, and opentelemetry-zpages crates in this repository consistently require full features from Tokio and Hyper, even if they are not needed by those crates. Only otlp specifies this requirement as a non-dev-dependency.
Using full in libraries results in added compile times for those crates and binaries that do not require these features, and goes counter to the reason that the tokio and hyper crates expose these features. Instead, each crate should only be requesting the tokio or hyper features that it actually requires.
Based on my initial inspection:
otlp only needs sync and rt, and for testing needs macros and rt-multi-threaded. This is the main one which unexpectedly bubbled up full to my application.
aws only needs macros and rt for testing.
prometheus claims to need hyper and tokio as dev dependencies, but I don't see them referred to in that module.
zpages seems to only need tokio as a dev dependency, but should be able to get away with macros and rt.
There are a variety of examples that also declare that they need "full" options, but these may not be as much of an issue except insofar as they make it harder to determine the actual minimal set of features required.
The
opentelemetry-otlp
,opentelemetry-aws
,opentelemetry-prometheus
, andopentelemetry-zpages
crates in this repository consistently requirefull
features from Tokio and Hyper, even if they are not needed by those crates. Onlyotlp
specifies this requirement as a non-dev-dependency.Using
full
in libraries results in added compile times for those crates and binaries that do not require these features, and goes counter to the reason that thetokio
andhyper
crates expose these features. Instead, each crate should only be requesting thetokio
orhyper
features that it actually requires.Based on my initial inspection:
otlp
only needssync
andrt
, and for testing needsmacros
andrt-multi-threaded
. This is the main one which unexpectedly bubbled upfull
to my application.aws
only needsmacros
andrt
for testing.prometheus
claims to needhyper
andtokio
as dev dependencies, but I don't see them referred to in that module.zpages
seems to only needtokio
as a dev dependency, but should be able to get away withmacros
andrt
.There are a variety of examples that also declare that they need "full" options, but these may not be as much of an issue except insofar as they make it harder to determine the actual minimal set of features required.