From a10bb7aa9810952781bb64d4c9453d008493a1a5 Mon Sep 17 00:00:00 2001 From: Jean SIMARD Date: Tue, 17 Dec 2024 16:21:01 +0100 Subject: [PATCH] editoast: make 'AxumOtelLayer' act as 'INFO' level By default, the 'AxumOtelLayer' only creates span at 'TRACE' level. That means that if you try `tracing::Span::current()` in a handler, you will get a `Span::none()` in response. This span is useless (it doesn't have a subscriber, no metadata): it can't be used with OpenTelemetry since all interactions between 'tracing' and 'opentelemetry' happens through `Span::with_subscriber()`. Signed-off-by: Jean SIMARD --- editoast/Cargo.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/editoast/Cargo.toml b/editoast/Cargo.toml index 5e201796d92..43151e89aaa 100644 --- a/editoast/Cargo.toml +++ b/editoast/Cargo.toml @@ -94,7 +94,9 @@ axum-extra = { version = "0.9.6", default-features = false, features = [ "typed-header", ] } axum-test = { version = "16.4.1", default-features = false } -axum-tracing-opentelemetry = { version = "0.24.1", default-features = false } +axum-tracing-opentelemetry = { version = "0.24.1", default-features = false, features = [ + "tracing_level_info", +] } chrono.workspace = true clap = { version = "4.5.23", features = ["derive", "env"] } colored = "2.2.0"