From 272ab8f85b7685a3ee320e9d71138af1e9e7849b Mon Sep 17 00:00:00 2001 From: Kate Goldenring Date: Thu, 9 May 2024 13:59:07 -0700 Subject: [PATCH] Add OTEL spans to SQS trigger Signed-off-by: Kate Goldenring --- Cargo.lock | 869 ++++++++++++++++++++++++++++++++++++++++++++--------- Cargo.toml | 8 +- README.md | 2 +- src/aws.rs | 3 +- src/lib.rs | 13 +- 5 files changed, 736 insertions(+), 159 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 779d49d..30f68cc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -76,6 +76,21 @@ version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9d4ee0d472d1cd2e28c97dfa124b3d8d992e10eb0a035f33f5d12e3a177ba3b" +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anyhow" version = "1.0.75" @@ -95,10 +110,23 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" dependencies = [ "concurrent-queue", - "event-listener", + "event-listener 2.5.3", "futures-core", ] +[[package]] +name = "async-channel" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "136d4d23bcc79e27423727b36823d86233aad06dfea531837b038394d11e9928" +dependencies = [ + "concurrent-queue", + "event-listener 5.2.0", + "event-listener-strategy 0.5.2", + "futures-core", + "pin-project-lite", +] + [[package]] name = "async-compression" version = "0.4.5" @@ -112,6 +140,74 @@ dependencies = [ "tokio", ] +[[package]] +name = "async-io" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" +dependencies = [ + "async-lock", + "cfg-if", + "concurrent-queue", + "futures-io", + "futures-lite 2.3.0", + "parking", + "polling", + "rustix 0.38.25", + "slab", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-lock" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" +dependencies = [ + "event-listener 4.0.3", + "event-listener-strategy 0.4.0", + "pin-project-lite", +] + +[[package]] +name = "async-process" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53fc6301894e04a92cb2584fedde80cb25ba8e02d9dc39d4a87d036e22f397d" +dependencies = [ + "async-channel 2.2.1", + "async-io", + "async-lock", + "async-signal", + "async-task", + "blocking", + "cfg-if", + "event-listener 5.2.0", + "futures-lite 2.3.0", + "rustix 0.38.25", + "tracing", + "windows-sys 0.52.0", +] + +[[package]] +name = "async-signal" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afe66191c335039c7bb78f99dc7520b0cbb166b3a1cb33a03f53d8a1c6f2afda" +dependencies = [ + "async-io", + "async-lock", + "atomic-waker", + "cfg-if", + "futures-core", + "futures-io", + "rustix 0.38.25", + "signal-hook-registry", + "slab", + "windows-sys 0.52.0", +] + [[package]] name = "async-stream" version = "0.3.5" @@ -134,6 +230,12 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "async-task" +version = "4.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de" + [[package]] name = "async-trait" version = "0.1.74" @@ -145,6 +247,12 @@ dependencies = [ "syn 2.0.39", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "atty" version = "0.2.14" @@ -452,6 +560,51 @@ dependencies = [ "zeroize", ] +[[package]] +name = "axum" +version = "0.6.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +dependencies = [ + "async-trait", + "axum-core", + "bitflags 1.3.2", + "bytes", + "futures-util", + "http 0.2.11", + "http-body 0.4.5", + "hyper 0.14.27", + "itoa", + "matchit", + "memchr", + "mime", + "percent-encoding", + "pin-project-lite", + "rustversion", + "serde", + "sync_wrapper", + "tower", + "tower-layer", + "tower-service", +] + +[[package]] +name = "axum-core" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +dependencies = [ + "async-trait", + "bytes", + "futures-util", + "http 0.2.11", + "http-body 0.4.5", + "mime", + "rustversion", + "tower-layer", + "tower-service", +] + [[package]] name = "azure_core" version = "0.11.0" @@ -469,7 +622,7 @@ dependencies = [ "paste", "pin-project", "rand 0.8.5", - "reqwest", + "reqwest 0.11.22", "rustc_version", "serde", "serde_json", @@ -478,6 +631,33 @@ dependencies = [ "uuid", ] +[[package]] +name = "azure_core" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34ce3de4b65b1ee2667c81d1fc692949049502a4cf9c38118d811d6d79a7eaef" +dependencies = [ + "async-trait", + "base64 0.22.1", + "bytes", + "dyn-clone", + "futures", + "getrandom 0.2.11", + "http-types", + "once_cell", + "paste", + "pin-project", + "rand 0.8.5", + "reqwest 0.12.4", + "rustc_version", + "serde", + "serde_json", + "time", + "tracing", + "url", + "uuid", +] + [[package]] name = "azure_data_cosmos" version = "0.11.0" @@ -485,7 +665,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73dede39a91e205b2050f250f6e31ed7c4c72be7ee694930c155c4d7636fe8e1" dependencies = [ "async-trait", - "azure_core", + "azure_core 0.11.0", "bytes", "futures", "hmac", @@ -499,6 +679,41 @@ dependencies = [ "uuid", ] +[[package]] +name = "azure_identity" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72c97790480791ec1ee9b76f5c6499b1d0aac0d4cd1e62010bfc19bb545544c5" +dependencies = [ + "async-lock", + "async-process", + "async-trait", + "azure_core 0.20.0", + "futures", + "oauth2", + "pin-project", + "serde", + "time", + "tracing", + "tz-rs", + "url", + "uuid", +] + +[[package]] +name = "azure_security_keyvault" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "338cac645bda0555f59189873be0cccaf420c26791f009b2207b62474cebbab8" +dependencies = [ + "async-trait", + "azure_core 0.20.0", + "futures", + "serde", + "serde_json", + "time", +] + [[package]] name = "backtrace" version = "0.3.69" @@ -526,6 +741,12 @@ version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + [[package]] name = "base64-simd" version = "0.7.0" @@ -591,6 +812,20 @@ dependencies = [ "generic-array", ] +[[package]] +name = "blocking" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "495f7104e962b7356f0aeb34247aca1fe7d2e783b346582db7f2904cb5717e88" +dependencies = [ + "async-channel 2.2.1", + "async-lock", + "async-task", + "futures-io", + "futures-lite 2.3.0", + "piper", +] + [[package]] name = "btoi" version = "0.4.3" @@ -676,7 +911,7 @@ dependencies = [ "indicatif", "log", "rand 0.8.5", - "reqwest", + "reqwest 0.11.22", "serde", "serde_json", "sha2", @@ -786,6 +1021,21 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", + "num-traits", + "serde", + "wasm-bindgen", + "windows-targets 0.52.4", +] + [[package]] name = "cipher" version = "0.4.4" @@ -890,6 +1140,12 @@ dependencies = [ "windows-sys 0.45.0", ] +[[package]] +name = "const_fn" +version = "0.4.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "373e9fafaa20882876db20562275ff58d50e0caa2590077fe7ce7bef90211d0d" + [[package]] name = "constant_time_eq" version = "0.1.5" @@ -932,18 +1188,18 @@ dependencies = [ [[package]] name = "cranelift-bforest" -version = "0.105.3" +version = "0.105.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d5521e2abca66bbb1ddeecbb6f6965c79160352ae1579b39f8c86183895c24" +checksum = "496c993b62bdfbe9b4c518b8b3e1fdba9f89ef89fcccc050ab61d91dfba9fbaf" dependencies = [ "cranelift-entity", ] [[package]] name = "cranelift-codegen" -version = "0.105.3" +version = "0.105.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef40a4338a47506e832ac3e53f7f1375bc59351f049a8379ff736dd02565bd95" +checksum = "96b922abb6be41fc383f5e9da65b58d32d0d0a32c87dfe3bbbcb61a09119506c" dependencies = [ "bumpalo", "cranelift-bforest", @@ -962,33 +1218,33 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.105.3" +version = "0.105.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24cd5d85985c070f73dfca07521d09086362d1590105ba44b0932bf33513b61" +checksum = "634c2ed9ef8a04ca42535a3e2e7917e4b551f2f306f4df2d935a6e71e346c167" dependencies = [ "cranelift-codegen-shared", ] [[package]] name = "cranelift-codegen-shared" -version = "0.105.3" +version = "0.105.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0584c4363e3aa0a3c7cb98a778fbd5326a3709f117849a727da081d4051726c" +checksum = "00cde1425b4da28bb0d5ff010030ea9cc9be7aded342ae099b394284f17cefce" [[package]] name = "cranelift-control" -version = "0.105.3" +version = "0.105.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f25ecede098c6553fdba362a8e4c9ecb8d40138363bff47f9712db75be7f0571" +checksum = "1622125c99f1864aaf44e57971770c4a918d081d4b4af0bb597bdf624660ed66" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.105.3" +version = "0.105.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea081a42f25dc4c5b248b87efdd87dcd3842a1050a37524ec5391e6172058cb" +checksum = "ea97887aca1c0cbe7f8513874dc3603e9744fb1cfa78840ca8897bd2766bd35b" dependencies = [ "serde", "serde_derive", @@ -996,9 +1252,9 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.105.3" +version = "0.105.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9796e712f5af797e247784f7518e6b0a83a8907d73d51526982d86ecb3a58b68" +checksum = "4cdade4c14183fe41482071ed77d6a38cb95a17c7a0a05e629152e6292c4f8cb" dependencies = [ "cranelift-codegen", "log", @@ -1008,15 +1264,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.105.3" +version = "0.105.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a66ccad5782f15c80e9dd5af0df4acfe6e3eee98e8f7354a2e5c8ec3104bdd" +checksum = "dbbe4d3ad7bd4bf4a8d916c8460b441cf92417f5cdeacce4dd1d96eee70b18a2" [[package]] name = "cranelift-native" -version = "0.105.3" +version = "0.105.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "285e80df1d9b79ded9775b285df68b920a277b84f88a7228d2f5bc31fcdc58eb" +checksum = "c46be4ed1fc8f36df4e2a442b8c30a39d8c03c1868182978f4c04ba2c25c9d4f" dependencies = [ "cranelift-codegen", "libc", @@ -1025,9 +1281,9 @@ dependencies = [ [[package]] name = "cranelift-wasm" -version = "0.105.3" +version = "0.105.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4135b0ab01fd16aa8f8821196e9e2fe15953552ccaef8ba5153be0ced04ef757" +checksum = "a1d4c4a785a7866da89d20df159e3c4f96a5f14feb83b1f5998cfd5fe2e74d06" dependencies = [ "cranelift-codegen", "cranelift-entity", @@ -1397,6 +1653,48 @@ version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" +[[package]] +name = "event-listener" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" +dependencies = [ + "concurrent-queue", + "parking", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" +dependencies = [ + "event-listener 4.0.3", + "pin-project-lite", +] + +[[package]] +name = "event-listener-strategy" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" +dependencies = [ + "event-listener 5.2.0", + "pin-project-lite", +] + [[package]] name = "fallible-iterator" version = "0.2.0" @@ -1594,6 +1892,19 @@ dependencies = [ "waker-fn", ] +[[package]] +name = "futures-lite" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" +dependencies = [ + "fastrand 2.0.1", + "futures-core", + "futures-io", + "parking", + "pin-project-lite", +] + [[package]] name = "futures-macro" version = "0.3.29" @@ -1728,9 +2039,9 @@ checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" -version = "0.3.22" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ "bytes", "fnv", @@ -1907,9 +2218,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e9b187a72d63adbfba487f48095306ac823049cb504ee195541e91c7775f5ad" dependencies = [ "anyhow", - "async-channel", + "async-channel 1.9.0", "base64 0.13.1", - "futures-lite", + "futures-lite 1.13.0", "infer", "pin-project-lite", "rand 0.7.3", @@ -1942,7 +2253,7 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2 0.3.22", + "h2 0.3.26", "http 0.2.11", "http-body 0.4.5", "httparse", @@ -2025,6 +2336,18 @@ dependencies = [ "webpki-roots 0.26.1", ] +[[package]] +name = "hyper-timeout" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" +dependencies = [ + "hyper 0.14.27", + "pin-project-lite", + "tokio", + "tokio-io-timeout", +] + [[package]] name = "hyper-tls" version = "0.5.0" @@ -2038,6 +2361,65 @@ dependencies = [ "tokio-native-tls", ] +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper 1.2.0", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "hyper 1.2.0", + "pin-project-lite", + "socket2 0.5.5", + "tokio", + "tower", + "tower-service", + "tracing", +] + +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + [[package]] name = "id-arena" version = "2.2.1" @@ -2532,6 +2914,12 @@ dependencies = [ "regex-automata 0.1.10", ] +[[package]] +name = "matchit" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" + [[package]] name = "maybe-owned" version = "0.3.4" @@ -2816,6 +3204,25 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" +[[package]] +name = "oauth2" +version = "4.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c38841cdd844847e3e7c8d29cef9dcfed8877f8f56f9071f77843ecf3baf937f" +dependencies = [ + "base64 0.13.1", + "chrono", + "getrandom 0.2.11", + "http 0.2.11", + "rand 0.8.5", + "serde", + "serde_json", + "serde_path_to_error", + "sha2", + "thiserror", + "url", +] + [[package]] name = "object" version = "0.32.1" @@ -2925,7 +3332,7 @@ dependencies = [ "bytes", "http 0.2.11", "opentelemetry", - "reqwest", + "reqwest 0.11.22", ] [[package]] @@ -2943,8 +3350,10 @@ dependencies = [ "opentelemetry-semantic-conventions", "opentelemetry_sdk", "prost", - "reqwest", + "reqwest 0.11.22", "thiserror", + "tokio", + "tonic", ] [[package]] @@ -3035,17 +3444,18 @@ dependencies = [ [[package]] name = "outbound-http" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "http 0.2.11", - "reqwest", + "reqwest 0.11.22", "spin-app", "spin-core", "spin-expressions", "spin-locked-app", "spin-outbound-networking", + "spin-telemetry", "spin-world", "terminal", "tracing", @@ -3054,8 +3464,8 @@ dependencies = [ [[package]] name = "outbound-mqtt" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "rumqttc", @@ -3071,8 +3481,8 @@ dependencies = [ [[package]] name = "outbound-mysql" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "flate2", @@ -3091,8 +3501,8 @@ dependencies = [ [[package]] name = "outbound-pg" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "native-tls", @@ -3110,8 +3520,8 @@ dependencies = [ [[package]] name = "outbound-redis" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "redis", @@ -3312,12 +3722,37 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "piper" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" +dependencies = [ + "atomic-waker", + "fastrand 2.0.1", + "futures-io", +] + [[package]] name = "pkg-config" version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" +[[package]] +name = "polling" +version = "3.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30054e72317ab98eddd8561db0f6524df3367636884b7b21b703e4b280a84a14" +dependencies = [ + "cfg-if", + "concurrent-queue", + "pin-project-lite", + "rustix 0.38.25", + "tracing", + "windows-sys 0.52.0", +] + [[package]] name = "postgres-native-tls" version = "0.5.0" @@ -3674,12 +4109,12 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2 0.3.22", + "h2 0.3.26", "http 0.2.11", "http-body 0.4.5", "hyper 0.14.27", "hyper-rustls 0.24.2", - "hyper-tls", + "hyper-tls 0.5.0", "ipnet", "js-sys", "log", @@ -3702,10 +4137,51 @@ dependencies = [ "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", + "wasm-streams 0.3.0", "web-sys", "webpki-roots 0.25.2", - "winreg", + "winreg 0.50.0", +] + +[[package]] +name = "reqwest" +version = "0.12.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "566cafdd92868e0939d3fb961bd0dc25fcfaaed179291093b3d43e6b3150ea10" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.2.0", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.1.1", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "tokio", + "tokio-native-tls", + "tokio-util 0.7.10", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams 0.4.0", + "web-sys", + "winreg 0.52.0", ] [[package]] @@ -3801,7 +4277,7 @@ dependencies = [ "async-trait", "bytes", "http 0.2.11", - "reqwest", + "reqwest 0.11.22", "rustify_derive", "serde", "serde_json", @@ -3963,6 +4439,12 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "rustversion" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "092474d1a01ea8278f69e6a358998405fae5b8b963ddaeb2b0b04a128bf1dfb0" + [[package]] name = "ryu" version = "1.0.15" @@ -4088,6 +4570,16 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_path_to_error" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4beec8bce849d58d06238cb50db2e1c417cfeafa4c63f692b15c82b7c80f8335" +dependencies = [ + "itoa", + "serde", +] + [[package]] name = "serde_qs" version = "0.8.5" @@ -4281,8 +4773,8 @@ dependencies = [ [[package]] name = "spin-app" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "async-trait", @@ -4297,8 +4789,8 @@ dependencies = [ [[package]] name = "spin-common" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "dirs 4.0.0", @@ -4310,8 +4802,8 @@ dependencies = [ [[package]] name = "spin-componentize" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "wasm-encoder 0.200.0", @@ -4322,8 +4814,8 @@ dependencies = [ [[package]] name = "spin-core" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "async-trait", @@ -4345,8 +4837,8 @@ dependencies = [ [[package]] name = "spin-expressions" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "async-trait", @@ -4359,8 +4851,8 @@ dependencies = [ [[package]] name = "spin-key-value" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "lru 0.9.0", @@ -4374,8 +4866,8 @@ dependencies = [ [[package]] name = "spin-key-value-azure" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "azure_data_cosmos", @@ -4384,13 +4876,14 @@ dependencies = [ "spin-core", "spin-key-value", "tokio", + "tracing", "url", ] [[package]] name = "spin-key-value-redis" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "redis", @@ -4398,13 +4891,14 @@ dependencies = [ "spin-key-value", "spin-world", "tokio", + "tracing", "url", ] [[package]] name = "spin-key-value-sqlite" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "once_cell", @@ -4413,12 +4907,13 @@ dependencies = [ "spin-key-value", "spin-world", "tokio", + "tracing", ] [[package]] name = "spin-llm" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "bytesize", @@ -4430,13 +4925,13 @@ dependencies = [ [[package]] name = "spin-llm-remote-http" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "http 0.2.11", "llm", - "reqwest", + "reqwest 0.11.22", "serde", "serde_json", "spin-core", @@ -4448,8 +4943,8 @@ dependencies = [ [[package]] name = "spin-loader" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "async-trait", @@ -4464,7 +4959,7 @@ dependencies = [ "outbound-http", "path-absolutize", "regex", - "reqwest", + "reqwest 0.11.22", "semver", "serde", "serde_json", @@ -4486,8 +4981,8 @@ dependencies = [ [[package]] name = "spin-locked-app" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "async-trait", @@ -4500,8 +4995,8 @@ dependencies = [ [[package]] name = "spin-manifest" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "indexmap 1.9.3", @@ -4515,8 +5010,8 @@ dependencies = [ [[package]] name = "spin-outbound-networking" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "http 1.1.0", @@ -4530,8 +5025,8 @@ dependencies = [ [[package]] name = "spin-serde" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "base64 0.21.5", "serde", @@ -4539,8 +5034,8 @@ dependencies = [ [[package]] name = "spin-sqlite" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "async-trait", @@ -4549,12 +5044,13 @@ dependencies = [ "spin-world", "table", "tokio", + "tracing", ] [[package]] name = "spin-sqlite-inproc" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "async-trait", @@ -4564,12 +5060,13 @@ dependencies = [ "spin-sqlite", "spin-world", "tokio", + "tracing", ] [[package]] name = "spin-sqlite-libsql" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "async-trait", @@ -4579,12 +5076,13 @@ dependencies = [ "spin-world", "sqlparser", "tokio", + "tracing", ] [[package]] name = "spin-telemetry" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "http 0.2.11", @@ -4593,6 +5091,7 @@ dependencies = [ "opentelemetry-otlp", "opentelemetry-semantic-conventions", "opentelemetry_sdk", + "terminal", "tracing", "tracing-appender", "tracing-opentelemetry", @@ -4602,8 +5101,8 @@ dependencies = [ [[package]] name = "spin-trigger" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "async-trait", @@ -4652,11 +5151,14 @@ dependencies = [ [[package]] name = "spin-variables" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "anyhow", "async-trait", + "azure_core 0.20.0", + "azure_identity", + "azure_security_keyvault", "dotenvy", "once_cell", "serde", @@ -4666,13 +5168,14 @@ dependencies = [ "spin-world", "thiserror", "tokio", + "tracing", "vaultrs", ] [[package]] name = "spin-world" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "wasmtime", ] @@ -4771,6 +5274,12 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "synstructure" version = "0.12.6" @@ -4822,8 +5331,8 @@ dependencies = [ [[package]] name = "table" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" [[package]] name = "tar" @@ -4866,8 +5375,8 @@ dependencies = [ [[package]] name = "terminal" -version = "2.4.3" -source = "git+https://github.com/fermyon/spin?tag=v2.4.3#ed8a665fb92e23402f8c321573d353b84f8c29aa" +version = "2.5.0" +source = "git+https://github.com/fermyon/spin?tag=v2.5.0#83eb68d49d32f1ebf6890e892c4c952af4b3df04" dependencies = [ "atty", "once_cell", @@ -4918,6 +5427,7 @@ checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" dependencies = [ "deranged", "itoa", + "js-sys", "libc", "num_threads", "powerfmt", @@ -4980,7 +5490,7 @@ dependencies = [ "rayon-cond", "regex", "regex-syntax 0.7.5", - "reqwest", + "reqwest 0.11.22", "serde", "serde_json", "spm_precompiled", @@ -5009,6 +5519,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "tokio-io-timeout" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" +dependencies = [ + "pin-project-lite", + "tokio", +] + [[package]] name = "tokio-macros" version = "2.2.0" @@ -5187,16 +5707,22 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76c4eb7a4e9ef9d4763600161f12f5070b92a578e1b634db88a6887844c91a13" dependencies = [ + "async-stream", "async-trait", + "axum", "base64 0.21.5", "bytes", + "h2 0.3.26", "http 0.2.11", "http-body 0.4.5", + "hyper 0.14.27", + "hyper-timeout", "percent-encoding", "pin-project", "prost", "tokio", "tokio-stream", + "tower", "tower-layer", "tower-service", "tracing", @@ -5210,9 +5736,13 @@ checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ "futures-core", "futures-util", + "indexmap 1.9.3", "pin-project", "pin-project-lite", + "rand 0.8.5", + "slab", "tokio", + "tokio-util 0.7.10", "tower-layer", "tower-service", "tracing", @@ -5379,6 +5909,15 @@ version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "tz-rs" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33851b15c848fad2cf4b105c6bb66eb9512b6f6c44a4b13f57c53c73c707e2b4" +dependencies = [ + "const_fn", +] + [[package]] name = "uncased" version = "0.9.10" @@ -5506,7 +6045,7 @@ dependencies = [ "bytes", "derive_builder 0.11.2", "http 0.2.11", - "reqwest", + "reqwest 0.11.22", "rustify", "rustify_derive", "serde", @@ -5567,9 +6106,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi-common" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95e022c29ad56af4cc0a8a8f0e0191abf9e0a0c4a68d25dfe088c39c9a8e3d2c" +checksum = "5ce5d3e7e6f0fabe518a9bea9c803081544ef38d986f04d7f86737faed32d2ae" dependencies = [ "anyhow", "bitflags 2.4.1", @@ -5714,6 +6253,19 @@ dependencies = [ "web-sys", ] +[[package]] +name = "wasm-streams" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wasmparser" version = "0.121.2" @@ -5748,9 +6300,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8106d7d22d63d1bcb940e22dcc7b03e46f0fc8bfbaf2fd7b6cb8f448f9449774" +checksum = "69472708b96ee90579a482bdbb908ce97e53a9e5ebbcab59cc29c3977bcab512" dependencies = [ "addr2line", "anyhow", @@ -5792,18 +6344,18 @@ dependencies = [ [[package]] name = "wasmtime-asm-macros" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b0cf02cea951ace34ee3b0e64b7f446c3519d1c95ad75bc5330f405e275ee8f" +checksum = "86292d6a9bf30c669582a40c4a4b8e0b8640e951f3635ee8e0acf7f87809961e" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-cache" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3249204a71d728d53fb3eea18afd0473f87e520445707a4d567ac4da0bb3eb5d" +checksum = "8a180017db1233c902b992fea9484640d265f2fedf03db60eed57894cb2effcc" dependencies = [ "anyhow", "base64 0.21.5", @@ -5821,9 +6373,9 @@ dependencies = [ [[package]] name = "wasmtime-component-macro" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3786c0531565ec6c9852c0e46299f06cb6e4b58d36e30f3c234cfa69bde376" +checksum = "dc6aca484581f9651886dca45f9dea893e105713b58623d14b06c56d8fe3f3f1" dependencies = [ "anyhow", "proc-macro2", @@ -5836,15 +6388,15 @@ dependencies = [ [[package]] name = "wasmtime-component-util" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81eae2ec98027ee0b3950da83bc320120a23087ac4d39b3d59201cb5ebf52777" +checksum = "0aa907cc97ad039c43f98525d772f4841c2ce69a0c11eeec2a3a9c77fc730e87" [[package]] name = "wasmtime-cranelift" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595abdb067acdc812ab0f21d8d46d5aa4022392aa7c3e0632c20bff9ec49ffb4" +checksum = "b57d58e220ae223855c5d030ef20753377bc716d0c81b34c1fe74c9f44268774" dependencies = [ "anyhow", "cfg-if", @@ -5867,9 +6419,9 @@ dependencies = [ [[package]] name = "wasmtime-cranelift-shared" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c24c1fdea167b992d82ebe76471fd1cbe7b0b406bc72f9250f86353000134e" +checksum = "1ba2cfdfdbde42f0f3baeddb62f3555524dee9f836c96da8d466e299f75f5eee" dependencies = [ "anyhow", "cranelift-codegen", @@ -5883,9 +6435,9 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3279d510005358141550d8a90a5fc989d7e81748e5759d582fe6bfdcbf074a04" +checksum = "abbf3075d9ee7eb1263dc67949aced64d0f0bf27be8098d34d8e5826cf0ff0f2" dependencies = [ "anyhow", "bincode", @@ -5909,9 +6461,9 @@ dependencies = [ [[package]] name = "wasmtime-fiber" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b1df665f2117741d1265f5663b0d93068b18120c2c4b18b9faed49d00d92c31" +checksum = "3174f71c8fbd9d2cb1233ad9f912f106bdd2a1a6d11a1b7707974ba3ad5f304a" dependencies = [ "anyhow", "cc", @@ -5924,9 +6476,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-debug" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63f307739370736e5b0cd2b45910ff96bcda6d5d68b2c4384bcedb0af4f3b321" +checksum = "4b0462a46b80d2352ee553b17d626b6468e9cec2220cc58ac31754fd7b58245e" dependencies = [ "object", "once_cell", @@ -5936,9 +6488,9 @@ dependencies = [ [[package]] name = "wasmtime-jit-icache-coherence" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "866634605089b4632b32226b54aa3670d72e1849f9fc425c7e50b3749c2e6df3" +checksum = "dacd2aa30fb20fd8cd0eb4e664024a1ab28a02958529fa05bf52117532a098fc" dependencies = [ "cfg-if", "libc", @@ -5947,9 +6499,9 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11185c88cadf595d228f5ae4ff9b4badbf9ca98dcb37b0310c36e31fa74867f" +checksum = "d14e97c4bb36d91bcdd194745446d595e67ce8b89916806270fdbee640c747fd" dependencies = [ "anyhow", "cc", @@ -5977,9 +6529,9 @@ dependencies = [ [[package]] name = "wasmtime-types" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32377cbd827bee06fcb2f6bf97b0477fdcc86888bbe6db7b9cab8e644082e0a" +checksum = "530b94c627a454d24f520173d3145112d1b807c44c82697a57e1d8e28390cde4" dependencies = [ "cranelift-entity", "serde", @@ -5990,9 +6542,9 @@ dependencies = [ [[package]] name = "wasmtime-versioned-export-macros" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ab8d7566d206c42f8cf1d4ac90c5e40d3582e8eabad9b3b67e9e73c61fc47a1" +checksum = "5399c175ddba4a471b9da45105dea3493059d52b2d54860eadb0df04c813948d" dependencies = [ "proc-macro2", "quote", @@ -6001,9 +6553,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca912bda309188bd25ab7652c6654b34aacdf43047c716ee1cb685a28079078" +checksum = "aa0c9371a5270bc5e043f4eff80c572bc35585ab68d0a218d0ec3d3225085347" dependencies = [ "anyhow", "async-trait", @@ -6034,9 +6586,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi-http" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dbe5ffc98df206cdd791af8d3048d5e5d12376c995cb1e7348ad77023235264" +checksum = "b87c2a334ceb4a9b4899bc5661e0be5f1f800d76a700044cae5d5397ad5c9717" dependencies = [ "anyhow", "async-trait", @@ -6057,9 +6609,9 @@ dependencies = [ [[package]] name = "wasmtime-winch" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba5a97bfccc241d1769cef75eb16f472a893982704d5f3c9c71c431c1484344a" +checksum = "729dff119cfd2e2333504b52db6661e49278314c83276a01d15a2a86e566e614" dependencies = [ "anyhow", "cranelift-codegen", @@ -6074,9 +6626,9 @@ dependencies = [ [[package]] name = "wasmtime-wit-bindgen" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf2c76781a27e07802669f6f0e11eb4441546407eb65be60c3d862200988b92" +checksum = "6945fc6cfee04ba81016e9723bea77a2b913108e03904a4d901daedf208365f5" dependencies = [ "anyhow", "heck", @@ -6086,9 +6638,9 @@ dependencies = [ [[package]] name = "wasmtime-wmemcheck" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3847d969bd203b8cd239f89581e52432a0f00b8c5c9bc917be2fccd7542c4f2f" +checksum = "e1711f429111e782fac0537e0b3eb2ab6f821613cf1ec3013f2a0ff3fde41745" [[package]] name = "wast" @@ -6187,9 +6739,9 @@ dependencies = [ [[package]] name = "wiggle" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a7ecd6e1ffba1278cfd24a001a13da11d86801e0ad9342f11a370ce0df50e14" +checksum = "186f82e079c09d2b7215ecaeacc97cac09631522016ba500ccc788749e882439" dependencies = [ "anyhow", "async-trait", @@ -6202,9 +6754,9 @@ dependencies = [ [[package]] name = "wiggle-generate" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c5490497a35d67040d4f2fd2491fbcad6dd225c5bd24681c2cd52a2f40a55ce" +checksum = "def372d639555c826c4f287a7bdde673da127ecb95a3cd5453d53d8f3c0c07e4" dependencies = [ "anyhow", "heck", @@ -6217,9 +6769,9 @@ dependencies = [ [[package]] name = "wiggle-macro" -version = "18.0.3" +version = "18.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83f31d1c1a0d87842f1a2bf40bd230e25ba790c450f0d0ddb84524fd6955958" +checksum = "93e43fc332703d1ec3aa86a5ce8bb49e6b95b6c617b90e726d3e70a0f70f48a5" dependencies = [ "proc-macro2", "quote", @@ -6260,9 +6812,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "winch-codegen" -version = "0.16.3" +version = "0.16.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0bd4d6cac8d69525d475d0ce1e0801eb6f314d42e764a52bd497ed3cb9c371" +checksum = "433cafb378ad01cd839974846204f56257ec34fc9d7db309ce1e34f24923fa6a" dependencies = [ "anyhow", "cranelift-codegen", @@ -6274,6 +6826,15 @@ dependencies = [ "wasmtime-environ", ] +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.4", +] + [[package]] name = "windows-sys" version = "0.45.0" @@ -6491,6 +7052,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "winreg" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a277a57398d4bfa075df44f501a17cfdf8542d224f0d36095a2adc7aee4ef0a5" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + [[package]] name = "winx" version = "0.36.2" diff --git a/Cargo.toml b/Cargo.toml index 226b6a0..1bf7807 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,13 +12,13 @@ aws-sdk-sqs = "0.22.0" clap = { version = "3.1.15", features = ["derive", "env"] } futures = "0.3.25" serde = "1.0" -spin-core = { git = "https://github.com/fermyon/spin", tag = "v2.4.3" } -spin-telemetry = { git = "https://github.com/fermyon/spin", tag = "v2.4.3" } -spin-trigger = { git = "https://github.com/fermyon/spin", tag = "v2.4.3" } +spin-core = { git = "https://github.com/fermyon/spin", tag = "v2.5.0" } +spin-telemetry = { git = "https://github.com/fermyon/spin", tag = "v2.5.0" } +spin-trigger = { git = "https://github.com/fermyon/spin", tag = "v2.5.0" } tokio = { version = "1.37", features = ["full"] } tokio-scoped = "0.2.0" tracing = { version = "0.1", features = ["log"] } -wasmtime = { version = "18.0.1" } +wasmtime = { version = "18.0.4" } [target.'cfg(target_os = "linux")'.dependencies] # This needs to be an explicit dependency to enable diff --git a/README.md b/README.md index 28861f0..5a37fb0 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ Custom triggers, such as this one, can be run in the Spin command line, but cann ## Configuration -The SQS trigger uses the AWS credentials from the standard AWS configuration environment variables. These variables must be set before you run `spin up`. The credentials must grant access to all queues that the application wants to monitor. The credentials must allow for reading messages and deleting read messages. +The SQS trigger uses the AWS credentials from the standard AWS configuration environment variables (`AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_SESSION_TOKEN`) and requires the SQS queue region to be set in `AWS_REGION`. These variables must be set before you run `spin up`. The credentials must grant access to all queues that the application wants to monitor. The credentials must allow for reading messages and deleting read messages. The trigger assumes that the monitored queues exist: it does not create them. diff --git a/src/aws.rs b/src/aws.rs index 799a684..57b7d42 100644 --- a/src/aws.rs +++ b/src/aws.rs @@ -3,6 +3,7 @@ pub use aws_sdk_sqs::model::Message; pub use aws_sdk_sqs::model::MessageAttributeValue; pub use aws_sdk_sqs::model::MessageSystemAttributeName; pub use aws_sdk_sqs::model::QueueAttributeName; +use tracing::Instrument; use crate::utils::MessageUtils; @@ -58,7 +59,7 @@ pub fn hold_message_lease(client: &Client, queue_url: &str, m: &Message, timeout tracing::error!("Message {msg_id}: failed to update lease: {}", e.to_string()); } } - }); + }.in_current_span()); Some(join_handle) } else { diff --git a/src/lib.rs b/src/lib.rs index 5e291fc..f54925e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -9,6 +9,7 @@ use spin_core::InstancePre; mod aws; mod utils; +use tracing::{instrument, Instrument, Level}; use utils::MessageUtils; wasmtime::component::bindgen!({ @@ -125,7 +126,7 @@ impl TriggerExecutor for SqsTrigger { impl SqsTrigger { fn start_receive_loop(engine: Arc>, client: &aws::Client, component: &Component) -> tokio::task::JoinHandle { let future = Self::receive(engine, client.clone(), component.clone()); - tokio::task::spawn(future) + tokio::task::spawn(future.in_current_span()) } // This doesn't return a Result because we don't want a thoughtless `?` to exit the loop @@ -162,7 +163,7 @@ impl SqsTrigger { let processor = SqsMessageProcessor::new(&engine, &client, &component, queue_timeout_secs); tokio::spawn(async move { processor.process_message(msg).await - }); + }.in_current_span()); } } else { tracing::trace!("Queue {}: no messages received", component.queue_url); @@ -193,7 +194,7 @@ impl SqsMessageProcessor { queue_timeout_secs } } - + #[instrument(name = "spin_trigger_sqs.process_message", skip_all, fields(otel.name = format!("{} receive", queue_name_from_url(&self.component.queue_url)), messaging.message.id = msg.display_id()))] async fn process_message(&self, msg: aws::Message) { let msg_id = msg.display_id(); tracing::trace!("Message {msg_id}: spawned processing task"); @@ -235,7 +236,7 @@ impl SqsMessageProcessor { } } } - + #[instrument(name = "spin_trigger_sqs.execute_wasm", skip_all, err(level = Level::INFO), fields(otel.name = format!("execute_wasm_component {}", self.component.id)))] async fn execute_wasm(&self, message: sqs::Message) -> Result { let msg_id = message.display_id(); let component_id = &self.component.id; @@ -317,3 +318,7 @@ fn wit_value(v: &aws::MessageAttributeValue) -> Result &str { + url.rsplit('/').next().unwrap_or(url) +} \ No newline at end of file