Could not find `trace` in `tower_http`
Sidu28 opened this issue · 1 comments
Sidu28 commented
- I have looked for existing issues (including closed) about this
Bug Report
Version
tower-http v0.5.2
Platform
Darwin Kernel Version 23.1.0
Description
A simple cargo add tower-http installs v0.5.2. However when I attempt to add use tower-http::trace::TraceLayer
,get the following:
error[E0432]: unresolved import `tower_http::trace`
--> apps/src/bin/webserver.rs:45:17
|
45 | use tower_http::trace::TraceLayer;
| ^^^^^ could not find `trace` in `tower_http`
Several other versions of tower-http result in the same issue.
seanmonstar commented
You need to enable feature flags. The yellow things you see in the docs over different middleware indicate what feature flag name you need to enable to use it.