remove gum dependency on jaeger (#2106)

Co-authored-by: Marcin S <marcin@realemail.net>
This commit is contained in:
jserrat
2023-11-01 11:58:46 -03:00
committed by GitHub
parent 00b85c51df
commit 2726d5af65
5 changed files with 18 additions and 28 deletions
Generated
-12
View File
@@ -12257,15 +12257,10 @@ name = "polkadot-node-core-pvf-execute-worker"
version = "1.0.0"
dependencies = [
"cpu-time",
"futures",
"parity-scale-codec",
"polkadot-node-core-pvf-common",
"polkadot-parachain-primitives",
"polkadot-primitives",
"rayon",
"sp-core",
"sp-maybe-compressed-blob",
"sp-tracing",
"tracing-gum",
]
@@ -12274,19 +12269,13 @@ name = "polkadot-node-core-pvf-prepare-worker"
version = "1.0.0"
dependencies = [
"cfg-if",
"futures",
"libc",
"parity-scale-codec",
"polkadot-node-core-pvf-common",
"polkadot-parachain-primitives",
"polkadot-primitives",
"rayon",
"sc-executor",
"sc-executor-common",
"sc-executor-wasmtime",
"sp-io",
"sp-maybe-compressed-blob",
"sp-tracing",
"tikv-jemalloc-ctl",
"tracing-gum",
]
@@ -19103,7 +19092,6 @@ name = "tracing-gum"
version = "1.0.0"
dependencies = [
"coarsetime",
"polkadot-node-jaeger",
"polkadot-primitives",
"tracing",
"tracing-gum-proc-macro",
@@ -8,9 +8,7 @@ license.workspace = true
[dependencies]
cpu-time = "1.0.0"
futures = "0.3.21"
gum = { package = "tracing-gum", path = "../../../gum" }
rayon = "1.5.1"
parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] }
@@ -18,9 +16,5 @@ polkadot-node-core-pvf-common = { path = "../common" }
polkadot-parachain-primitives = { path = "../../../../parachain" }
polkadot-primitives = { path = "../../../../primitives" }
sp-core = { path = "../../../../../substrate/primitives/core" }
sp-maybe-compressed-blob = { path = "../../../../../substrate/primitives/maybe-compressed-blob" }
sp-tracing = { path = "../../../../../substrate/primitives/tracing" }
[features]
builder = []
@@ -8,7 +8,6 @@ license.workspace = true
[dependencies]
cfg-if = "1.0"
futures = "0.3.21"
gum = { package = "tracing-gum", path = "../../../gum" }
libc = "0.2.139"
rayon = "1.5.1"
@@ -17,15 +16,10 @@ tikv-jemalloc-ctl = { version = "0.5.0", optional = true }
parity-scale-codec = { version = "3.6.1", default-features = false, features = ["derive"] }
polkadot-node-core-pvf-common = { path = "../common" }
polkadot-parachain-primitives = { path = "../../../../parachain" }
polkadot-primitives = { path = "../../../../primitives" }
sc-executor = { path = "../../../../../substrate/client/executor" }
sc-executor-common = { path = "../../../../../substrate/client/executor/common" }
sc-executor-wasmtime = { path = "../../../../../substrate/client/executor/wasmtime" }
sp-io = { path = "../../../../../substrate/primitives/io" }
sp-maybe-compressed-blob = { path = "../../../../../substrate/primitives/maybe-compressed-blob" }
sp-tracing = { path = "../../../../../substrate/primitives/tracing" }
[target.'cfg(target_os = "linux")'.dependencies]
tikv-jemalloc-ctl = "0.5.0"
+1 -2
View File
@@ -9,6 +9,5 @@ description = "Stick logs together with the TraceID as provided by tempo"
[dependencies]
coarsetime = "0.1.22"
tracing = "0.1.35"
jaeger = { package = "polkadot-node-jaeger" , path = "../jaeger" }
gum-proc-macro = { package = "tracing-gum-proc-macro" , path = "proc-macro" }
gum-proc-macro = { package = "tracing-gum-proc-macro", path = "proc-macro" }
polkadot-primitives = { path = "../../primitives", features = ["std"] }
+17 -2
View File
@@ -105,8 +105,23 @@
pub use tracing::{enabled, event, Level};
#[doc(hidden)]
pub use jaeger::hash_to_trace_identifier;
// jaeger dependency
/// Alias for the 16 byte unique identifier used with jaeger.
pub(crate) type TraceIdentifier = u128;
/// A helper to convert the hash to the fixed size representation
/// needed for jaeger.
#[inline]
pub fn hash_to_trace_identifier(hash: Hash) -> TraceIdentifier {
let mut buf = [0u8; 16];
buf.copy_from_slice(&hash.as_ref()[0..16]);
// The slice bytes are copied in reading order, so if interpreted
// in string form by a human, that means lower indices have higher
// values and hence corresponds to BIG endian ordering of the individual
// bytes.
u128::from_be_bytes(buf) as TraceIdentifier
}
#[doc(hidden)]
pub use polkadot_primitives::{CandidateHash, Hash};