Update to latest actix-web.

This commit is contained in:
LukeMathWalker 2021-05-01 16:11:16 +01:00
parent bcb108a2fd
commit b83e354b16
3 changed files with 37 additions and 4 deletions

37
Cargo.lock generated
View file

@ -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"

View file

@ -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"

View file

@ -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())