Skip to content

Commit c0ad722

Browse files
committed
tracing: remove unused jaeger logic
1 parent 125ea77 commit c0ad722

File tree

6 files changed

+7
-244
lines changed

6 files changed

+7
-244
lines changed

Cargo.lock

+2-153
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/sui-types/Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ serde_with = "2.1.0"
2424
serde_repr = "0.1"
2525
signature = "1.6.0"
2626
static_assertions = "1.1.0"
27-
opentelemetry = { version = "0.17.0", features = ["rt-tokio"] }
2827
zeroize = "1.5.7"
2928
schemars ="0.8.10"
3029
tap = "1.0.1"

crates/sui-types/src/base_types.rs

-15
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@ use move_core_types::account_address::AccountAddress;
88
use move_core_types::ident_str;
99
use move_core_types::identifier::IdentStr;
1010
use move_core_types::language_storage::StructTag;
11-
use opentelemetry::{global, Context};
1211
use rand::Rng;
1312
use schemars::JsonSchema;
1413
use serde::{Deserialize, Serialize};
1514
use serde_with::serde_as;
1615
use serde_with::Bytes;
1716
use std::borrow::Borrow;
1817
use std::cmp::max;
19-
use std::collections::HashMap;
2018
use std::convert::{TryFrom, TryInto};
2119
use std::fmt;
2220
use std::str::FromStr;
@@ -488,19 +486,6 @@ impl AsRef<[u8]> for TransactionDigest {
488486
}
489487
}
490488

491-
/// Returns a Context for OpenTelemetry tracing from a TransactionDigest
492-
// NOTE: See https://github.com/MystenLabs/sui/issues/852
493-
// The current code doesn't really work. Maybe the traceparent needs to be a specific format,
494-
// prohably needs to be the propagated trace ID from the source.
495-
pub fn context_from_digest(digest: TransactionDigest) -> Context {
496-
// TODO: don't create a HashMap, that wastes memory and costs an allocation!
497-
let mut carrier = HashMap::new();
498-
// TODO: figure out exactly what key to use. I suspect it has to be the parent span ID in OpenTelemetry format.
499-
carrier.insert("traceparent".to_string(), Hex::encode(digest.0));
500-
501-
global::get_text_map_propagator(|propagator| propagator.extract(&carrier))
502-
}
503-
504489
impl Borrow<[u8]> for TransactionDigest {
505490
fn borrow(&self) -> &[u8] {
506491
&self.0

crates/telemetry-subscribers/Cargo.toml

+1-5
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,17 @@ publish = false
1212
console-subscriber = { version = "0.1.6", optional = true }
1313
crossterm = "0.25.0"
1414
once_cell = "1.13.0"
15-
opentelemetry = { version = "0.18.0", features = ["rt-tokio"], optional = true }
16-
opentelemetry-jaeger = { version = "0.17.0", features = ["rt-tokio"], optional = true }
1715
prometheus = "0.13.3"
1816
tokio = { workspace = true, features = ["sync", "macros", "rt", "rt-multi-thread"] }
1917
tracing = "0.1.37"
2018
tracing-appender = "0.2.2"
2119
tracing-bunyan-formatter = "0.3.3"
22-
tracing-opentelemetry = { version = "0.18.0", optional = true }
2320
tracing-subscriber = { version = "0.3.15", features = ["std", "time", "registry", "env-filter"] }
2421
workspace-hack = { version = "0.1", path = "../workspace-hack" }
2522

2623
[features]
27-
default = ["jaeger"]
24+
default = []
2825
tokio-console = ["console-subscriber"]
29-
jaeger = ["tracing-opentelemetry", "opentelemetry", "opentelemetry-jaeger"]
3026

3127
[dev-dependencies]
3228
camino = "1.0.9"

0 commit comments

Comments
 (0)