Skip to content

Commit

Permalink
fix madsim
Browse files Browse the repository at this point in the history
Signed-off-by: Bugen Zhao <[email protected]>
  • Loading branch information
BugenZhao committed Jun 16, 2023
1 parent c0c3538 commit abbcf2a
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
2 changes: 0 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion src/utils/runtime/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ console = "0.15"
console-subscriber = "0.1.8"
futures = { version = "0.3", default-features = false, features = ["alloc"] }
hostname = "0.3"
opentelemetry = { version = "0.19", default-features = false, features = ["rt-tokio"] }
opentelemetry-otlp = { version = "0.12" }
opentelemetry-semantic-conventions = "0.11"
parking_lot = { version = "0.12", features = ["deadlock_detection"] }
Expand All @@ -41,4 +40,5 @@ tracing-opentelemetry = "0.19"
tracing-subscriber = { version = "0.3", features = ["fmt", "parking_lot", "std", "time", "local-time"] }

[target.'cfg(not(madsim))'.dependencies]
opentelemetry = { version = "0.19", default-features = false, features = ["rt-tokio"] }
workspace-hack = { path = "../../workspace-hack" }
3 changes: 2 additions & 1 deletion src/utils/runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ use std::path::PathBuf;
use std::time::Duration;

use futures::Future;
use opentelemetry_otlp::WithExportConfig;
use risingwave_common::metrics::MetricsLayer;
use tracing::level_filters::LevelFilter as Level;
use tracing_subscriber::filter::{Directive, Targets};
Expand Down Expand Up @@ -301,10 +300,12 @@ pub fn init_risingwave_logger(settings: LoggerSettings, registry: prometheus::Re
};

// Tracing layer
#[cfg(not(madsim))]
if let Ok(endpoint) = std::env::var("RW_TRACING_ENDPOINT") {
println!("tracing enabled, exported to `{endpoint}`");

use opentelemetry::{sdk, KeyValue};
use opentelemetry_otlp::WithExportConfig;
use opentelemetry_semantic_conventions::resource;

let id = format!(
Expand Down
4 changes: 0 additions & 4 deletions src/workspace-hack/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ num = { version = "0.4" }
num-bigint = { version = "0.4" }
num-integer = { version = "0.1", features = ["i128"] }
num-traits = { version = "0.2", features = ["i128", "libm"] }
opentelemetry = { version = "0.19", default-features = false, features = ["metrics", "rt-tokio", "trace"] }
opentelemetry_sdk = { version = "0.19", features = ["metrics", "rt-tokio"] }
parking_lot = { version = "0.12", features = ["arc_lock", "deadlock_detection"] }
parking_lot_core = { version = "0.9", default-features = false, features = ["deadlock_detection"] }
petgraph = { version = "0.6" }
Expand Down Expand Up @@ -150,8 +148,6 @@ num = { version = "0.4" }
num-bigint = { version = "0.4" }
num-integer = { version = "0.1", features = ["i128"] }
num-traits = { version = "0.2", features = ["i128", "libm"] }
opentelemetry = { version = "0.19", default-features = false, features = ["metrics", "rt-tokio", "trace"] }
opentelemetry_sdk = { version = "0.19", features = ["metrics", "rt-tokio"] }
parking_lot = { version = "0.12", features = ["arc_lock", "deadlock_detection"] }
parking_lot_core = { version = "0.9", default-features = false, features = ["deadlock_detection"] }
petgraph = { version = "0.6" }
Expand Down

0 comments on commit abbcf2a

Please sign in to comment.