From 6b251f88dc69ee734b3b0efbdda2be021323b10f Mon Sep 17 00:00:00 2001 From: Chris Smith <1979423+chris13524@users.noreply.github.com> Date: Thu, 25 Apr 2024 21:08:33 -0400 Subject: [PATCH] chore: upgrade deps (#77) --- .github/workflows/dispatch_deploy.yml | 2 +- .github/workflows/dispatch_publish.yml | 5 +- .github/workflows/dispatch_validate.yml | 3 +- .github/workflows/event_pr.yml | 3 +- .github/workflows/event_release.yml | 2 +- .github/workflows/sub-cd.yml | 4 +- Cargo.lock | 1089 +++++++++++++++++------ Cargo.toml | 21 +- deny.toml | 4 +- src/event_sink/s3.rs | 205 ++++- src/http_server/mod.rs | 44 +- src/main.rs | 12 +- 12 files changed, 1058 insertions(+), 336 deletions(-) diff --git a/.github/workflows/dispatch_deploy.yml b/.github/workflows/dispatch_deploy.yml index 5caa39c..4cce1a9 100644 --- a/.github/workflows/dispatch_deploy.yml +++ b/.github/workflows/dispatch_deploy.yml @@ -49,7 +49,7 @@ jobs: name: Lookup Version if: ${{ inputs.version-type == 'current' }} secrets: inherit - uses: WalletConnect/ci_workflows/.github/workflows/release-get_deployed_version.yml@0.2.7 + uses: WalletConnect/ci_workflows/.github/workflows/release-get_deployed_version.yml@0.2.9 with: task-name-stage: prod task-name: ${{ vars.TASK_NAME }} diff --git a/.github/workflows/dispatch_publish.yml b/.github/workflows/dispatch_publish.yml index ae0481a..3c1c5e1 100644 --- a/.github/workflows/dispatch_publish.yml +++ b/.github/workflows/dispatch_publish.yml @@ -25,15 +25,16 @@ permissions: jobs: ci: name: CI - uses: WalletConnect/ci_workflows/.github/workflows/ci.yml@0.2.7 + uses: WalletConnect/ci_workflows/.github/workflows/ci.yml@0.2.9 secrets: inherit with: + rust-toolchain-formatting: nightly check-infra: false check-app: true release: name: Release - uses: WalletConnect/ci_workflows/.github/workflows/release.yml@0.2.7 + uses: WalletConnect/ci_workflows/.github/workflows/release.yml@0.2.9 secrets: inherit with: infra-changed: false diff --git a/.github/workflows/dispatch_validate.yml b/.github/workflows/dispatch_validate.yml index e58e39b..d072baa 100644 --- a/.github/workflows/dispatch_validate.yml +++ b/.github/workflows/dispatch_validate.yml @@ -32,9 +32,10 @@ permissions: jobs: ci: name: CI - uses: WalletConnect/ci_workflows/.github/workflows/ci.yml@0.2.7 + uses: WalletConnect/ci_workflows/.github/workflows/ci.yml@0.2.9 secrets: inherit with: + rust-toolchain-formatting: nightly check-infra: ${{ inputs.check-infra }} check-app: ${{ inputs.check-app }} diff --git a/.github/workflows/event_pr.yml b/.github/workflows/event_pr.yml index c97cf93..28b3115 100644 --- a/.github/workflows/event_pr.yml +++ b/.github/workflows/event_pr.yml @@ -46,9 +46,10 @@ jobs: ci: name: CI needs: [ paths-filter ] - uses: WalletConnect/ci_workflows/.github/workflows/ci.yml@0.2.7 + uses: WalletConnect/ci_workflows/.github/workflows/ci.yml@0.2.9 secrets: inherit with: + rust-toolchain-formatting: nightly check-app: ${{ needs.paths-filter.outputs.app == 'true' }} check-infra: ${{ needs.paths-filter.outputs.infra == 'true' }} diff --git a/.github/workflows/event_release.yml b/.github/workflows/event_release.yml index d0f9c79..0ba80ff 100644 --- a/.github/workflows/event_release.yml +++ b/.github/workflows/event_release.yml @@ -44,7 +44,7 @@ jobs: release: name: Release needs: [ paths_filter ] - uses: WalletConnect/ci_workflows/.github/workflows/release.yml@0.2.7 + uses: WalletConnect/ci_workflows/.github/workflows/release.yml@0.2.9 secrets: inherit with: task-name: ${{ vars.TASK_NAME }} diff --git a/.github/workflows/sub-cd.yml b/.github/workflows/sub-cd.yml index a33c546..2b7774e 100644 --- a/.github/workflows/sub-cd.yml +++ b/.github/workflows/sub-cd.yml @@ -31,7 +31,7 @@ jobs: cd-staging: name: Staging secrets: inherit - uses: WalletConnect/ci_workflows/.github/workflows/cd.yml@0.2.7 + uses: WalletConnect/ci_workflows/.github/workflows/cd.yml@0.2.9 with: deploy-infra: ${{ inputs.deploy-infra }} deploy-app: ${{ inputs.deploy-app && !inputs.deploy-infra }} @@ -57,7 +57,7 @@ jobs: needs: [ validate-staging ] if: ${{ inputs.deploy-prod }} secrets: inherit - uses: WalletConnect/ci_workflows/.github/workflows/cd.yml@0.2.7 + uses: WalletConnect/ci_workflows/.github/workflows/cd.yml@0.2.9 with: deploy-infra: ${{ inputs.deploy-infra }} deploy-app: ${{ inputs.deploy-app && !inputs.deploy-infra }} diff --git a/Cargo.lock b/Cargo.lock index 226ecec..80c41f5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.8.7" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", "const-random", @@ -40,16 +40,36 @@ dependencies = [ "memchr", ] +[[package]] +name = "alloc" +version = "0.1.0" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.11.1#ec503450d9671a5546bf8887f17723b9a02e0d36" +dependencies = [ + "metrics 0.1.0", + "serde", + "serde_json", + "thiserror", + "tikv-jemalloc-ctl", + "tikv-jemallocator", +] + +[[package]] +name = "allocator-api2" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" + [[package]] name = "analytics" version = "0.1.0" -source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.7.1#95b9936f0266b0f4fda40bfcce1b0b603e4dd520" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.11.1#ec503450d9671a5546bf8887f17723b9a02e0d36" dependencies = [ "anyhow", "async-trait", "aws-sdk-s3", "bytes", "chrono", + "future", "parquet", "parquet_derive", "tap", @@ -107,132 +127,137 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "aws-config" -version = "0.56.1" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6b3804dca60326e07205179847f17a4fce45af3a1106939177ad41ac08a6de" +checksum = "48730d0b4c3d91c43d0d37168831d9fd0e065ad4a889a2ee9faf8d34c3d2804d" dependencies = [ "aws-credential-types", - "aws-http", + "aws-runtime", "aws-sdk-sso", + "aws-sdk-ssooidc", "aws-sdk-sts", "aws-smithy-async", - "aws-smithy-client", "aws-smithy-http", - "aws-smithy-http-tower", "aws-smithy-json", + "aws-smithy-runtime", + "aws-smithy-runtime-api", "aws-smithy-types", "aws-types", "bytes", "fastrand", "hex", - "http", - "hyper", - "ring 0.16.20", + "http 0.2.11", + "hyper 0.14.28", + "ring 0.17.7", "time", "tokio", - "tower", "tracing", + "url", "zeroize", ] [[package]] name = "aws-credential-types" -version = "0.56.1" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70a66ac8ef5fa9cf01c2d999f39d16812e90ec1467bd382cbbb74ba23ea86201" +checksum = "fa8587ae17c8e967e4b05a62d495be2fb7701bec52a97f7acfe8a29f938384c8" dependencies = [ "aws-smithy-async", + "aws-smithy-runtime-api", "aws-smithy-types", - "fastrand", - "tokio", - "tracing", "zeroize", ] [[package]] -name = "aws-http" -version = "0.56.1" +name = "aws-runtime" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e626370f9ba806ae4c439e49675fd871f5767b093075cdf4fef16cac42ba900" +checksum = "c4ee6903f9d0197510eb6b44c4d86b493011d08b4992938f7b9be0333b6685aa" dependencies = [ "aws-credential-types", + "aws-sigv4", + "aws-smithy-async", + "aws-smithy-eventstream", "aws-smithy-http", + "aws-smithy-runtime-api", "aws-smithy-types", "aws-types", "bytes", - "http", - "http-body", - "lazy_static", + "fastrand", + "http 0.2.11", + "http-body 0.4.6", "percent-encoding", "pin-project-lite", "tracing", + "uuid", ] [[package]] -name = "aws-runtime" -version = "0.56.1" +name = "aws-sdk-s3" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ac5cf0ff19c1bca0cea7932e11b239d1025a45696a4f44f72ea86e2b8bdd07" +checksum = "bc075ffee2a40cb1590bed35d7ec953589a564e768fa91947c565425cd569269" dependencies = [ + "ahash", "aws-credential-types", - "aws-http", + "aws-runtime", "aws-sigv4", "aws-smithy-async", + "aws-smithy-checksums", "aws-smithy-eventstream", "aws-smithy-http", + "aws-smithy-json", + "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", + "aws-smithy-xml", "aws-types", + "bytes", "fastrand", - "http", + "hex", + "hmac", + "http 0.2.11", + "http-body 0.4.6", + "lru", + "once_cell", "percent-encoding", + "regex-lite", + "sha2", "tracing", - "uuid", + "url", ] [[package]] -name = "aws-sdk-s3" -version = "0.31.2" +name = "aws-sdk-sso" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c681fef332c3462634cd97fced8d1ac3cfdf790829bd7bfb4006cfba76712053" +checksum = "b2be5ba83b077b67a6f7a1927eb6b212bf556e33bd74b5eaa5aa6e421910803a" dependencies = [ "aws-credential-types", - "aws-http", "aws-runtime", - "aws-sigv4", "aws-smithy-async", - "aws-smithy-checksums", - "aws-smithy-client", - "aws-smithy-eventstream", "aws-smithy-http", "aws-smithy-json", "aws-smithy-runtime", "aws-smithy-runtime-api", "aws-smithy-types", - "aws-smithy-xml", "aws-types", "bytes", - "http", - "http-body", + "http 0.2.11", "once_cell", - "percent-encoding", - "regex", - "tokio-stream", + "regex-lite", "tracing", - "url", ] [[package]] -name = "aws-sdk-sso" -version = "0.30.0" +name = "aws-sdk-ssooidc" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "903f888ff190e64f6f5c83fb0f8d54f9c20481f1dc26359bb8896f5d99908949" +checksum = "022ca669825f841aef17b12d4354ef2b8651e4664be49f2d9ea13e4062a80c9f" dependencies = [ "aws-credential-types", - "aws-http", "aws-runtime", "aws-smithy-async", - "aws-smithy-client", "aws-smithy-http", "aws-smithy-json", "aws-smithy-runtime", @@ -240,23 +265,21 @@ dependencies = [ "aws-smithy-types", "aws-types", "bytes", - "http", - "regex", - "tokio-stream", + "http 0.2.11", + "once_cell", + "regex-lite", "tracing", ] [[package]] name = "aws-sdk-sts" -version = "0.30.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47ad6bf01afc00423d781d464220bf69fb6a674ad6629cbbcb06d88cdc2be82" +checksum = "8e4a5f5cb007347c1ab34a6d56456301dfada921fc9e57d687ecb08baddd11ff" dependencies = [ "aws-credential-types", - "aws-http", "aws-runtime", "aws-smithy-async", - "aws-smithy-client", "aws-smithy-http", "aws-smithy-json", "aws-smithy-query", @@ -265,49 +288,57 @@ dependencies = [ "aws-smithy-types", "aws-smithy-xml", "aws-types", - "http", - "regex", + "http 0.2.11", + "once_cell", + "regex-lite", "tracing", ] [[package]] name = "aws-sigv4" -version = "0.56.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7b28f4910bb956b7ab320b62e98096402354eca976c587d1eeccd523d9bac03" +checksum = "11d6f29688a4be9895c0ba8bef861ad0c0dac5c15e9618b9b7a6c233990fc263" dependencies = [ + "aws-credential-types", "aws-smithy-eventstream", "aws-smithy-http", + "aws-smithy-runtime-api", + "aws-smithy-types", "bytes", + "crypto-bigint 0.5.5", "form_urlencoded", "hex", "hmac", - "http", + "http 0.2.11", + "http 1.1.0", "once_cell", + "p256", "percent-encoding", - "regex", + "ring 0.17.7", "sha2", + "subtle", "time", "tracing", + "zeroize", ] [[package]] name = "aws-smithy-async" -version = "0.56.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cdb73f85528b9d19c23a496034ac53703955a59323d581c06aa27b4e4e247af" +checksum = "62220bc6e97f946ddd51b5f1361f78996e704677afc518a4ff66b7a72ea1378c" dependencies = [ "futures-util", "pin-project-lite", "tokio", - "tokio-stream", ] [[package]] name = "aws-smithy-checksums" -version = "0.56.1" +version = "0.60.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb15946af1b8d3beeff53ad991d9bff68ac22426b6d40372b958a75fa61eaed" +checksum = "83fa43bc04a6b2441968faeab56e68da3812f978a670a5db32accbdcafddd12f" dependencies = [ "aws-smithy-http", "aws-smithy-types", @@ -315,8 +346,8 @@ dependencies = [ "crc32c", "crc32fast", "hex", - "http", - "http-body", + "http 0.2.11", + "http-body 0.4.6", "md-5", "pin-project-lite", "sha1", @@ -324,35 +355,11 @@ dependencies = [ "tracing", ] -[[package]] -name = "aws-smithy-client" -version = "0.56.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c27b2756264c82f830a91cb4d2d485b2d19ad5bea476d9a966e03d27f27ba59a" -dependencies = [ - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-http-tower", - "aws-smithy-types", - "bytes", - "fastrand", - "http", - "http-body", - "hyper", - "hyper-rustls", - "lazy_static", - "pin-project-lite", - "rustls", - "tokio", - "tower", - "tracing", -] - [[package]] name = "aws-smithy-eventstream" -version = "0.56.1" +version = "0.60.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "850233feab37b591b7377fd52063aa37af615687f5896807abe7f49bd4e1d25b" +checksum = "e6363078f927f612b970edf9d1903ef5cef9a64d1e8423525ebb1f0a1633c858" dependencies = [ "aws-smithy-types", "bytes", @@ -361,57 +368,39 @@ dependencies = [ [[package]] name = "aws-smithy-http" -version = "0.56.1" +version = "0.60.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54cdcf365d8eee60686885f750a34c190e513677db58bbc466c44c588abf4199" +checksum = "3f10fa66956f01540051b0aa7ad54574640f748f9839e843442d99b970d3aff9" dependencies = [ "aws-smithy-eventstream", + "aws-smithy-runtime-api", "aws-smithy-types", "bytes", "bytes-utils", "futures-core", - "http", - "http-body", - "hyper", + "http 0.2.11", + "http-body 0.4.6", "once_cell", "percent-encoding", "pin-project-lite", "pin-utils", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "aws-smithy-http-tower" -version = "0.56.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "822de399d0ce62829a69dfa8c5cd08efdbe61a7426b953e2268f8b8b52a607bd" -dependencies = [ - "aws-smithy-http", - "aws-smithy-types", - "bytes", - "http", - "http-body", - "pin-project-lite", - "tower", "tracing", ] [[package]] name = "aws-smithy-json" -version = "0.56.1" +version = "0.60.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb1e7ab8fa7ad10c193af7ae56d2420989e9f4758bf03601a342573333ea34f" +checksum = "4683df9469ef09468dad3473d129960119a0d3593617542b7d52086c8486f2d6" dependencies = [ "aws-smithy-types", ] [[package]] name = "aws-smithy-query" -version = "0.56.1" +version = "0.60.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28556a3902091c1f768a34f6c998028921bdab8d47d92586f363f14a4a32d047" +checksum = "f2fbd61ceb3fe8a1cb7352e42689cec5335833cd9f94103a61e98f9bb61c64bb" dependencies = [ "aws-smithy-types", "urlencoding", @@ -419,95 +408,112 @@ dependencies = [ [[package]] name = "aws-smithy-runtime" -version = "0.56.1" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "745e096b3553e7e0f40622aa04971ce52765af82bebdeeac53aa6fc82fe801e6" +checksum = "c53572b4cd934ee5e8461ad53caa36e9d246aaef42166e3ac539e206a925d330" dependencies = [ "aws-smithy-async", - "aws-smithy-client", "aws-smithy-http", "aws-smithy-runtime-api", "aws-smithy-types", "bytes", "fastrand", - "http", - "http-body", + "h2 0.3.24", + "http 0.2.11", + "http-body 0.4.6", + "http-body 1.0.0", + "hyper 0.14.28", + "hyper-rustls", "once_cell", "pin-project-lite", "pin-utils", + "rustls", "tokio", "tracing", ] [[package]] name = "aws-smithy-runtime-api" -version = "0.56.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93d0ae0c9cfd57944e9711ea610b48a963fb174a53aabacc08c5794a594b1d02" +checksum = "ccb2b3a7030dc9a3c9a08ce0b25decea5130e9db19619d4dffbbff34f75fe850" dependencies = [ "aws-smithy-async", - "aws-smithy-http", "aws-smithy-types", "bytes", - "http", + "http 0.2.11", + "http 1.1.0", + "pin-project-lite", "tokio", "tracing", + "zeroize", ] [[package]] name = "aws-smithy-types" -version = "0.56.1" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d90dbc8da2f6be461fa3c1906b20af8f79d14968fe47f2b7d29d086f62a51728" +checksum = "abe14dceea1e70101d38fbf2a99e6a34159477c0fb95e68e05c66bd7ae4c3729" dependencies = [ "base64-simd", + "bytes", + "bytes-utils", + "futures-core", + "http 0.2.11", + "http 1.1.0", + "http-body 0.4.6", + "http-body 1.0.0", + "http-body-util", "itoa", "num-integer", + "pin-project-lite", + "pin-utils", "ryu", "serde", "time", + "tokio", + "tokio-util", ] [[package]] name = "aws-smithy-xml" -version = "0.56.1" +version = "0.60.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e01d2dedcdd8023043716cfeeb3c6c59f2d447fce365d8e194838891794b23b6" +checksum = "872c68cf019c0e4afc5de7753c4f7288ce4b71663212771bf5e4542eb9346ca9" dependencies = [ "xmlparser", ] [[package]] name = "aws-types" -version = "0.56.1" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85aa0451bf8af1bf22a4f028d5d28054507a14be43cb8ac0597a8471fba9edfe" +checksum = "afb278e322f16f59630a83b6b2dc992a0b48aa74ed47b4130f193fae0053d713" dependencies = [ "aws-credential-types", "aws-smithy-async", - "aws-smithy-client", - "aws-smithy-http", + "aws-smithy-runtime-api", "aws-smithy-types", - "http", + "http 0.2.11", "rustc_version", "tracing", ] [[package]] name = "axum" -version = "0.6.20" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" +checksum = "3a6c9af12842a67734c9a2e355436e5d03b22383ed60cf13cd0c18fbfe3dcbcf" dependencies = [ "async-trait", "axum-core", - "bitflags 1.3.2", "bytes", "futures-util", - "headers", - "http", - "http-body", - "hyper", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "hyper 1.2.0", + "hyper-util", "itoa", "matchit", "memchr", @@ -519,18 +525,19 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 1.0.1", "tokio", "tower", "tower-layer", "tower-service", + "tracing", ] [[package]] name = "axum-client-ip" -version = "0.4.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ef117890a418b7832678d9ea1e1c08456dd7b2fd1dadb9676cd6f0fe7eb4b21" +checksum = "5e7c467bdcd2bd982ce5c8742a1a178aba7b03db399fd18f5d5d438f5aa91cb4" dependencies = [ "axum", "forwarded-header-value", @@ -539,42 +546,68 @@ dependencies = [ [[package]] name = "axum-core" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" +checksum = "a15c63fd72d41492dc4f497196f5da1fb04fb7529e631d73630d1b491e47a2e3" dependencies = [ "async-trait", "bytes", "futures-util", - "http", - "http-body", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", "mime", + "pin-project-lite", "rustversion", + "sync_wrapper 0.1.2", "tower-layer", "tower-service", + "tracing", ] [[package]] -name = "axum-prometheus" -version = "0.3.4" +name = "axum-extra" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ab3e59a8cf89cddb1c8272c7849d6d22b056d7ed4c125422b5d012983d2aa9e" +checksum = "0be6ea09c9b96cb5076af0de2e383bd2bc0c18f827cf1967bdd353e0b910d733" dependencies = [ "axum", "axum-core", "bytes", + "futures-util", + "headers", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", + "mime", + "pin-project-lite", + "serde", + "tower", + "tower-layer", + "tower-service", + "tracing", +] + +[[package]] +name = "axum-prometheus" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b683cbc43010e9a3d72c2f31ca464155ff4f95819e88a32924b0f47a43898978" +dependencies = [ + "axum", + "bytes", "futures", "futures-core", - "http", - "http-body", + "http 1.1.0", + "http-body 1.0.0", "matchit", - "metrics", + "metrics 0.22.3", "metrics-exporter-prometheus", "once_cell", "pin-project", "tokio", "tower", - "tower-http 0.4.4", + "tower-http", ] [[package]] @@ -592,6 +625,12 @@ dependencies = [ "rustc-demangle", ] +[[package]] +name = "base16ct" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349a06037c7bf932dd7e7d1f653678b2038b9ad46a74102f1fc7bd7872678cce" + [[package]] name = "base64" version = "0.13.1" @@ -604,6 +643,12 @@ version = "0.21.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" +[[package]] +name = "base64" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" + [[package]] name = "base64-simd" version = "0.8.0" @@ -614,6 +659,12 @@ dependencies = [ "vsimd", ] +[[package]] +name = "base64ct" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" + [[package]] name = "bincode" version = "1.3.3" @@ -655,6 +706,7 @@ dependencies = [ "aws-sdk-s3", "axum", "axum-client-ip", + "axum-extra", "axum-prometheus", "build-info", "build-info-build", @@ -663,20 +715,20 @@ dependencies = [ "derive_more", "envy", "futures", - "hyper", + "hyper 1.2.0", "jsonwebtoken", "log", - "metrics", + "metrics 0.21.1", "parquet", "parquet_derive", - "reqwest", + "reqwest 0.12.3", "rmp-serde", "serde", "tap", "thiserror", "tokio", "tower", - "tower-http 0.3.5", + "tower-http", "tracing", "tracing-subscriber", "wc", @@ -823,7 +875,7 @@ dependencies = [ "async-trait", "once_cell", "regex", - "reqwest", + "reqwest 0.11.24", "serde", "thiserror", ] @@ -863,6 +915,12 @@ dependencies = [ "tokio-util", ] +[[package]] +name = "const-oid" +version = "0.9.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" + [[package]] name = "const-random" version = "0.1.17" @@ -916,9 +974,9 @@ dependencies = [ [[package]] name = "crc32c" -version = "0.6.4" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8f48d60e5b4d2c53d5c2b1d8a58c849a70ae5e5509b08a48d047e3b65714a74" +checksum = "89254598aa9b9fa608de44b3ae54c810f0f06d755e24c50177f1f8f31ff50ce2" dependencies = [ "rustc_version", ] @@ -932,6 +990,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +dependencies = [ + "crossbeam-utils", +] + [[package]] name = "crossbeam-epoch" version = "0.9.18" @@ -953,6 +1020,28 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +[[package]] +name = "crypto-bigint" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef2b4b23cddf68b89b8f8069890e8c270d54e2d5fe1b143820234805e4cb17ef" +dependencies = [ + "generic-array", + "rand_core", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto-bigint" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +dependencies = [ + "rand_core", + "subtle", +] + [[package]] name = "crypto-common" version = "0.1.6" @@ -995,6 +1084,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "der" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1a467a65c5e759bce6e65eaf91cc29f466cdc57cb65777bd646872a8a1fd4de" +dependencies = [ + "const-oid", + "zeroize", +] + [[package]] name = "deranged" version = "0.3.11" @@ -1034,12 +1133,44 @@ dependencies = [ "subtle", ] +[[package]] +name = "ecdsa" +version = "0.14.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "413301934810f597c1d19ca71c8710e99a3f1ba28a0d2ebc01551a2daeea3c5c" +dependencies = [ + "der", + "elliptic-curve", + "rfc6979", + "signature", +] + [[package]] name = "either" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +[[package]] +name = "elliptic-curve" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7bb888ab5300a19b8e5bceef25ac745ad065f3c9f7efc6de1b91958110891d3" +dependencies = [ + "base16ct", + "crypto-bigint 0.4.9", + "der", + "digest", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", +] + [[package]] name = "encoding_rs" version = "0.8.33" @@ -1080,6 +1211,16 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[package]] +name = "ff" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d013fc25338cc558c5c2cfbad646908fb23591e2404481826742b651c9af7160" +dependencies = [ + "rand_core", + "subtle", +] + [[package]] name = "flate2" version = "1.0.28" @@ -1133,8 +1274,9 @@ dependencies = [ [[package]] name = "future" version = "0.1.0" -source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.7.1#95b9936f0266b0f4fda40bfcce1b0b603e4dd520" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.11.1#ec503450d9671a5546bf8887f17723b9a02e0d36" dependencies = [ + "metrics 0.1.0", "pin-project", "thiserror", "tokio", @@ -1243,15 +1385,15 @@ dependencies = [ [[package]] name = "geoip" version = "0.1.0" -source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.7.1#95b9936f0266b0f4fda40bfcce1b0b603e4dd520" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.11.1#ec503450d9671a5546bf8887f17723b9a02e0d36" dependencies = [ "aws-sdk-s3", "axum-client-ip", "bitflags 2.4.2", "bytes", "futures", - "http-body", - "hyper", + "http-body 1.0.0", + "hyper 1.2.0", "maxminddb", "thiserror", "tower", @@ -1295,6 +1437,17 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" +[[package]] +name = "group" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfbfb3a6cfbd390d5c9564ab283a0349b9b9fcd46a706c1eb10e0db70bfbac7" +dependencies = [ + "ff", + "rand_core", + "subtle", +] + [[package]] name = "h2" version = "0.3.24" @@ -1306,8 +1459,8 @@ dependencies = [ "futures-core", "futures-sink", "futures-util", - "http", - "indexmap 2.2.2", + "http 0.2.11", + "indexmap", "slab", "tokio", "tokio-util", @@ -1315,18 +1468,22 @@ dependencies = [ ] [[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.13.1" +name = "h2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ff8ae62cd3a9102e5637afc8452c55acf3844001bd5374e0b0bd7b6616c038" +checksum = "816ec7294445779408f36fe57bc5b7fc1cf59664059096c65f905c1c61f58069" dependencies = [ - "ahash", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http 1.1.0", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", ] [[package]] @@ -1334,17 +1491,21 @@ name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +dependencies = [ + "ahash", + "allocator-api2", +] [[package]] name = "headers" -version = "0.3.9" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" +checksum = "322106e6bd0cba2d5ead589ddb8150a13d7c4217cf80d7c4f682ca994ccc6aa9" dependencies = [ "base64 0.21.7", "bytes", "headers-core", - "http", + "http 1.1.0", "httpdate", "mime", "sha1", @@ -1352,11 +1513,11 @@ dependencies = [ [[package]] name = "headers-core" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f66481bfee273957b1f20485a4ff3362987f85b2c236580d81b4eb7a326429" +checksum = "54b4a22553d4242c49fddb9ba998a99962b5cc6f22cb5a3482bec22522403ce4" dependencies = [ - "http", + "http 1.1.0", ] [[package]] @@ -1380,6 +1541,17 @@ dependencies = [ "digest", ] +[[package]] +name = "http" +version = "0.1.0" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.11.1#ec503450d9671a5546bf8887f17723b9a02e0d36" +dependencies = [ + "future", + "hyper 1.2.0", + "metrics 0.1.0", + "tokio", +] + [[package]] name = "http" version = "0.2.11" @@ -1391,6 +1563,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http-body" version = "0.4.6" @@ -1398,15 +1581,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", - "http", + "http 0.2.11", "pin-project-lite", ] [[package]] -name = "http-range-header" -version = "0.3.1" +name = "http-body" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" +dependencies = [ + "bytes", + "http 1.1.0", +] + +[[package]] +name = "http-body-util" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" +dependencies = [ + "bytes", + "futures-core", + "http 1.1.0", + "http-body 1.0.0", + "pin-project-lite", +] [[package]] name = "httparse" @@ -1430,9 +1630,9 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", - "http", - "http-body", + "h2 0.3.24", + "http 0.2.11", + "http-body 0.4.6", "httparse", "httpdate", "itoa", @@ -1444,6 +1644,27 @@ dependencies = [ "want", ] +[[package]] +name = "hyper" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2 0.4.4", + "http 1.1.0", + "http-body 1.0.0", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + [[package]] name = "hyper-rustls" version = "0.24.2" @@ -1451,8 +1672,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ "futures-util", - "http", - "hyper", + "http 0.2.11", + "hyper 0.14.28", "log", "rustls", "rustls-native-certs", @@ -1467,10 +1688,46 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "hyper", + "hyper 0.14.28", "native-tls", "tokio", - "tokio-native-tls", + "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", + "tokio", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -1506,16 +1763,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", -] - [[package]] name = "indexmap" version = "2.2.2" @@ -1523,7 +1770,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" dependencies = [ "equivalent", - "hashbrown 0.14.3", + "hashbrown", ] [[package]] @@ -1644,12 +1891,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] -name = "mach2" -version = "0.4.2" +name = "lru" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b955cdeb2a02b9117f121ce63aa52d08ade45de53e48fe6a38b39c10f6f709" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" dependencies = [ - "libc", + "hashbrown", ] [[package]] @@ -1686,6 +1933,20 @@ version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +[[package]] +name = "metrics" +version = "0.1.0" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.11.1#ec503450d9671a5546bf8887f17723b9a02e0d36" +dependencies = [ + "once_cell", + "opentelemetry", + "opentelemetry-prometheus", + "opentelemetry_sdk", + "pin-project", + "prometheus", + "smallvec", +] + [[package]] name = "metrics" version = "0.21.1" @@ -1697,22 +1958,31 @@ dependencies = [ "portable-atomic", ] +[[package]] +name = "metrics" +version = "0.22.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2be3cbd384d4e955b231c895ce10685e3d8260c5ccffae898c96c723b0772835" +dependencies = [ + "ahash", + "portable-atomic", +] + [[package]] name = "metrics-exporter-prometheus" -version = "0.12.2" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d4fa7ce7c4862db464a37b0b31d89bca874562f034bd7993895572783d02950" +checksum = "9bf4e7146e30ad172c42c39b3246864bd2d3c6396780711a1baf749cfe423e21" dependencies = [ "base64 0.21.7", - "hyper", - "indexmap 1.9.3", + "hyper 0.14.28", + "indexmap", "ipnet", - "metrics", + "metrics 0.22.3", "metrics-util", "quanta", "thiserror", "tokio", - "tracing", ] [[package]] @@ -1728,14 +1998,14 @@ dependencies = [ [[package]] name = "metrics-util" -version = "0.15.1" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4de2ed6e491ed114b40b732e4d1659a9d53992ebd87490c44a6ffe23739d973e" +checksum = "8b07a5eb561b8cbc16be2d216faf7757f9baf3bfb94dbb0fae3df8387a5bb47f" dependencies = [ "crossbeam-epoch", "crossbeam-utils", - "hashbrown 0.13.1", - "metrics", + "hashbrown", + "metrics 0.22.3", "num_cpus", "quanta", "sketches-ddsketch", @@ -1950,6 +2220,56 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "opentelemetry" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "900d57987be3f2aeb70d385fff9b27fb74c5723cc9a52d904d4f9c807a0667bf" +dependencies = [ + "futures-core", + "futures-sink", + "js-sys", + "once_cell", + "pin-project-lite", + "thiserror", + "urlencoding", +] + +[[package]] +name = "opentelemetry-prometheus" +version = "0.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30bbcf6341cab7e2193e5843f0ac36c446a5b3fccb28747afaeda17996dcd02e" +dependencies = [ + "once_cell", + "opentelemetry", + "opentelemetry_sdk", + "prometheus", + "protobuf", +] + +[[package]] +name = "opentelemetry_sdk" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e90c7113be649e31e9a0f8b5ee24ed7a16923b322c3c5ab6367469c049d6b7e" +dependencies = [ + "async-trait", + "crossbeam-channel", + "futures-channel", + "futures-executor", + "futures-util", + "glob", + "once_cell", + "opentelemetry", + "ordered-float 4.2.0", + "percent-encoding", + "rand", + "thiserror", + "tokio", + "tokio-stream", +] + [[package]] name = "ordered-float" version = "2.10.1" @@ -1959,6 +2279,15 @@ dependencies = [ "num-traits", ] +[[package]] +name = "ordered-float" +version = "4.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a76df7075c7d4d01fdcb46c912dd17fba5b60c78ea480b475f2b6ab6f666584e" +dependencies = [ + "num-traits", +] + [[package]] name = "outref" version = "0.5.1" @@ -1971,6 +2300,17 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "p256" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594" +dependencies = [ + "ecdsa", + "elliptic-curve", + "sha2", +] + [[package]] name = "parking_lot" version = "0.12.1" @@ -2003,7 +2343,7 @@ dependencies = [ "bytes", "chrono", "flate2", - "hashbrown 0.14.3", + "hashbrown", "num", "num-bigint", "paste", @@ -2076,6 +2416,16 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkcs8" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9eca2c590a5f85da82668fa685c09ce2888b9430e83299debf1f34b65fd4a4ba" +dependencies = [ + "der", + "spki", +] + [[package]] name = "pkg-config" version = "0.3.29" @@ -2094,6 +2444,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + [[package]] name = "pretty_assertions" version = "1.4.0" @@ -2137,15 +2493,35 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "prometheus" +version = "0.13.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" +dependencies = [ + "cfg-if", + "fnv", + "lazy_static", + "memchr", + "parking_lot", + "protobuf", + "thiserror", +] + +[[package]] +name = "protobuf" +version = "2.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "106dd99e98437432fed6519dedecfade6a06a73bb7b2a1e019fdd2bee5778d94" + [[package]] name = "quanta" -version = "0.11.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17e662a7a8291a865152364c20c7abc5e60486ab2001e8ec10b24862de0b9ab" +checksum = "8e5167a477619228a0b284fac2674e3c388cba90631d7b7de620e6f1fcd08da5" dependencies = [ "crossbeam-utils", "libc", - "mach2", "once_cell", "raw-cpuid", "wasi", @@ -2162,13 +2538,43 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + [[package]] name = "raw-cpuid" -version = "10.7.0" +version = "11.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c297679cb867470fa8c9f67dbba74a78d78e3e98d7cf2b08d6d71540f797332" +checksum = "9d86a7c4638d42c44551f4791a20e687dbb4c3de1f33c43dd71e355cd429def1" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.2", ] [[package]] @@ -2222,6 +2628,12 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-lite" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" + [[package]] name = "regex-syntax" version = "0.8.2" @@ -2239,11 +2651,53 @@ dependencies = [ "encoding_rs", "futures-core", "futures-util", - "h2", - "http", - "http-body", - "hyper", - "hyper-tls", + "h2 0.3.24", + "http 0.2.11", + "http-body 0.4.6", + "hyper 0.14.28", + "hyper-tls 0.5.0", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 1.0.4", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 0.1.2", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg 0.50.0", +] + +[[package]] +name = "reqwest" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e6cc1e89e689536eb5aeede61520e874df5a4707df811cd5da4aa5fbb2aae19" +dependencies = [ + "base64 0.22.0", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2 0.4.4", + "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", @@ -2252,11 +2706,11 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile", + "rustls-pemfile 2.1.2", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", "system-configuration", "tokio", "tokio-native-tls", @@ -2265,7 +2719,7 @@ dependencies = [ "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "winreg", + "winreg 0.52.0", ] [[package]] @@ -2274,6 +2728,17 @@ version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4389f1d5789befaf6029ebd9f7dac4af7f7e3d61b69d4f30e2ac02b57e7712b0" +[[package]] +name = "rfc6979" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7743f17af12fa0b03b803ba12cd6a8d9483a587e89c69445e3909655c0b9fabb" +dependencies = [ + "crypto-bigint 0.4.9", + "hmac", + "zeroize", +] + [[package]] name = "ring" version = "0.16.20" @@ -2372,7 +2837,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", - "rustls-pemfile", + "rustls-pemfile 1.0.4", "schannel", "security-framework", ] @@ -2386,6 +2851,22 @@ dependencies = [ "base64 0.21.7", ] +[[package]] +name = "rustls-pemfile" +version = "2.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" +dependencies = [ + "base64 0.22.0", + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecd36cc4259e3e4514335c4a138c6b43171a8d61d8f5c9348f9fc7529416f247" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -2433,6 +2914,20 @@ dependencies = [ "untrusted 0.9.0", ] +[[package]] +name = "sec1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3be24c1842290c45df0a7bf069e0c268a747ad05a192f2fd7dcfdbc1cba40928" +dependencies = [ + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", +] + [[package]] name = "security-framework" version = "2.9.2" @@ -2564,6 +3059,16 @@ dependencies = [ "libc", ] +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +dependencies = [ + "digest", + "rand_core", +] + [[package]] name = "simple_asn1" version = "0.6.2" @@ -2619,6 +3124,16 @@ version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" +[[package]] +name = "spki" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67cf02bbac7a337dc36e4f5a693db6c21e7863f45070f7064577eb4367a3212b" +dependencies = [ + "base64ct", + "der", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -2659,6 +3174,12 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" +[[package]] +name = "sync_wrapper" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" + [[package]] name = "system-configuration" version = "0.5.1" @@ -2736,7 +3257,38 @@ checksum = "7e54bc85fc7faa8bc175c4bab5b92ba8d9a3ce893d0e9f42cc455c8ab16a9e09" dependencies = [ "byteorder", "integer-encoding", - "ordered-float", + "ordered-float 2.10.1", +] + +[[package]] +name = "tikv-jemalloc-ctl" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "619bfed27d807b54f7f776b9430d4f8060e66ee138a28632ca898584d462c31c" +dependencies = [ + "libc", + "paste", + "tikv-jemalloc-sys", +] + +[[package]] +name = "tikv-jemalloc-sys" +version = "0.5.4+5.3.0-patched" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9402443cb8fd499b6f327e40565234ff34dbda27460c5b47db0db77443dd85d1" +dependencies = [ + "cc", + "libc", +] + +[[package]] +name = "tikv-jemallocator" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "965fe0c26be5c56c94e38ba547249074803efd52adfb66de62107d95aab3eaca" +dependencies = [ + "libc", + "tikv-jemalloc-sys", ] [[package]] @@ -2846,9 +3398,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.14" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", "pin-project-lite", @@ -2887,39 +3439,19 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" -dependencies = [ - "bitflags 1.3.2", - "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-range-header", - "pin-project-lite", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-http" -version = "0.4.4" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" +checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" dependencies = [ "bitflags 2.4.2", "bytes", - "futures-core", - "futures-util", - "http", - "http-body", - "http-range-header", + "http 1.1.0", + "http-body 1.0.0", + "http-body-util", "pin-project-lite", "tower-layer", "tower-service", + "tracing", ] [[package]] @@ -3191,11 +3723,14 @@ checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" [[package]] name = "wc" version = "0.1.0" -source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.7.1#95b9936f0266b0f4fda40bfcce1b0b603e4dd520" +source = "git+https://github.com/WalletConnect/utils-rs.git?tag=v0.11.1#ec503450d9671a5546bf8887f17723b9a02e0d36" dependencies = [ + "alloc", "analytics", "future", "geoip", + "http 0.1.0", + "metrics 0.1.0", ] [[package]] @@ -3381,6 +3916,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 = "xmlparser" version = "0.13.6" diff --git a/Cargo.toml b/Cargo.toml index c60e3df..ee0f189 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,22 +8,23 @@ authors = [ build = "build.rs" [dependencies] -wc = { git = "https://github.com/WalletConnect/utils-rs.git", tag = "v0.7.1", features = ["geoip", "geoblock", "analytics", "future"] } +wc = { git = "https://github.com/WalletConnect/utils-rs.git", tag = "v0.11.1", features = ["geoip", "geoblock", "analytics", "future", "metrics"] } tokio = { version = "1", features = ["full"] } # Http -axum = { version = "0.6", features = ["json", "headers"] } -axum-client-ip = "0.4" +axum = { version = "0.7.5", features = ["json"] } +axum-extra = { version = "0.9.3", features = ["typed-header"] } +axum-client-ip = "0.5.1" jsonwebtoken = "8" -tower = "0.4" -tower-http = { version = "0.3", features = ["cors", "trace"] } -hyper = "0.14" -reqwest = { version = "0.11", features = ["json"] } +tower = "0.4.13" +tower-http = { version = "0.5.2", features = ["cors", "trace"] } +hyper = "1.2.0" +reqwest = { version = "0.12.2", features = ["json"] } # Infra -aws-config = "0.56" -aws-sdk-s3 = "0.31" +aws-config = "1.1.9" +aws-sdk-s3 = "1.21.0" deadpool-redis = "0.10" cerberus = { git = "https://github.com/WalletConnect/cerberus.git", tag = "v0.9.0" } @@ -31,7 +32,7 @@ cerberus = { git = "https://github.com/WalletConnect/cerberus.git", tag = "v0.9. tracing = "0.1" tracing-subscriber = { version = "0.3", features = ["json"] } metrics = "0.21" -axum-prometheus = "0.3" +axum-prometheus = "0.6.1" # Serialisation serde = { version = "1.0", features = ["derive"] } diff --git a/deny.toml b/deny.toml index a295713..6e60166 100644 --- a/deny.toml +++ b/deny.toml @@ -1,13 +1,13 @@ [licenses] unused-allowed-license = "deny" -copyleft = "deny" allow = [ "Apache-2.0", "MIT", "Unlicense", "BSD-3-Clause", "0BSD", - "ISC" + "ISC", + "CC0-1.0" ] exceptions = [{ name = "unicode-ident", allow = ["Unicode-DFS-2016"] }] diff --git a/src/event_sink/s3.rs b/src/event_sink/s3.rs index 5fbeb89..df94bc6 100644 --- a/src/event_sink/s3.rs +++ b/src/event_sink/s3.rs @@ -1,48 +1,195 @@ use { crate::EventSink, anyhow::Result, - aws_sdk_s3::Client, + aws_sdk_s3::Client as S3Client, parquet::record::RecordWriter, - wc::analytics::{ - collectors::batch::BatchOpts, - exporters::aws::{AwsExporter, AwsOpts}, - writers::parquet::ParquetWriter, - Analytics, + std::{ + net::{IpAddr, Ipv4Addr}, + time::Duration, + }, + wc::{ + analytics::{ + AnalyticsExt, + ArcCollector, + AwsConfig, + AwsExporter, + BatchCollector, + BatchObserver, + CollectionObserver, + Collector, + CollectorConfig, + ExportObserver, + ParquetBatchFactory, + }, + metrics::otel, }, }; +const ANALYTICS_EXPORT_TIMEOUT: Duration = Duration::from_secs(30); +const DATA_QUEUE_CAPACITY: usize = 8192; + +#[derive(Clone, Copy)] +enum DataKind { + Requests, +} + +impl DataKind { + #[inline] + fn as_str(&self) -> &'static str { + match self { + Self::Requests => "requests", + } + } + + #[inline] + fn as_kv(&self) -> otel::KeyValue { + otel::KeyValue::new("data_kind", self.as_str()) + } +} + +fn success_kv(success: bool) -> otel::KeyValue { + otel::KeyValue::new("success", success) +} + +#[derive(Clone, Copy)] +struct Observer(DataKind); + +impl BatchObserver for Observer +where + E: std::error::Error, +{ + fn observe_batch_serialization(&self, elapsed: Duration, res: &Result, E>) { + let size = res.as_deref().map(|data| data.len()).unwrap_or(0); + let elapsed = elapsed.as_millis() as u64; + + wc::metrics::counter!("analytics_batches_finished", 1, &[ + self.0.as_kv(), + success_kv(res.is_ok()) + ]); + + if let Err(err) = res { + tracing::warn!( + ?err, + data_kind = self.0.as_str(), + "failed to serialize analytics batch" + ); + } else { + tracing::info!( + size, + elapsed, + data_kind = self.0.as_str(), + "analytics data batch serialized" + ); + } + } +} + +impl CollectionObserver for Observer +where + E: std::error::Error, +{ + fn observe_collection(&self, res: &Result<(), E>) { + wc::metrics::counter!("analytics_records_collected", 1, &[ + self.0.as_kv(), + success_kv(res.is_ok()) + ]); + + if let Err(err) = res { + tracing::warn!( + ?err, + data_kind = self.0.as_str(), + "failed to collect analytics data" + ); + } + } +} + +impl ExportObserver for Observer +where + E: std::error::Error, +{ + fn observe_export(&self, elapsed: Duration, res: &Result<(), E>) { + wc::metrics::counter!("analytics_batches_exported", 1, &[ + self.0.as_kv(), + success_kv(res.is_ok()) + ]); + + let elapsed = elapsed.as_millis() as u64; + + if let Err(err) = res { + tracing::warn!( + ?err, + elapsed, + data_kind = self.0.as_str(), + "analytics export failed" + ); + } else { + tracing::info!( + elapsed, + data_kind = self.0.as_str(), + "analytics export failed" + ); + } + } +} + pub struct Adapter where Record: Send + Sync + 'static, { - s3_writer: Analytics, + s3_writer: ArcCollector, } -pub async fn requests_dir(client: Client, bucket_name: String) -> Result> +pub async fn requests_dir( + s3_client: S3Client, + export_bucket: String, +) -> Result> where Record: Send + Sync + 'static, [Record]: RecordWriter, { - let exporter = AwsExporter::new(AwsOpts { - export_prefix: "verify-server/requests", - export_name: "requests", - file_extension: "parquet", - bucket_name: bucket_name.into(), - s3_client: client, + fn make_export( + data_kind: DataKind, + s3_client: S3Client, + export_bucket: String, + node_addr: IpAddr, + ) -> ArcCollector + where + T: Sync + Send + 'static, + [T]: RecordWriter, + { + let observer = Observer(data_kind); + BatchCollector::new( + CollectorConfig { + data_queue_capacity: DATA_QUEUE_CAPACITY, + ..Default::default() + }, + ParquetBatchFactory::new(Default::default()).with_observer(observer), + AwsExporter::new(AwsConfig { + export_prefix: format!("verify-server/{}", data_kind.as_str()), + export_name: data_kind.as_str().to_string(), + node_addr, + file_extension: "parquet".to_owned(), + bucket_name: export_bucket.to_owned(), + s3_client, + upload_timeout: ANALYTICS_EXPORT_TIMEOUT, + }) + .with_observer(observer), + ) + .with_observer(observer) + .boxed_shared() + } + + let s3_writer = make_export( + DataKind::Requests, + s3_client.clone(), + export_bucket, // Used only to build a file name // TODO: Change it in the `wc` repo as it's not really needed for all services - node_ip: String::new().into(), - }); - - let opts = BatchOpts { - event_queue_limit: 8192, - ..Default::default() - }; + Ipv4Addr::LOCALHOST.into(), + ); - let collector = ParquetWriter::::new(opts.clone(), exporter)?; - Ok(Adapter { - s3_writer: Analytics::new(collector), - }) + Ok(Adapter { s3_writer }) } impl EventSink for Adapter @@ -51,6 +198,12 @@ where R: Send + Sync + 'static, { fn send(&self, ev: Ev) { - self.s3_writer.collect(ev.into()); + if let Err(err) = self.s3_writer.collect(ev.into()) { + tracing::warn!( + ?err, + data_kind = DataKind::Requests.as_str(), + "failed to collect analytics" + ); + } } } diff --git a/src/http_server/mod.rs b/src/http_server/mod.rs index f06d568..1c58d8b 100644 --- a/src/http_server/mod.rs +++ b/src/http_server/mod.rs @@ -16,14 +16,13 @@ use { async_trait::async_trait, axum::{ extract::{FromRequestParts, Path}, - headers::UserAgent, http::request, response::{Html, IntoResponse, Response}, routing::{get, post}, Router, - TypedHeader, }, axum_client_ip::InsecureClientIp, + axum_extra::{headers::UserAgent, TypedHeader}, axum_prometheus::{EndpointLabel, PrometheusMetricLayerBuilder as MetricLayerBuilder}, futures::FutureExt, hyper::{ @@ -34,13 +33,20 @@ use { StatusCode, }, serde::{Deserialize, Serialize}, - std::{convert::Infallible, future::Future, iter, net::SocketAddr, sync::Arc}, + std::{ + convert::Infallible, + future::{Future, IntoFuture}, + iter, + net::SocketAddr, + sync::Arc, + }, tap::{Pipe, Tap}, + tokio::net::TcpListener, tower_http::cors::{self, CorsLayer}, tracing::{info, instrument}, - wc::{ - geoip, - geoip::block::{middleware::GeoBlockLayer, BlockingPolicy as GeoBlockingPolicy}, + wc::geoip::{ + self, + block::{middleware::GeoBlockLayer, BlockingPolicy as GeoBlockingPolicy}, }, }; @@ -100,8 +106,9 @@ pub async fn run( metrics_provider: impl Fn() -> String + Clone + Send + 'static, health_provider: impl Fn() -> String + Clone + Send + 'static, geoip_resolver: Option, - shutdown: impl Future, -) where + shutdown: impl Future + Send + 'static, +) -> Result<(), anyhow::Error> +where for<'a> S: Handle>, Result = GetVerifyStatusResult> + Handle>, Result = SetAttestationResult> + Handle>, Result = GetAttestationResult>, @@ -146,25 +153,30 @@ pub async fn run( } else { server }; + let listener = TcpListener::bind(&SocketAddr::from(([0, 0, 0, 0], cfg.port))).await?; let server = server .into_make_service() - .pipe(|svc| axum::Server::bind(&SocketAddr::from(([0, 0, 0, 0], cfg.port))).serve(svc)) + .pipe(|svc| axum::serve(listener, svc)) .pipe(|s| s.with_graceful_shutdown(shutdown.clone())) - .tap(|_| info!("Serving at :{}", cfg.port)); + .tap(|_| info!("Serving at :{}", cfg.port)) + .into_future(); + let private_listener = + TcpListener::bind(&SocketAddr::from(([0, 0, 0, 0], cfg.metrics_port))).await?; let metrics_server = Router::new() .route("/metrics", get(metrics::get(metrics_provider))) .into_make_service() - .pipe(|svc| { - axum::Server::bind(&SocketAddr::from(([0, 0, 0, 0], cfg.metrics_port))).serve(svc) - }) + .pipe(|svc| axum::serve(private_listener, svc)) .pipe(|s| s.with_graceful_shutdown(shutdown)) - .tap(|_| info!("Serving metrics at :{}", cfg.metrics_port)); + .tap(|_| info!("Serving metrics at :{}", cfg.metrics_port)) + .into_future(); let _ = futures::join!( server.map(|_| info!("Server terminated")), metrics_server.map(|_| info!("Metrics server terminated")) ); + + Ok(()) } fn index_html(token: &str) -> String { @@ -300,6 +312,10 @@ impl TokenManager { fn build_content_security_header(domains: Vec) -> String { let urls = domains.iter().map(AsRef::as_ref).flat_map(|domain| { + // TODO support abc.localhost + // TODO support localhost:8080 + // TODO support 127.0.0.1 + // TODO support ::1 let proto = if domain == "localhost" { "http://" } else { diff --git a/src/main.rs b/src/main.rs index 45ad98d..1ccbd8b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,9 +1,10 @@ use { anyhow::Context as _, - aws_config::meta::region::RegionProviderChain, + aws_config::{meta::region::RegionProviderChain, BehaviorVersion}, aws_sdk_s3::{config::Region, Client as S3Client}, axum_prometheus::{ metrics_exporter_prometheus::{Matcher as MetricMatcher, PrometheusBuilder}, + utils::SECONDS_DURATION_BUCKETS, AXUM_HTTP_REQUESTS_DURATION_SECONDS, }, bouncer::{ @@ -92,7 +93,7 @@ async fn main() -> Result<(), anyhow::Error> { let prometheus = PrometheusBuilder::new() .set_buckets_for_metric( MetricMatcher::Full(AXUM_HTTP_REQUESTS_DURATION_SECONDS.to_string()), - axum_prometheus::SECONDS_DURATION_BUCKETS, + SECONDS_DURATION_BUCKETS, ) .context("Failed to set Prometheus buckets for HTTP request latency metrics")? .install_recorder() @@ -145,7 +146,7 @@ async fn main() -> Result<(), anyhow::Error> { geoip_resolver, signals, ) - .await; + .await?; Ok(()) } @@ -208,7 +209,10 @@ where pub async fn s3_client(config: &Configuration) -> S3Client { let region_provider = RegionProviderChain::first_try(Region::new("eu-central-1")); - let shared_config = aws_config::from_env().region(region_provider).load().await; + let shared_config = aws_config::defaults(BehaviorVersion::latest()) + .region(region_provider) + .load() + .await; let aws_config = match &config.s3_endpoint { Some(s3_endpoint) => {