From 6a622b5ff34144bd9a273f45897c290ae820ec9b Mon Sep 17 00:00:00 2001 From: Mason Gup Date: Thu, 5 Feb 2026 14:24:57 -0500 Subject: [PATCH 1/2] Add support for OpenTelemetry crate version 0.31 --- Cargo.toml | 13 +++++++------ src/config.rs | 9 +++++---- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ee400b8..0d8a749 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mauth-client" -version = "0.7.0" +version = "0.7.1" authors = ["Mason Gup "] edition = "2024" rust-version = "1.88" @@ -14,16 +14,16 @@ keywords = ["security", "authentication", "web"] categories = ["authentication", "web-programming"] [dependencies] -reqwest = { version = "0.12", features = ["json"] } -reqwest-middleware = "0.4" -reqwest-tracing = { version = "0.5.8", optional = true } +reqwest = { version = "0.13", features = ["json"] } +reqwest-middleware = "0.5" +reqwest-tracing = { version = "0.7.0", optional = true } async-trait = ">= 0.1.83" url = "2" serde = { version = "1", features = ["derive"] } serde_json = "1" serde_yml = ">= 0.0.10" uuid = { version = "1", features = ["v4"] } -dirs = "5" +dirs = "6" chrono = "0.4" tokio = { version = "1", features = ["fs"] } tower = { version = ">= 0.4", optional = true } @@ -31,7 +31,7 @@ axum = { version = ">= 0.8", optional = true } futures-core = { version = "0.3", optional = true } http = "1" bytes = { version = "1", optional = true } -thiserror = "1" +thiserror = "2" mauth-core = "0.6" tracing = { version = "0.1", optional = true } @@ -45,3 +45,4 @@ tracing-otel-27 = ["reqwest-tracing/opentelemetry_0_27"] tracing-otel-28 = ["reqwest-tracing/opentelemetry_0_28"] tracing-otel-29 = ["reqwest-tracing/opentelemetry_0_29"] tracing-otel-30 = ["reqwest-tracing/opentelemetry_0_30"] +tracing-otel-31 = ["reqwest-tracing/opentelemetry_0_31"] diff --git a/src/config.rs b/src/config.rs index 55e24c0..7a4fbd4 100644 --- a/src/config.rs +++ b/src/config.rs @@ -43,10 +43,10 @@ impl MAuthInfo { .parse()?; let mut pk_data = section.private_key_data.clone(); - if pk_data.is_none() && section.private_key_file.is_some() { - pk_data = Some(std::fs::read_to_string( - section.private_key_file.as_ref().unwrap(), - )?); + if pk_data.is_none() + && let Some(pk_file_path) = section.private_key_file.as_ref() + { + pk_data = Some(std::fs::read_to_string(pk_file_path)?); } if pk_data.is_none() { return Err(ConfigReadError::NoPrivateKey); @@ -68,6 +68,7 @@ impl MAuthInfo { feature = "tracing-otel-28", feature = "tracing-otel-29", feature = "tracing-otel-30", + feature = "tracing-otel-31", ))] let builder = builder.with(reqwest_tracing::TracingMiddleware::default()); builder.build() From 55638b6896212fc0148c3a371d4f51f4d36e4021 Mon Sep 17 00:00:00 2001 From: Mason Gup Date: Thu, 5 Feb 2026 14:26:26 -0500 Subject: [PATCH 2/2] Update readme too --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ff6e6e2..7fbee77 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,7 @@ implements Axum's `OptionalFromRequestParts`, so you can more easily retrieve it ### OpenTelemetry Integration -There are also optional features `tracing-otel-26` through `tracing-otel-30` +There are also optional features `tracing-otel-26` through `tracing-otel-31` that pair with the `axum-service` feature to ensure that any outgoing requests for credentials that take place in the context of an incoming web request also include the proper OpenTelemetry span information in any requests to MAudit services. Note that it is critical to use the same