chore(metrics): clean up feature flagging (#3741)

linkerd-metrics exposes a 'stack' feature but uses a 'linkerd-stack' feature
internally. This change cleans this up.
This commit is contained in:
Oliver Gould 2025-03-11 12:46:39 -07:00 committed by GitHub
parent 87d6d38510
commit 4c79bdf730
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 9 additions and 8 deletions

View File

@ -23,5 +23,5 @@ tracing = "0.1"
linkerd-error = { path = "../../error" }
linkerd-http-classify = { path = "../classify" }
linkerd-metrics = { path = "../../metrics", features = ["linkerd-stack"] }
linkerd-metrics = { path = "../../metrics", features = ["stack"] }
linkerd-stack = { path = "../../stack" }

View File

@ -8,8 +8,8 @@ publish = false
[features]
default = []
process = ["linkerd-system"]
stack = ["linkerd-stack"]
process = ["dep:linkerd-system"]
stack = ["dep:linkerd-stack"]
test_util = []
[dependencies]
@ -17,14 +17,15 @@ deflate = { version = "1", features = ["gzip"] }
http = { workspace = true }
http-body = { workspace = true }
hyper = { workspace = true, features = ["deprecated", "http1", "http2"] }
linkerd-http-box = { path = "../http/box" }
linkerd-stack = { path = "../stack", optional = true }
linkerd-system = { path = "../system", optional = true }
parking_lot = "0.12"
prometheus-client = "0.22"
tokio = { version = "1", features = ["time"] }
tracing = "0.1"
linkerd-http-box = { path = "../http/box" }
linkerd-stack = { path = "../stack", optional = true }
linkerd-system = { path = "../system", optional = true }
[dev-dependencies]
quickcheck = { version = "1", default-features = false }
tokio = { version = "1", features = ["rt", "macros", "test-util", "time"] }

View File

@ -8,14 +8,14 @@ mod fmt;
mod gauge;
mod histogram;
pub mod latency;
#[cfg(feature = "linkerd-stack")]
#[cfg(feature = "stack")]
mod new_metrics;
#[cfg(feature = "process")]
pub mod process;
mod serve;
mod store;
#[cfg(feature = "linkerd-stack")]
#[cfg(feature = "stack")]
pub use self::new_metrics::NewMetrics;
pub use self::{
counter::Counter,