From b83e354b16dad1bed6a287a297e4b849a3e86449 Mon Sep 17 00:00:00 2001 From: LukeMathWalker Date: Sat, 1 May 2021 16:11:16 +0100 Subject: [PATCH] Update to latest actix-web. --- Cargo.lock | 37 +++++++++++++++++++++++++++++++++++-- Cargo.toml | 2 +- src/startup.rs | 2 +- 3 files changed, 37 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f6ef21f..112e1fc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1383,6 +1383,22 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "opentelemetry" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91cea1dfd50064e52db033179952d18c770cbc5dfefc8eba45d619357ba3914" +dependencies = [ + "async-trait", + "futures", + "js-sys", + "lazy_static", + "percent-encoding", + "pin-project", + "rand 0.8.3", + "thiserror", +] + [[package]] name = "parking" version = "2.0.0" @@ -2361,14 +2377,18 @@ dependencies = [ [[package]] name = "tracing-actix-web" -version = "0.3.0-beta.3" +version = "0.4.0-beta.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f61ca5db1113b7b2ad09585d24d1143e940465596ba434ba19d506ee2ab28a1" +checksum = "d232c700ac99b41f56aac3832f138009b2dc7538cbdc76fdc6b8304a1ee2d2e0" dependencies = [ + "actix-http", + "actix-service", "actix-web", "futures", + "opentelemetry", "tracing", "tracing-futures", + "tracing-opentelemetry", "uuid", ] @@ -2430,6 +2450,19 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-opentelemetry" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99003208b647dae59dcefc49c98aecaa3512fbc29351685d4b9ef23a9218458e" +dependencies = [ + "opentelemetry", + "tracing", + "tracing-core", + "tracing-log", + "tracing-subscriber", +] + [[package]] name = "tracing-serde" version = "0.1.2" diff --git a/Cargo.toml b/Cargo.toml index e0e196d..c82d906 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,10 +28,10 @@ tracing-futures = "0.2.4" tracing-subscriber = { version = "0.2.12", features = ["registry", "env-filter"] } tracing-bunyan-formatter = "0.1.6" tracing-log = "0.1.1" -tracing-actix-web = "0.3.0-beta.2" serde-aux = "1.0.1" unicode-segmentation = "1.7.1" validator = "0.12.0" +tracing-actix-web = "0.4.0-beta.4" [dev-dependencies] claim = "0.4.0" diff --git a/src/startup.rs b/src/startup.rs index 4cd7c2c..bc019eb 100644 --- a/src/startup.rs +++ b/src/startup.rs @@ -16,7 +16,7 @@ pub fn run( let email_client = Data::new(email_client); let server = HttpServer::new(move || { App::new() - .wrap(TracingLogger) + .wrap(TracingLogger::default()) .route("/health_check", web::get().to(health_check)) .route("/subscriptions", web::post().to(subscribe)) .app_data(db_pool.clone())