Skip to content

Commit

Permalink
tracing: update mysten-infra pointer and enable control of tracing vi…
Browse files Browse the repository at this point in the history
…a env vars
  • Loading branch information
bmwill committed Jun 3, 2022
1 parent c809552 commit 38b2a2c
Show file tree
Hide file tree
Showing 17 changed files with 199 additions and 106 deletions.
178 changes: 139 additions & 39 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion crates/sui-cluster-test/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ serde_with = { version = "1.13.0", features = ["hex"] }
tracing = { version = "0.1.34", features = ["log"] }
clap = { version = "3.1.14", features = ["derive"] }
reqwest = { version = "0.11.10", features = ["blocking", "json"] }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c" }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }

sui-faucet = { path = "../sui-faucet" }
sui = { path = "../sui" }
Expand Down
10 changes: 3 additions & 7 deletions crates/sui-cluster-test/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -405,13 +405,9 @@ impl ClusterTest {

#[tokio::main]
async fn main() {
let config = telemetry_subscribers::TelemetryConfig {
service_name: "cluster-test".into(),
enable_tracing: std::env::var("SUI_TRACING_ENABLE").is_ok(),
json_log_output: std::env::var("SUI_JSON_SPAN_LOGS").is_ok(),
..Default::default()
};
let _guard = telemetry_subscribers::init(config);
let _guard = telemetry_subscribers::TelemetryConfig::new(env!("CARGO_BIN_NAME"))
.with_env()
.init();

let options = ClusterTestOpt::parse();
let mut test = ClusterTest::setup(options);
Expand Down
6 changes: 3 additions & 3 deletions crates/sui-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ clap = { version = "3.1.17", features = ["derive"] }
bincode = "1.3.3"
schemars = "0.8.10"
multiaddr = "0.14.0"
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c" }
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }
prometheus_exporter = "0.8.4"
once_cell = "1.11.0"
colored = "2.0.0"
Expand All @@ -56,7 +56,7 @@ move-package = { git = "https://github.com/move-language/move", rev = "1b2d3b427
move-vm-runtime = { git = "https://github.com/move-language/move", rev = "1b2d3b4274345f5b4b6a1a1bde5aee452003ab5b" }
move-vm-types = { git = "https://github.com/move-language/move", rev = "1b2d3b4274345f5b4b6a1a1bde5aee452003ab5b" }

typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c"}
typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223"}

narwhal-executor = { git = "https://github.com/MystenLabs/narwhal", rev = "2c5e8236c0702a3ff47dd769c2bbc94b029bf4a9", package = "executor" }
narwhal-types = { git = "https://github.com/MystenLabs/narwhal", rev = "2c5e8236c0702a3ff47dd769c2bbc94b029bf4a9", package = "types" }
Expand All @@ -70,7 +70,7 @@ serde_yaml = "0.8.23"
pretty_assertions = "1.2.1"
temp_testdir = "0.2.3"
hex = "0.4.3"
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "2de1a391654a7ee09d867de2f16627b915ad21f0" }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }

test-fuzz = "3.0.2"
test-utils = { path = "../test-utils" }
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-gateway/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ sui-open-rpc = { path = "../sui-open-rpc" }
sui-open-rpc-macros = { path = "../sui-open-rpc-macros" }

move-core-types = { git = "https://github.com/move-language/move", rev = "1b2d3b4274345f5b4b6a1a1bde5aee452003ab5b", features = ["address20"] }
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c" }
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }
workspace-hack = { path = "../workspace-hack"}
2 changes: 1 addition & 1 deletion crates/sui-network/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ bincode = "1.3.3"
serde = "1.0.136"
sui-types = { path = "../sui-types" }

mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c" }
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }
workspace-hack = { path = "../workspace-hack"}

[build-dependencies]
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ sui-storage = { path = "../sui-storage" }
sui-gateway = { path = "../sui-gateway" }
sui-network = { path = "../sui-network" }

telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c" }
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c" }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }
workspace-hack = { path = "../workspace-hack"}
11 changes: 3 additions & 8 deletions crates/sui-node/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,9 @@ struct Args {
#[tokio::main]
async fn main() -> Result<()> {
// Initialize logging
let config = telemetry_subscribers::TelemetryConfig {
service_name: "sui-node".into(),
enable_tracing: std::env::var("SUI_TRACING_ENABLE").is_ok(),
json_log_output: std::env::var("SUI_JSON_SPAN_LOGS").is_ok(),
..Default::default()
};

let _guard = telemetry_subscribers::init(config);
let _guard = telemetry_subscribers::TelemetryConfig::new(env!("CARGO_BIN_NAME"))
.with_env()
.init();

let args = Args::parse();

Expand Down
4 changes: 2 additions & 2 deletions crates/sui-storage/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ tracing = "0.1.34"

sui-types = { path = "../sui-types" }

typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c"}
typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223"}
workspace-hack = { path = "../workspace-hack"}

move-core-types = { git = "https://github.com/move-language/move", rev = "1b2d3b4274345f5b4b6a1a1bde5aee452003ab5b", features = ["address20"] }
Expand All @@ -29,7 +29,7 @@ move-core-types = { git = "https://github.com/move-language/move", rev = "1b2d3b
tempfile = "3.3.0"
num_cpus = "1.13.1"
pretty_assertions = "1.2.0"
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "2de1a391654a7ee09d867de2f16627b915ad21f0" }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }

[[bench]]
name = "write_ahead_log"
Expand Down
4 changes: 2 additions & 2 deletions crates/sui-swarm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ sui-core = { path = "../sui-core" }
sui-node = { path = "../sui-node" }
sui-types = { path = "../sui-types" }

mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c" }
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }
workspace-hack = { path = "../workspace-hack"}

[dev-dependencies]
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c" }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }
4 changes: 2 additions & 2 deletions crates/sui-types/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ schemars ="0.8.10"
tonic = "0.7"
strum_macros = "^0.24"

name-variant = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c" }
typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c" }
name-variant = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }
typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }

move-binary-format = { git = "https://github.com/move-language/move", rev = "1b2d3b4274345f5b4b6a1a1bde5aee452003ab5b" }
move-bytecode-utils = { git = "https://github.com/move-language/move", rev = "1b2d3b4274345f5b4b6a1a1bde5aee452003ab5b" }
Expand Down
4 changes: 2 additions & 2 deletions crates/sui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ serde-value = "0.7.0"
serde-name = "0.2.1"
dirs = "4.0.0"
clap = { version = "3.1.17", features = ["derive"] }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c" }
telemetry-subscribers = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }
prometheus_exporter = "0.8.4"
multiaddr = "0.14.0"
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "988cad6aaafac84d52a93227a16867bf27c1ea4c" }
mysten-network = { git = "https://github.com/MystenLabs/mysten-infra", rev = "ff5c1d69057fe93be658377462ca2875a57a0223" }

bcs = "0.1.3"
sui-core = { path = "../sui-core" }
Expand Down
12 changes: 4 additions & 8 deletions crates/sui/src/bin/rpc-server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,10 @@ struct RpcGatewayOpt {

#[tokio::main]
async fn main() -> anyhow::Result<()> {
let config = telemetry_subscribers::TelemetryConfig {
service_name: "rpc_gateway".into(),
enable_tracing: std::env::var("SUI_TRACING_ENABLE").is_ok(),
json_log_output: std::env::var("SUI_JSON_SPAN_LOGS").is_ok(),
..Default::default()
};
#[allow(unused)]
let guard = telemetry_subscribers::init(config);
let _guard = telemetry_subscribers::TelemetryConfig::new(env!("CARGO_BIN_NAME"))
.with_env()
.init();

let options: RpcGatewayOpt = RpcGatewayOpt::parse();
let config_path = options
.config
Expand Down
11 changes: 3 additions & 8 deletions crates/sui/src/bin/sui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,9 @@ struct SuiOpt {

#[tokio::main]
async fn main() -> Result<(), anyhow::Error> {
let config = telemetry_subscribers::TelemetryConfig {
service_name: "sui".into(),
enable_tracing: std::env::var("SUI_TRACING_ENABLE").is_ok(),
json_log_output: std::env::var("SUI_JSON_SPAN_LOGS").is_ok(),
..Default::default()
};
#[allow(unused)]
let guard = telemetry_subscribers::init(config);
let _guard = telemetry_subscribers::TelemetryConfig::new(env!("CARGO_BIN_NAME"))
.with_env()
.init();

let options: SuiOpt = SuiOpt::parse();
options.command.execute().await
Expand Down
14 changes: 5 additions & 9 deletions crates/sui/src/bin/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,11 @@ struct ClientOpt {
}

async fn try_main() -> Result<(), anyhow::Error> {
let config = telemetry_subscribers::TelemetryConfig {
service_name: "wallet".into(),
enable_tracing: std::env::var("SUI_TRACING_ENABLE").is_ok(),
json_log_output: std::env::var("SUI_JSON_SPAN_LOGS").is_ok(),
log_file: Some("wallet.log".into()),
..Default::default()
};
#[allow(unused)]
let guard = telemetry_subscribers::init(config);
let _guard = telemetry_subscribers::TelemetryConfig::new(env!("CARGO_BIN_NAME"))
.with_log_file("wallet.log")
.with_env()
.init();

if let Some(git_rev) = std::option_env!("GIT_REV") {
debug!("Wallet built at git revision {git_rev}");
}
Expand Down
2 changes: 1 addition & 1 deletion crates/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ sui-adapter = { path = "../sui-adapter" }
sui-framework = { path = "../sui-framework" }
move-package = { git = "https://github.com/move-language/move", rev = "1b2d3b4274345f5b4b6a1a1bde5aee452003ab5b" }
move-core-types = { git = "https://github.com/move-language/move", rev = "1b2d3b4274345f5b4b6a1a1bde5aee452003ab5b", features = ["address20"] }
typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev ="988cad6aaafac84d52a93227a16867bf27c1ea4c"}
typed-store = { git = "https://github.com/MystenLabs/mysten-infra", rev ="ff5c1d69057fe93be658377462ca2875a57a0223"}
narwhal-config = { git = "https://github.com/MystenLabs/narwhal", rev = "2c5e8236c0702a3ff47dd769c2bbc94b029bf4a9", package = "config" }

sui-config = { path = "../sui-config" }
Expand Down
Loading

0 comments on commit 38b2a2c

Please sign in to comment.