Skip to content

Commit 2ae7a36

Browse files
committed
feat!: remove trace_id and span_id from logfmt (to avoid link with old version)
1 parent 39a6fce commit 2ae7a36

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

init-tracing-opentelemetry/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ opentelemetry_sdk = { workspace = true }
2929
thiserror = "1.0"
3030
tonic = { workspace = true, optional = true, features = ["tls"] }
3131
tracing = { workspace = true }
32-
tracing-logfmt-otel = { version = "0.2", optional = true }
32+
tracing-logfmt = { version = "0.3", optional = true }
3333
tracing-opentelemetry = { workspace = true }
3434
tracing-subscriber = { version = "0.3", default-features = false, features = [
3535
"ansi",
@@ -70,4 +70,4 @@ xray = ["dep:opentelemetry-aws"]
7070
zipkin = ["dep:opentelemetry-zipkin"]
7171
tracing_subscriber_ext = ["dep:tracing-subscriber", "otlp"]
7272
tls = ["tonic/tls", "opentelemetry-otlp/tls", "opentelemetry-otlp/tls-roots"]
73-
logfmt = ["dep:tracing-logfmt-otel"]
73+
logfmt = ["dep:tracing-logfmt"]

init-tracing-opentelemetry/src/tracing_subscriber_ext.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ pub fn build_logger_text<S>() -> Box<dyn Layer<S> + Send + Sync + 'static>
3838
where
3939
S: Subscriber + for<'a> LookupSpan<'a>,
4040
{
41-
Box::new(tracing_logfmt_otel::layer())
41+
//FIXME tracing_logfmt use an old version of crates, how to inject trace_id and span_id into log?
42+
Box::new(tracing_logfmt::layer())
4243
}
4344

4445
#[must_use]

0 commit comments

Comments
 (0)