diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f13f3ce67af..234208f652a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,6 +36,10 @@ jobs: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 name: Checkout code + - name: Install system dependencies + run: | + sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev + - uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: enable-cache: false @@ -63,6 +67,10 @@ jobs: app_id: ${{ vars.SENTRY_INTERNAL_APP_ID }} private_key: ${{ secrets.SENTRY_INTERNAL_APP_PRIVATE_KEY }} + - name: Install system dependencies + run: | + sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev + - uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: # we just cache the venv-dir directly in action-setup-venv @@ -122,6 +130,10 @@ jobs: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 name: Checkout code + - name: Install system dependencies + run: | + sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev + - name: Install protoc uses: arduino/setup-protoc@c65c819552d16ad3c9b72d9dfd5ba5237b9c906b # v3 with: @@ -144,6 +156,10 @@ jobs: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 name: Checkout code + - name: Install system dependencies + run: | + sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev + - uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: # we just cache the venv-dir directly in action-setup-venv diff --git a/.github/workflows/ddl-changes.yml b/.github/workflows/ddl-changes.yml index 5e353c7f349..8fa5db78762 100644 --- a/.github/workflows/ddl-changes.yml +++ b/.github/workflows/ddl-changes.yml @@ -24,6 +24,10 @@ jobs: clean: false fetch-depth: 200 + - name: Install system dependencies + run: | + sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev + - uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: # we just cache the venv-dir directly in action-setup-venv diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c7deeb03f3c..ef08181b95e 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -17,6 +17,10 @@ jobs: # we just cache the venv-dir directly in action-setup-venv enable-cache: false + - name: Install system dependencies + run: | + sudo apt-get update && sudo apt-get install -y libcurl4-openssl-dev + - uses: getsentry/action-setup-venv@5a80476d175edf56cb205b08bc58986fa99d1725 # v3.2.0 with: diff --git a/Dockerfile b/Dockerfile index 21e49d39c58..a3dd65d3d2f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,6 +32,7 @@ RUN set -ex; \ g++ \ gnupg \ protobuf-compiler \ + libcurl4-openssl-dev \ '; \ runtimeDeps=' \ curl \ diff --git a/rust_snuba/Cargo.lock b/rust_snuba/Cargo.lock index c87a7b0bc7e..f8655382418 100644 --- a/rust_snuba/Cargo.lock +++ b/rust_snuba/Cargo.lock @@ -52,12 +52,6 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" -[[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" @@ -73,54 +67,12 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" -[[package]] -name = "anstream" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - [[package]] name = "anstyle" version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" -[[package]] -name = "anstyle-parse" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - [[package]] name = "anyhow" version = "1.0.102" @@ -366,12 +318,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "atomic" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" - [[package]] name = "atomic-waker" version = "1.1.2" @@ -534,6 +480,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + [[package]] name = "blocking" version = "1.5.1" @@ -556,6 +511,15 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc0b364ead1874514c8c2855ab558056ebfeb775653e7ae45ff72f28f8f3166c" +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "tinyvec", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -574,15 +538,6 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33" -[[package]] -name = "cadence" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3075f133bee430b7644c54fb629b9b4420346ffa275a45c81a6babe8b09b4f51" -dependencies = [ - "crossbeam-channel", -] - [[package]] name = "cast" version = "0.3.0" @@ -609,23 +564,22 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.37" +version = "0.4.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" +checksum = "1aa79e62e7697b8e29b513a68abacf485adcd1fe8284a4316c5ae868e6633327" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.4", + "windows-link 0.2.1", ] [[package]] @@ -668,7 +622,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", - "clap_derive", ] [[package]] @@ -677,22 +630,8 @@ version = "4.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae129e2e766ae0ec03484e609954119f123cc1fe650337e155d03b022f24f7b4" dependencies = [ - "anstream", "anstyle", "clap_lex", - "strsim", -] - -[[package]] -name = "clap_derive" -version = "4.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" -dependencies = [ - "heck 0.5.0", - "proc-macro2", - "quote", - "syn 2.0.117", ] [[package]] @@ -721,12 +660,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - [[package]] name = "concurrent-queue" version = "2.4.0" @@ -738,14 +671,13 @@ dependencies = [ [[package]] name = "console" -version = "0.15.8" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "d64e8af5551369d19cf50138de61f1c42074ab970f74e99be916646777f8fc87" dependencies = [ "encode_unicode", - "lazy_static", "libc", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] @@ -773,15 +705,6 @@ dependencies = [ "libc", ] -[[package]] -name = "crc32fast" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" -dependencies = [ - "cfg-if", -] - [[package]] name = "criterion" version = "0.5.1" @@ -870,19 +793,20 @@ dependencies = [ [[package]] name = "ctrlc" -version = "3.4.4" +version = "3.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "672465ae37dc1bc6380a6547a8883d5dd397b0f1faaad4f265726cc7042a5345" +checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162" dependencies = [ + "dispatch2", "nix", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] name = "darling" -version = "0.20.9" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83b2eb4d90d12bdda5ed17de686c2acb4c57914f8f921b8da7e112b5a36f3fe1" +checksum = "25ae13da2f202d56bd7f91c25fba009e7717a1e4a1cc98a76d844b65ae912e9d" dependencies = [ "darling_core", "darling_macro", @@ -890,11 +814,10 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.9" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "622687fe0bac72a04e5599029151f5796111b90f1baaa9b544d807a5e31cd120" +checksum = "9865a50f7c335f53564bb694ef660825eb8610e0a53d3e11bf1b0d3df31e03b0" dependencies = [ - "fnv", "ident_case", "proc-macro2", "quote", @@ -904,9 +827,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.9" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" +checksum = "ac3984ec7bd6cfa798e62b4a642426a5be0e68f9401cfc2a01e3fa9ea2fcdb8d" dependencies = [ "darling_core", "quote", @@ -915,9 +838,9 @@ dependencies = [ [[package]] name = "data-encoding" -version = "2.5.0" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "a4ae5f15dda3c708c0ade84bfee31ccab44a3da4f88015ed22f63732abe300c8" [[package]] name = "debugid" @@ -992,6 +915,18 @@ dependencies = [ "winapi", ] +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.11.0", + "block2", + "libc", + "objc2", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -1035,9 +970,9 @@ dependencies = [ [[package]] name = "encode_unicode" -version = "0.3.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" @@ -1049,27 +984,10 @@ dependencies = [ ] [[package]] -name = "env_filter" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186e05a59d4c50738528153b83b0b0194d3a29507dfec16eccd4b342903397d0" -dependencies = [ - "log", - "regex", -] - -[[package]] -name = "env_logger" -version = "0.11.8" +name = "endian-type" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" -dependencies = [ - "anstream", - "anstyle", - "env_filter", - "jiff", - "log", -] +checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" [[package]] name = "equivalent" @@ -1272,9 +1190,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" +checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" dependencies = [ "futures-channel", "futures-core", @@ -1287,9 +1205,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" +checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" dependencies = [ "futures-core", "futures-sink", @@ -1297,15 +1215,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" +checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" [[package]] name = "futures-executor" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" +checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" dependencies = [ "futures-core", "futures-task", @@ -1314,9 +1232,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" +checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" [[package]] name = "futures-lite" @@ -1348,9 +1266,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" +checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" dependencies = [ "proc-macro2", "quote", @@ -1359,21 +1277,21 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" +checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" [[package]] name = "futures-task" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" +checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" [[package]] name = "futures-util" -version = "0.3.30" +version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" +checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" dependencies = [ "futures-channel", "futures-core", @@ -1383,7 +1301,6 @@ dependencies = [ "futures-task", "memchr", "pin-project-lite", - "pin-utils", "slab", ] @@ -1476,9 +1393,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.7" +version = "0.4.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +checksum = "6cb093c84e8bd9b188d4c4a8cb6579fc016968d14c99882163cd3ff402a4f155" dependencies = [ "atomic-waker", "bytes", @@ -1696,14 +1613,15 @@ dependencies = [ [[package]] name = "hyper" -version = "1.6.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" dependencies = [ + "atomic-waker", "bytes", "futures-channel", - "futures-util", - "h2 0.4.7", + "futures-core", + "h2 0.4.15", "http 1.1.0", "http-body 1.0.0", "httparse", @@ -1721,7 +1639,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3203a961e5c83b6f5498933e78b6b263e208c197b63e9c6c53cc82ffd3f63793" dependencies = [ - "hyper 1.6.0", + "hyper 1.10.1", "hyper-util", "pin-project-lite", "tokio", @@ -1749,7 +1667,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.6.0", + "hyper 1.10.1", "hyper-util", "native-tls", "tokio", @@ -1770,7 +1688,7 @@ dependencies = [ "futures-util", "http 1.1.0", "http-body 1.0.0", - "hyper 1.6.0", + "hyper 1.10.1", "ipnet", "libc", "percent-encoding", @@ -1986,17 +1904,17 @@ checksum = "f4c7245a08504955605670dbf141fceab975f15ca21570696aebe9d2e71576bd" [[package]] name = "insta" -version = "1.38.0" +version = "1.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3eab73f58e59ca6526037208f0e98851159ec1633cf17b6cd2e1f2c3fd5d53cc" +checksum = "86f0f8fee8c926415c58d6ae43a08523a26faccb2323f5e6b644fe7dd4ef6b82" dependencies = [ "console", - "lazy_static", - "linked-hash-map", + "once_cell", "pest", "pest_derive", "serde", "similar", + "tempfile", ] [[package]] @@ -2107,30 +2025,6 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" -[[package]] -name = "jiff" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be1f93b8b1eb69c77f24bbb0afdf66f54b632ee39af40ca21c4365a1d7347e49" -dependencies = [ - "jiff-static", - "log", - "portable-atomic", - "portable-atomic-util", - "serde", -] - -[[package]] -name = "jiff-static" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "jobserver" version = "0.1.31" @@ -2152,15 +2046,15 @@ dependencies = [ [[package]] name = "json-schema-diff" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dd0265effd06eb4c3b018b88c74464cd955ff3e56926534ed8cf1a7f11760ac" +checksum = "de7fd244ab4ed3b9e1ce86ec023604530ec6900262b74aa2c8c566ba57647251" dependencies = [ "pathfinding", - "schemars", + "schemars 0.8.22", "serde", "serde_json", - "thiserror 1.0.58", + "thiserror 1.0.69", ] [[package]] @@ -2279,9 +2173,9 @@ checksum = "db13adb97ab515a3691f56e4dbab09283d0b86cb45abd991d8634a9d6f501760" [[package]] name = "libc" -version = "0.2.183" +version = "0.2.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b646652bf6661599e1da8901b3b9522896f01e736bad5f723fe7a3a27f899d" +checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libredox" @@ -2305,12 +2199,6 @@ dependencies = [ "vcpkg", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" version = "0.3.8" @@ -2398,6 +2286,52 @@ dependencies = [ "autocfg", ] +[[package]] +name = "metrics" +version = "0.24.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89550ee9f79e88fef3119de263694973a8adb26c21d75322164fb8c493039fe2" +dependencies = [ + "portable-atomic", + "rapidhash", +] + +[[package]] +name = "metrics-exporter-dogstatsd" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4f39e912d07239992146dc617951ef78a909daec25f0b31c629767cf59f34bb" +dependencies = [ + "bytes", + "itoa", + "metrics", + "metrics-util", + "ryu", + "thiserror 2.0.18", + "tracing", +] + +[[package]] +name = "metrics-util" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96f8722f8562635f92f8ed992f26df0532266eb03d5202607c20c0d7e9745e13" +dependencies = [ + "aho-corasick", + "crossbeam-epoch", + "crossbeam-utils", + "hashbrown 0.16.1", + "indexmap 2.13.0", + "metrics", + "ordered-float", + "quanta", + "radix_trie", + "rand 0.9.3", + "rand_xoshiro", + "rapidhash", + "sketches-ddsketch", +] + [[package]] name = "mime" version = "0.3.17" @@ -2454,11 +2388,20 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" +[[package]] +name = "nibble_vec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" +dependencies = [ + "smallvec", +] + [[package]] name = "nix" -version = "0.28.0" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab2156c4fce2f8df6c499cc1c763e4394b7482525bf2a9701c9d79d215f519e4" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" dependencies = [ "bitflags 2.11.0", "cfg-if", @@ -2591,6 +2534,21 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "objc2" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" +dependencies = [ + "objc2-encode", +] + +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + [[package]] name = "object" version = "0.37.3" @@ -2602,9 +2560,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" [[package]] name = "oorandom" @@ -2655,6 +2613,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "ordered-float" +version = "5.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7d950ca161dc355eaf28f82b11345ed76c6e1f6eb1f4f4479e0323b9e2fbd0e" +dependencies = [ + "num-traits", +] + [[package]] name = "os_info" version = "3.8.2" @@ -2713,7 +2680,7 @@ dependencies = [ "integer-sqrt", "num-traits", "rustc-hash", - "thiserror 1.0.58", + "thiserror 1.0.69", ] [[package]] @@ -2738,7 +2705,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" dependencies = [ "memchr", - "thiserror 1.0.58", + "thiserror 1.0.69", "ucd-trie", ] @@ -2915,15 +2882,6 @@ version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" -[[package]] -name = "portable-atomic-util" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" -dependencies = [ - "portable-atomic", -] - [[package]] name = "powerfmt" version = "0.2.0" @@ -3021,9 +2979,9 @@ dependencies = [ [[package]] name = "pyo3" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17da310086b068fbdcefbba30aeb3721d5bb9af8db4987d6735b2183ca567229" +checksum = "e5203598f366b11a02b13aa20cab591229ff0a89fd121a308a5df751d5fc9219" dependencies = [ "cfg-if", "chrono", @@ -3040,9 +2998,9 @@ dependencies = [ [[package]] name = "pyo3-build-config" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27165889bd793000a098bb966adc4300c312497ea25cf7a690a9f0ac5aa5fc1" +checksum = "99636d423fa2ca130fa5acde3059308006d46f98caac629418e53f7ebb1e9999" dependencies = [ "once_cell", "target-lexicon", @@ -3050,9 +3008,9 @@ dependencies = [ [[package]] name = "pyo3-ffi" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05280526e1dbf6b420062f3ef228b78c0c54ba94e157f5cb724a609d0f2faabc" +checksum = "78f9cf92ba9c409279bc3305b5409d90db2d2c22392d443a87df3a1adad59e33" dependencies = [ "libc", "pyo3-build-config", @@ -3060,9 +3018,9 @@ dependencies = [ [[package]] name = "pyo3-macros" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c3ce5686aa4d3f63359a5100c62a127c9f15e8398e5fdeb5deef1fed5cd5f44" +checksum = "0b999cb1a6ce21f9a6b147dcf1be9ffedf02e0043aec74dc390f3007047cecd9" dependencies = [ "proc-macro2", "pyo3-macros-backend", @@ -3072,9 +3030,9 @@ dependencies = [ [[package]] name = "pyo3-macros-backend" -version = "0.24.1" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4cf6faa0cbfb0ed08e89beb8103ae9724eb4750e3a78084ba4017cbe94f3855" +checksum = "822ece1c7e1012745607d5cf0bcb2874769f0f7cb34c4cde03b9358eb9ef911a" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -3083,6 +3041,21 @@ dependencies = [ "syn 2.0.117", ] +[[package]] +name = "quanta" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3ab5a9d756f0d97bdc89019bd2e4ea098cf9cde50ee7564dde6b81ccc8f06c7" +dependencies = [ + "crossbeam-utils", + "libc", + "once_cell", + "raw-cpuid", + "wasi", + "web-sys", + "winapi", +] + [[package]] name = "quote" version = "1.0.40" @@ -3104,6 +3077,16 @@ version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" +[[package]] +name = "radix_trie" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" +dependencies = [ + "endian-type", + "nibble_vec", +] + [[package]] name = "rand" version = "0.8.6" @@ -3163,6 +3146,33 @@ dependencies = [ "getrandom 0.3.4", ] +[[package]] +name = "rand_xoshiro" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f703f4665700daf5512dcca5f43afa6af89f09db47fb56be587f80636bda2d41" +dependencies = [ + "rand_core 0.9.3", +] + +[[package]] +name = "rapidhash" +version = "4.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e48930979c155e2f33aa36ab3119b5ee81332beb6482199a8ecd6029b80b59" +dependencies = [ + "rustversion", +] + +[[package]] +name = "raw-cpuid" +version = "11.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" +dependencies = [ + "bitflags 2.11.0", +] + [[package]] name = "rayon" version = "1.10.0" @@ -3233,7 +3243,7 @@ checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom 0.2.14", "libredox", - "thiserror 1.0.58", + "thiserror 1.0.69", ] [[package]] @@ -3273,9 +3283,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.1" +version = "1.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba" dependencies = [ "aho-corasick", "memchr", @@ -3285,9 +3295,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" dependencies = [ "aho-corasick", "memchr", @@ -3296,9 +3306,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.5" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "regress" @@ -3366,7 +3376,7 @@ dependencies = [ "http 1.1.0", "http-body 1.0.0", "http-body-util", - "hyper 1.6.0", + "hyper 1.10.1", "hyper-tls 0.6.0", "hyper-util", "js-sys", @@ -3397,7 +3407,6 @@ dependencies = [ "adler", "anyhow", "bytes", - "cadence", "chrono", "cityhash-rs", "criterion", @@ -3405,11 +3414,13 @@ dependencies = [ "data-encoding", "futures", "httpmock", - "hyper 1.6.0", + "hyper 1.10.1", "insta", "json-schema-diff", "lz4_flex", "md5", + "metrics", + "metrics-exporter-dogstatsd", "once_cell", "parking_lot", "procspawn", @@ -3419,7 +3430,7 @@ dependencies = [ "rand 0.9.3", "regex", "reqwest 0.11.27", - "schemars", + "schemars 0.8.22", "scopeguard", "sentry", "sentry-kafka-schemas", @@ -3432,8 +3443,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_with", - "statsdproxy", - "thiserror 1.0.58", + "thiserror 1.0.69", "tikv-jemallocator", "tokio", "tokio-stream", @@ -3563,9 +3573,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.16" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" +checksum = "3fbf2ae1b8bc8e02df939598064d22402220cd5bbcca1c76f7d6a310974d5615" dependencies = [ "dyn-clone", "schemars_derive", @@ -3574,16 +3584,40 @@ dependencies = [ "uuid", ] +[[package]] +name = "schemars" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + +[[package]] +name = "schemars" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2b42f36aa1cd011945615b92222f6bf73c599a102a300334cd7f8dbeec726cc" +dependencies = [ + "dyn-clone", + "ref-cast", + "serde", + "serde_json", +] + [[package]] name = "schemars_derive" -version = "0.8.16" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" +checksum = "32e265784ad618884abaea0600a9adf15393368d840e0222d101a072f3f7534d" dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 1.0.109", + "syn 2.0.117", ] [[package]] @@ -3709,7 +3743,7 @@ dependencies = [ "jsonschema 0.18.3", "prettyplease", "prost", - "schemars", + "schemars 0.8.22", "sentry_protos", "serde", "serde_json", @@ -3814,7 +3848,7 @@ dependencies = [ "sentry-core", "serde", "serde_json", - "thiserror 1.0.58", + "thiserror 1.0.69", "tokio", "tracing", "uuid", @@ -3842,15 +3876,15 @@ dependencies = [ "rdkafka", "serde", "serde_json", - "thiserror 1.0.58", + "thiserror 1.0.69", "tracing", ] [[package]] name = "seq-macro" -version = "0.3.5" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" +checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc" [[package]] name = "serde" @@ -3884,13 +3918,13 @@ dependencies = [ [[package]] name = "serde_derive_internals" -version = "0.26.0" +version = "0.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" +checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.117", ] [[package]] @@ -3908,12 +3942,13 @@ dependencies = [ [[package]] name = "serde_path_to_error" -version = "0.1.16" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af99884400da37c88f5e9146b7f1fd0fbcae8f6eec4e9da38b67d05486f814a6" +checksum = "10a9ff822e371bb5403e391ecd83e182e0e77ba7f6fe0160b795797109d1b457" dependencies = [ "itoa", "serde", + "serde_core", ] [[package]] @@ -3952,17 +3987,19 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.8.1" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ad483d2ab0149d5a5ebcd9972a3852711e0153d863bf5a5d0391d28883c4a20" +checksum = "76a5c54c7310e7b8b9577c286d7e399ddd876c3e12b3ed917a8aabc4b96e9e8c" dependencies = [ "base64 0.22.1", + "bs58", "chrono", "hex", "indexmap 1.9.3", "indexmap 2.13.0", - "serde", - "serde_derive", + "schemars 0.9.0", + "schemars 1.2.1", + "serde_core", "serde_json", "serde_with_macros", "time", @@ -3970,9 +4007,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.8.1" +version = "3.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65569b702f41443e8bc8bbb1c5779bd0450bbe723b56198980e80ec45780bce2" +checksum = "84d57bc0c8b9a17920c178daa6bb924850d54a9c97ab45194bb8c17ad66bb660" dependencies = [ "darling", "proc-macro2", @@ -4030,16 +4067,6 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - [[package]] name = "signal-hook-registry" version = "1.4.1" @@ -4061,6 +4088,12 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "sketches-ddsketch" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c6f73aeb92d671e0cc4dca167e59b2deb6387c375391bc99ee743f326994a2b" + [[package]] name = "slab" version = "0.4.9" @@ -4118,25 +4151,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" -[[package]] -name = "statsdproxy" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad88f372ad4e60c8235f74feb2fcc047377c55b1872d0b9247b8a6aed8dcba9" -dependencies = [ - "anyhow", - "cadence", - "clap", - "crc32fast", - "env_logger", - "log", - "rand 0.8.6", - "serde", - "serde_yaml", - "signal-hook", - "thread_local", -] - [[package]] name = "string_cache" version = "0.8.7" @@ -4257,11 +4271,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.58" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03468839009160513471e86a034bb2c5c0e4baae3b43f79ffc55c4a5427b3297" +checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" dependencies = [ - "thiserror-impl 1.0.58", + "thiserror-impl 1.0.69", ] [[package]] @@ -4275,9 +4289,9 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "1.0.58" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" +checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", @@ -4385,29 +4399,43 @@ dependencies = [ "serde_json", ] +[[package]] +name = "tinyvec" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3e61e67053d25a4e82c844e8424039d9745781b3fc4f32b8d55ed50f5f667ef3" +dependencies = [ + "tinyvec_macros", +] + +[[package]] +name = "tinyvec_macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" + [[package]] name = "tokio" -version = "1.45.1" +version = "1.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ef51a33ef1da925cea3e4eb122833cb377c61439ca401b770f54902b806779" +checksum = "27ad5e34374e03cfffefc301becb44e9dc3c17584f414349ebe29ed26661822d" dependencies = [ - "backtrace", "bytes", "libc", "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", - "socket2 0.5.6", + "socket2 0.6.2", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.61.2", ] [[package]] name = "tokio-macros" -version = "2.5.0" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +checksum = "5c55a2eff8b69ce66c84f85e1da1c233edc36ceb85a2058d11b0d6a3c7e7569c" dependencies = [ "proc-macro2", "quote", @@ -4426,9 +4454,9 @@ dependencies = [ [[package]] name = "tokio-stream" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +checksum = "32da49809aab5c3bc678af03902d4ccddea2a87d028d86392a4b1560c6906c70" dependencies = [ "futures-core", "pin-project-lite", @@ -4476,11 +4504,11 @@ dependencies = [ "axum", "base64 0.22.1", "bytes", - "h2 0.4.7", + "h2 0.4.15", "http 1.1.0", "http-body 1.0.0", "http-body-util", - "hyper 1.6.0", + "hyper 1.10.1", "hyper-timeout", "hyper-util", "percent-encoding", @@ -4610,9 +4638,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.20" +version = "0.3.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +checksum = "cb7f578e5945fb242538965c2d0b04418d38ec25c79d160cd279bf0731c8d319" dependencies = [ "matchers", "nu-ansi-term", @@ -4668,10 +4696,10 @@ dependencies = [ "proc-macro2", "quote", "regress", - "schemars", + "schemars 0.8.22", "serde_json", "syn 2.0.117", - "thiserror 1.0.58", + "thiserror 1.0.69", "unicode-ident", ] @@ -4683,7 +4711,7 @@ checksum = "cc09508b72f63d521d68e42c7f172c7416d67986df44b3c7d1f7f9963948ed32" dependencies = [ "proc-macro2", "quote", - "schemars", + "schemars 0.8.22", "serde", "serde_json", "serde_tokenstream", @@ -4796,21 +4824,16 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - [[package]] name = "uuid" -version = "1.8.0" +version = "1.23.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0" +checksum = "144d6b123cef80b301b8f72a9e2ca4370ddec21950d0a103dd22c437006d2db7" dependencies = [ - "atomic", - "getrandom 0.2.14", - "serde", + "getrandom 0.4.2", + "js-sys", + "serde_core", + "wasm-bindgen", ] [[package]] @@ -5131,6 +5154,15 @@ dependencies = [ "windows-targets 0.53.5", ] +[[package]] +name = "windows-sys" +version = "0.61.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" +dependencies = [ + "windows-link 0.2.1", +] + [[package]] name = "windows-targets" version = "0.48.5" diff --git a/rust_snuba/Cargo.toml b/rust_snuba/Cargo.toml index c2ec02222d2..a748d379fce 100644 --- a/rust_snuba/Cargo.toml +++ b/rust_snuba/Cargo.toml @@ -23,25 +23,26 @@ crate-type = ["cdylib", "rlib"] [dependencies] adler = "1.0.2" -anyhow = { version = "1.0.69", features = ["backtrace"] } -cadence = "1.0.0" -chrono = { version = "0.4.26", features = ["serde"] } +anyhow = { version = "1.0.102", features = ["backtrace"] } +chrono = { version = "0.4.44", features = ["serde"] } cityhash-rs = "1.0.1" -ctrlc = { version = "3.2.5", features = ["termination"] } -data-encoding = "2.5.0" -futures = "0.3.21" -hyper = "1.2.0" -json-schema-diff = "0.1.7" +ctrlc = { version = "3.5.2", features = ["termination"] } +data-encoding = "2.10.0" +futures = "0.3.32" +hyper = "1.8.1" +json-schema-diff = "0.1.8" lz4_flex = "0.11" md5 = "0.7.0" -parking_lot = "0.12.1" -procspawn = { version = "1.0.0", features = ["json"] } -prost = "0.14" -pyo3 = { version = "0.24.1", features = ["chrono"] } +metrics = "0.24.3" +metrics-exporter-dogstatsd = "0.9.6" +parking_lot = "0.12.5" +procspawn = { version = "1.0.1", features = ["json"] } +prost = "0.14.3" +pyo3 = { version = "0.24.2", features = ["chrono"] } rand = "0.9.3" -regex = "1.11.1" -reqwest = { version = "0.11.11", features = ["stream"] } -schemars = { version = "0.8.16", features = ["uuid1"] } +regex = "1.12.3" +reqwest = { version = "0.11.27", features = ["stream"] } +schemars = { version = "0.8.22", features = ["uuid1"] } sentry = { version = "0.41.0", default-features = false, features = [ # default features, except `release-health` is disabled "backtrace", @@ -59,34 +60,33 @@ sentry-options = "1.0.11" sentry_protos = "0.32.0" sentry_arroyo = { version = "2.40.0", features = ["ssl"] } sentry_usage_accountant = { version = "0.1.2", features = ["kafka"] } -seq-macro = "0.3" -serde = { version = "1.0", features = ["derive"] } -serde_json = { version = "1.0" } -serde_path_to_error = "0.1.15" -serde_with = "3.8.1" -statsdproxy = { version = "0.4.1", features = ["cadence"] } -thiserror = "1.0" -tokio = { version = "1.38.2", features = ["full"] } -tokio-stream = "0.1.15" -tracing = "0.1.40" -tracing-subscriber = { version = "0.3.20", features = ["env-filter", "json"] } -uuid = { version = "1.5.0", features = ["v4", "v7"] } -zstd = "0.12.3" -bytes = "1.11" +seq-macro = "0.3.6" +serde = { version = "1.0.228", features = ["derive"] } +serde_json = { version = "1.0.149" } +serde_path_to_error = "0.1.20" +serde_with = "3.17.0" +thiserror = "1.0.69" +tokio = { version = "1.50.0", features = ["full"] } +tokio-stream = "0.1.18" +tracing = "0.1.44" +tracing-subscriber = { version = "0.3.22", features = ["env-filter", "json"] } +uuid = { version = "1.21.0", features = ["v4", "v7"] } +zstd = "0.12.4" +bytes = "1.11.1" [dev-dependencies] scopeguard = "1.2.0" criterion = "0.5.1" httpmock = "0.7.0" -prost-types = "0.14" -insta = { version = "1.34.0", features = ["json", "redactions"] } -once_cell = "1.18.0" -procspawn = { version = "1.0.0", features = ["test-support", "json"] } +prost-types = "0.14.3" +insta = { version = "1.46.3", features = ["json", "redactions"] } +once_cell = "1.21.3" +procspawn = { version = "1.0.1", features = ["test-support", "json"] } pyo3 = { version = "*", features = ["auto-initialize"] } [target.'cfg(not(target_env = "msvc"))'.dev-dependencies] -tikv-jemallocator = "0.5" +tikv-jemallocator = "0.5.4" [[bench]] name = "processors" diff --git a/rust_snuba/benches/processors.rs b/rust_snuba/benches/processors.rs index 8f6793224b3..b7c3ebd49d5 100644 --- a/rust_snuba/benches/processors.rs +++ b/rust_snuba/benches/processors.rs @@ -7,9 +7,9 @@ use criterion::{black_box, BenchmarkGroup, BenchmarkId, Criterion, Throughput}; use once_cell::sync::Lazy; use parking_lot::Mutex; use rust_snuba::{ - BatchSizeCalculation, BrokerConfig, ClickhouseConfig, ConsumerStrategyFactoryV2, EnvConfig, - KafkaMessageMetadata, MessageProcessorConfig, ProcessingFunction, ProcessingFunctionType, - ProcessorConfig, StatsDBackend, StorageConfig, TopicConfig, PROCESSORS, + BatchSizeCalculation, BrokerConfig, ClickhouseConfig, ConsumerStrategyFactoryV2, + DogStatsDBackend, EnvConfig, KafkaMessageMetadata, MessageProcessorConfig, ProcessingFunction, + ProcessingFunctionType, ProcessorConfig, StorageConfig, TopicConfig, PROCESSORS, }; use sentry_arroyo::backends::kafka::types::KafkaPayload; use sentry_arroyo::backends::local::broker::LocalBroker; @@ -209,7 +209,13 @@ fn run_processor_bench( fn main() { // this sends to nowhere, but because it's UDP we won't error. - metrics::init(StatsDBackend::new("127.0.0.1", 8081, "snuba.consumer")).unwrap(); + metrics::init(DogStatsDBackend::new_udp( + "127.0.0.1", + 8081, + "snuba.consumer", + &[], + )) + .unwrap(); let mut c = Criterion::default().configure_from_args(); diff --git a/rust_snuba/src/accepted_outcomes_consumer.rs b/rust_snuba/src/accepted_outcomes_consumer.rs index 756835e0f83..dee73cf7daf 100644 --- a/rust_snuba/src/accepted_outcomes_consumer.rs +++ b/rust_snuba/src/accepted_outcomes_consumer.rs @@ -19,7 +19,7 @@ use pyo3::prelude::*; use crate::config; use crate::logging::{setup_logging, setup_sentry}; use crate::metrics::global_tags::set_global_tag; -use crate::metrics::statsd::StatsDBackend; +use crate::metrics::statsd::DogStatsDBackend; use crate::strategies::accepted_outcomes::aggregator::OutcomesAggregator; use crate::strategies::accepted_outcomes::commit_outcomes::CommitOutcomes; use crate::strategies::accepted_outcomes::produce_outcome::ProduceAcceptedOutcome; @@ -137,20 +137,48 @@ pub fn accepted_outcomes_consumer_impl( } // setup arroyo metrics - if let (Some(host), Some(port)) = ( - consumer_config.env.dogstatsd_host, - consumer_config.env.dogstatsd_port, - ) { + { let storage_name = consumer_config .storages .iter() .map(|s| s.name.clone()) .collect::>() .join(","); - set_global_tag("storage".to_owned(), storage_name); - set_global_tag("consumer_group".to_owned(), consumer_group.to_owned()); - metrics::init(StatsDBackend::new(&host, port, "snuba.consumer")).unwrap(); + // Set tags on Sentry scope for error observability + sentry::configure_scope(|scope| { + scope.set_tag("storage", &storage_name); + scope.set_tag("consumer_group", consumer_group); + }); + + let tags = [ + ("storage", storage_name.clone()), + ("consumer_group", consumer_group.to_owned()), + ]; + + let backend = if let Some(socket_path) = consumer_config.env.dogstatsd_socket_path.clone() { + Some(DogStatsDBackend::new_uds( + &socket_path, + "snuba.consumer", + &tags, + )) + } else if let (Some(host), Some(port)) = ( + consumer_config.env.dogstatsd_host, + consumer_config.env.dogstatsd_port, + ) { + Some(DogStatsDBackend::new_udp( + &host, + port, + "snuba.consumer", + &tags, + )) + } else { + None + }; + + if let Some(backend) = backend { + metrics::init(backend).unwrap(); + } } // DLQ setup diff --git a/rust_snuba/src/config.rs b/rust_snuba/src/config.rs index 8754d412723..a75104aca1e 100644 --- a/rust_snuba/src/config.rs +++ b/rust_snuba/src/config.rs @@ -116,6 +116,7 @@ pub struct EnvConfig { pub sentry_dsn: Option, pub dogstatsd_host: Option, pub dogstatsd_port: Option, + pub dogstatsd_socket_path: Option, pub default_retention_days: u16, pub lower_retention_days: u16, pub valid_retention_days: HashSet, @@ -129,6 +130,7 @@ impl Default for EnvConfig { sentry_dsn: None, dogstatsd_host: None, dogstatsd_port: None, + dogstatsd_socket_path: None, default_retention_days: 90, lower_retention_days: 30, valid_retention_days: [30, 60, 90].iter().cloned().collect(), diff --git a/rust_snuba/src/consumer.rs b/rust_snuba/src/consumer.rs index ff3e33b52d0..9aaf185d4c1 100644 --- a/rust_snuba/src/consumer.rs +++ b/rust_snuba/src/consumer.rs @@ -21,8 +21,7 @@ use sentry_options::init_with_schemas; use crate::config; use crate::factory_v2::ConsumerStrategyFactoryV2; use crate::logging::{setup_logging, setup_sentry}; -use crate::metrics::global_tags::set_global_tag; -use crate::metrics::statsd::StatsDBackend; +use crate::metrics::statsd::DogStatsDBackend; use crate::processors; use crate::rebalancing; use crate::types::{InsertOrReplacement, KafkaMessageMetadata}; @@ -144,20 +143,48 @@ pub fn consumer_impl( } // setup arroyo metrics - if let (Some(host), Some(port)) = ( - consumer_config.env.dogstatsd_host, - consumer_config.env.dogstatsd_port, - ) { + { let storage_name = consumer_config .storages .iter() .map(|s| s.name.clone()) .collect::>() .join(","); - set_global_tag("storage".to_owned(), storage_name); - set_global_tag("consumer_group".to_owned(), consumer_group.to_owned()); - metrics::init(StatsDBackend::new(&host, port, "snuba.consumer")).unwrap(); + // Set tags on Sentry scope for error observability + sentry::configure_scope(|scope| { + scope.set_tag("storage", &storage_name); + scope.set_tag("consumer_group", consumer_group); + }); + + let tags = [ + ("storage", storage_name.clone()), + ("consumer_group", consumer_group.to_owned()), + ]; + + let backend = if let Some(socket_path) = env_config.dogstatsd_socket_path.clone() { + Some(DogStatsDBackend::new_uds( + &socket_path, + "snuba.consumer", + &tags, + )) + } else if let (Some(host), Some(port)) = ( + consumer_config.env.dogstatsd_host, + consumer_config.env.dogstatsd_port, + ) { + Some(DogStatsDBackend::new_udp( + &host, + port, + "snuba.consumer", + &tags, + )) + } else { + None + }; + + if let Some(backend) = backend { + metrics::init(backend).unwrap(); + } } if !use_rust_processor { diff --git a/rust_snuba/src/factory_v2.rs b/rust_snuba/src/factory_v2.rs index 83acfeb9503..bf4abbd4ed9 100644 --- a/rust_snuba/src/factory_v2.rs +++ b/rust_snuba/src/factory_v2.rs @@ -162,6 +162,7 @@ impl ProcessingStrategyFactory for ConsumerStrategyFactoryV2 { insert_columns, ); + #[allow(clippy::result_large_err)] let accumulator = Arc::new( |batch: BytesInsertBatch, small_batch: Message>| { Ok(batch.merge(small_batch.into_payload())) diff --git a/rust_snuba/src/lib.rs b/rust_snuba/src/lib.rs index 7fd2bedde6f..2a03900a7dc 100644 --- a/rust_snuba/src/lib.rs +++ b/rust_snuba/src/lib.rs @@ -35,7 +35,7 @@ pub use config::{ ProcessorConfig, StorageConfig, TopicConfig, }; pub use factory_v2::ConsumerStrategyFactoryV2; -pub use metrics::statsd::StatsDBackend; +pub use metrics::statsd::DogStatsDBackend; pub use processors::{ProcessingFunction, ProcessingFunctionType, PROCESSORS}; pub use strategies::noop::Noop; pub use strategies::python::PythonTransformStep; diff --git a/rust_snuba/src/metrics/global_tags.rs b/rust_snuba/src/metrics/global_tags.rs index 8d5177ae568..a26ab87ae6a 100644 --- a/rust_snuba/src/metrics/global_tags.rs +++ b/rust_snuba/src/metrics/global_tags.rs @@ -1,125 +1,60 @@ use std::collections::BTreeMap; +use std::sync::{LazyLock, RwLock}; -use parking_lot::RwLock; -use statsdproxy::middleware::Middleware; -use statsdproxy::types::Metric; - -static GLOBAL_TAGS: RwLock> = RwLock::new(BTreeMap::new()); +static GLOBAL_TAGS: LazyLock>> = + LazyLock::new(|| RwLock::new(BTreeMap::new())); +/// Sets a tag on the current Sentry scope and stores it for DogStatsD metrics. pub fn set_global_tag(key: String, value: String) { sentry::configure_scope(|scope| { scope.set_tag(&key, &value); }); - GLOBAL_TAGS.write().insert(key, value); -} - -pub struct AddGlobalTags<'a, M> { - next: M, - global_tags: &'a RwLock>, -} - -impl AddGlobalTags<'static, M> -where - M: Middleware, -{ - pub fn new(next: M) -> Self { - Self::new_with_tagmap(next, &GLOBAL_TAGS) - } + GLOBAL_TAGS.write().unwrap().insert(key, value); } -impl<'a, M> AddGlobalTags<'a, M> -where - M: Middleware, -{ - fn new_with_tagmap(next: M, global_tags: &'a RwLock>) -> Self { - AddGlobalTags { next, global_tags } - } -} - -impl Middleware for AddGlobalTags<'_, M> -where - M: Middleware, -{ - fn poll(&mut self) { - self.next.poll() - } - - fn submit(&mut self, metric: &mut Metric) { - let global_tags = self.global_tags.read(); - - if global_tags.is_empty() { - return self.next.submit(metric); - } - - let mut tag_buffer: Vec = Vec::new(); - let mut add_comma = false; - match metric.tags() { - Some(tags) if !tags.is_empty() => { - tag_buffer.extend(tags); - add_comma = true; - } - _ => (), - } - for (k, v) in global_tags.iter() { - if add_comma { - tag_buffer.push(b','); - } - tag_buffer.extend(k.as_bytes()); - tag_buffer.push(b':'); - tag_buffer.extend(v.as_bytes()); - add_comma = true; - } - - metric.set_tags(&tag_buffer); - - self.next.submit(metric) - } +pub fn get_global_tags() -> Vec<(String, String)> { + GLOBAL_TAGS + .read() + .unwrap() + .iter() + .map(|(k, v)| (k.clone(), v.clone())) + .collect() } #[cfg(test)] mod tests { use super::*; - use std::cell::RefCell; - use std::collections::BTreeMap; - - use statsdproxy::{middleware::Middleware, types::Metric}; - - struct FnStep(pub F); + #[test] + fn test_set_and_get_global_tags() { + set_global_tag("env".to_owned(), "production".to_owned()); + set_global_tag("region".to_owned(), "us-east".to_owned()); - impl Middleware for FnStep - where - F: FnMut(&mut Metric), - { - fn submit(&mut self, metric: &mut Metric) { - (self.0)(metric) - } + let tags = get_global_tags(); + assert!(tags.contains(&("env".to_owned(), "production".to_owned()))); + assert!(tags.contains(&("region".to_owned(), "us-east".to_owned()))); } #[test] - fn test_basic() { - let test_cases = [ - // Without tags - ("users.online:1|c", "users.online:1|c|#env:prod"), - // With tags - ( - "users.online:1|c|#tag1:a", - "users.online:1|c|#tag1:a,env:prod", - ), - ]; - - for test_case in test_cases { - let results = RefCell::new(vec![]); - let global_tags = RwLock::new(BTreeMap::from([("env".to_owned(), "prod".to_owned())])); - - let step = FnStep(|metric: &mut Metric| results.borrow_mut().push(metric.clone())); - let mut middleware = AddGlobalTags::new_with_tagmap(step, &global_tags); + fn test_overwrite_global_tag() { + set_global_tag("env".to_owned(), "staging".to_owned()); + set_global_tag("env".to_owned(), "production".to_owned()); + + let tags = get_global_tags(); + let env_tags: Vec<_> = tags.iter().filter(|(k, _)| k == "env").collect(); + assert_eq!(env_tags.len(), 1); + assert_eq!(env_tags[0].1, "production"); + } - let mut metric = Metric::new(test_case.0.as_bytes().to_vec()); - middleware.submit(&mut metric); - assert_eq!(results.borrow().len(), 1); - let updated_metric = Metric::new(results.borrow_mut()[0].raw.clone()); - assert_eq!(updated_metric.raw, test_case.1.as_bytes()); - } + #[test] + fn test_tags_sorted_by_key() { + set_global_tag("z_key".to_owned(), "z_val".to_owned()); + set_global_tag("a_key".to_owned(), "a_val".to_owned()); + + let tags = get_global_tags(); + let keys: Vec<_> = tags.iter().map(|(k, _)| k.clone()).collect(); + let mut sorted_keys = keys.clone(); + sorted_keys.sort(); + assert_eq!(keys, sorted_keys); } } diff --git a/rust_snuba/src/metrics/statsd.rs b/rust_snuba/src/metrics/statsd.rs index de7d91be2aa..d1114d8509e 100644 --- a/rust_snuba/src/metrics/statsd.rs +++ b/rust_snuba/src/metrics/statsd.rs @@ -1,56 +1,99 @@ -use std::time::Duration; +use metrics::Label; +use metrics_exporter_dogstatsd::DogStatsDBuilder; +use sentry_arroyo::metrics::{Metric, MetricType, MetricValue, Recorder}; -use sentry_arroyo::metrics::{Metric, MetricSink, Recorder, StatsdRecorder}; -use statsdproxy::cadence::StatsdProxyMetricSink; -use statsdproxy::config::AggregateMetricsConfig; -use statsdproxy::middleware::aggregate::AggregateMetrics; -use statsdproxy::middleware::upstream::Upstream; - -use crate::metrics::global_tags::AddGlobalTags; +use crate::metrics::global_tags::get_global_tags; +/// A metrics backend that uses `metrics-exporter-dogstatsd` to send metrics +/// to DogStatsD over UDP or Unix domain sockets. Adapts arroyo's [`Recorder`] +/// trait to the `metrics` crate facade installed by the exporter. #[derive(Debug)] -pub struct StatsDBackend { - recorder: StatsdRecorder, -} +pub struct DogStatsDBackend; -impl Recorder for StatsDBackend { - fn record_metric(&self, metric: Metric<'_>) { - self.recorder.record_metric(metric) +impl DogStatsDBackend { + pub fn new_udp(host: &str, port: u16, prefix: &str, tags: &[(&str, String)]) -> Self { + let addr = format!("{host}:{port}"); + Self::build(&addr, prefix, tags) } -} - -struct Wrapper(Box); -impl MetricSink for Wrapper { - fn emit(&self, metric: &str) { - let _ = self.0.emit(metric); + pub fn new_uds(socket_path: &str, prefix: &str, tags: &[(&str, String)]) -> Self { + let addr = format!("unixgram://{socket_path}"); + Self::build(&addr, prefix, tags) } -} -impl StatsDBackend { - pub fn new(host: &str, port: u16, prefix: &str) -> Self { - let upstream_addr = format!("{host}:{port}"); - let aggregator_sink = StatsdProxyMetricSink::new(move || { - let upstream = Upstream::new(upstream_addr.clone()).unwrap(); + fn build(addr: &str, prefix: &str, tags: &[(&str, String)]) -> Self { + let global_labels: Vec