forked from linkerd/linkerd2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move telemetry::transport to transport::metrics (linkerd#85)
Following linkerd#84, the `telemetry::transport` module can be moved into the `transport` module. This should allow us to simplify type signatures by combining redundant types. It's also hoped that we can reduce the API boilerplate around metrics so it's much easier to instrument and track new metrics in transport code.
- Loading branch information
Showing
10 changed files
with
34 additions
and
97 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,15 @@ | ||
use std::sync::{Arc, Mutex}; | ||
use std::time::{Duration, SystemTime}; | ||
|
||
use linkerd2_metrics as metrics; | ||
|
||
mod errno; | ||
pub mod http; | ||
mod process; | ||
pub mod process; | ||
mod report; | ||
pub mod tap; | ||
pub mod tls_config_reload; | ||
pub mod transport; | ||
|
||
use self::errno::Errno; | ||
pub use self::errno::Errno; | ||
pub use self::http::event::Event; | ||
pub use self::report::Report; | ||
pub use self::http::Sensors; | ||
|
||
pub type ServeMetrics = metrics::Serve<Report>; | ||
|
||
pub fn new( | ||
start_time: SystemTime, | ||
metrics_retain_idle: Duration, | ||
taps: &Arc<Mutex<tap::Taps>>, | ||
) -> (Sensors, transport::Registry, tls_config_reload::Sensor, ServeMetrics) { | ||
let process = process::Report::new(start_time); | ||
let (http_sensors, http_report) = http::new(metrics_retain_idle, taps); | ||
let (transport_registry, transport_report) = transport::new(); | ||
let (tls_config_sensor, tls_config_report) = tls_config_reload::new(); | ||
|
||
let report = Report::new(http_report, transport_report, tls_config_report, process); | ||
(http_sensors, transport_registry, tls_config_sensor, ServeMetrics::new(report)) | ||
} |
This file contains 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
This file contains 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
This file contains 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
File renamed without changes.
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,7 @@ mod connect; | |
mod connection; | ||
mod addr_info; | ||
mod io; | ||
pub mod metrics; | ||
mod prefixed; | ||
pub mod tls; | ||
|
||
|