semantic bufo search find-bufo.com
bufo

add logfire opentelemetry instrumentation #1

merged opened by zzstoatzz.io targeting main from feature/logfire-integration
  • replace env_logger with logfire for structured observability
  • add opentelemetry middleware for automatic http request tracing
  • instrument search operations with custom spans:
    • embedding generation
    • vector search
    • bm25 search
    • reciprocal rank fusion
  • remove unused upsert method and struct from turbopuffer client (ingestion script calls api directly, not used by main application)

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

Labels

None yet.

assignee

None yet.

Participants 1
AT URI
at://did:plc:xbtmt2zjwlrfegqvch7fboei/sh.tangled.repo.pull/3m3t2g6doh522
+965 -208
Diff #0
+889 -140
Cargo.lock
··· 99 99 "mime", 100 100 "percent-encoding", 101 101 "pin-project-lite", 102 - "rand", 102 + "rand 0.9.2", 103 103 "sha1", 104 104 "smallvec", 105 105 "tokio", ··· 272 272 checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" 273 273 274 274 [[package]] 275 - name = "anstream" 276 - version = "0.6.21" 275 + name = "android_system_properties" 276 + version = "0.1.5" 277 277 source = "registry+https://github.com/rust-lang/crates.io-index" 278 - checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" 278 + checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 279 279 dependencies = [ 280 - "anstyle", 281 - "anstyle-parse", 282 - "anstyle-query", 283 - "anstyle-wincon", 284 - "colorchoice", 285 - "is_terminal_polyfill", 286 - "utf8parse", 280 + "libc", 287 281 ] 288 282 289 283 [[package]] 290 - name = "anstyle" 291 - version = "1.0.13" 284 + name = "anyhow" 285 + version = "1.0.100" 292 286 source = "registry+https://github.com/rust-lang/crates.io-index" 293 - checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78" 287 + checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" 294 288 295 289 [[package]] 296 - name = "anstyle-parse" 297 - version = "0.2.7" 290 + name = "async-stream" 291 + version = "0.3.6" 298 292 source = "registry+https://github.com/rust-lang/crates.io-index" 299 - checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" 293 + checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" 300 294 dependencies = [ 301 - "utf8parse", 295 + "async-stream-impl", 296 + "futures-core", 297 + "pin-project-lite", 302 298 ] 303 299 304 300 [[package]] 305 - name = "anstyle-query" 306 - version = "1.1.4" 301 + name = "async-stream-impl" 302 + version = "0.3.6" 307 303 source = "registry+https://github.com/rust-lang/crates.io-index" 308 - checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" 304 + checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" 309 305 dependencies = [ 310 - "windows-sys 0.60.2", 306 + "proc-macro2", 307 + "quote", 308 + "syn", 311 309 ] 312 310 313 311 [[package]] 314 - name = "anstyle-wincon" 315 - version = "3.0.10" 312 + name = "async-trait" 313 + version = "0.1.89" 316 314 source = "registry+https://github.com/rust-lang/crates.io-index" 317 - checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" 315 + checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" 318 316 dependencies = [ 319 - "anstyle", 320 - "once_cell_polyfill", 321 - "windows-sys 0.60.2", 317 + "proc-macro2", 318 + "quote", 319 + "syn", 322 320 ] 323 321 324 - [[package]] 325 - name = "anyhow" 326 - version = "1.0.100" 327 - source = "registry+https://github.com/rust-lang/crates.io-index" 328 - checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" 329 - 330 322 [[package]] 331 323 name = "atomic-waker" 332 324 version = "1.1.2" 333 325 source = "registry+https://github.com/rust-lang/crates.io-index" 334 326 checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 335 327 328 + [[package]] 329 + name = "autocfg" 330 + version = "1.5.0" 331 + source = "registry+https://github.com/rust-lang/crates.io-index" 332 + checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 333 + 334 + [[package]] 335 + name = "axum" 336 + version = "0.7.9" 337 + source = "registry+https://github.com/rust-lang/crates.io-index" 338 + checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" 339 + dependencies = [ 340 + "async-trait", 341 + "axum-core", 342 + "bytes", 343 + "futures-util", 344 + "http 1.3.1", 345 + "http-body", 346 + "http-body-util", 347 + "itoa", 348 + "matchit", 349 + "memchr", 350 + "mime", 351 + "percent-encoding", 352 + "pin-project-lite", 353 + "rustversion", 354 + "serde", 355 + "sync_wrapper", 356 + "tower 0.5.2", 357 + "tower-layer", 358 + "tower-service", 359 + ] 360 + 361 + [[package]] 362 + name = "axum-core" 363 + version = "0.4.5" 364 + source = "registry+https://github.com/rust-lang/crates.io-index" 365 + checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" 366 + dependencies = [ 367 + "async-trait", 368 + "bytes", 369 + "futures-util", 370 + "http 1.3.1", 371 + "http-body", 372 + "http-body-util", 373 + "mime", 374 + "pin-project-lite", 375 + "rustversion", 376 + "sync_wrapper", 377 + "tower-layer", 378 + "tower-service", 379 + ] 380 + 336 381 [[package]] 337 382 name = "base64" 338 383 version = "0.22.1" ··· 415 460 checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" 416 461 417 462 [[package]] 418 - name = "colorchoice" 419 - version = "1.0.4" 463 + name = "cfg_aliases" 464 + version = "0.2.1" 420 465 source = "registry+https://github.com/rust-lang/crates.io-index" 421 - checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" 466 + checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 467 + 468 + [[package]] 469 + name = "chrono" 470 + version = "0.4.42" 471 + source = "registry+https://github.com/rust-lang/crates.io-index" 472 + checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" 473 + dependencies = [ 474 + "iana-time-zone", 475 + "js-sys", 476 + "num-traits", 477 + "wasm-bindgen", 478 + "windows-link 0.2.1", 479 + ] 422 480 423 481 [[package]] 424 482 name = "cookie" ··· 441 499 "libc", 442 500 ] 443 501 502 + [[package]] 503 + name = "core-foundation" 504 + version = "0.10.1" 505 + source = "registry+https://github.com/rust-lang/crates.io-index" 506 + checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" 507 + dependencies = [ 508 + "core-foundation-sys", 509 + "libc", 510 + ] 511 + 444 512 [[package]] 445 513 name = "core-foundation-sys" 446 514 version = "0.8.7" ··· 552 620 source = "registry+https://github.com/rust-lang/crates.io-index" 553 621 checksum = "77c90badedccf4105eca100756a0b1289e191f6fcbdadd3cee1d2f614f97da8f" 554 622 623 + [[package]] 624 + name = "either" 625 + version = "1.15.0" 626 + source = "registry+https://github.com/rust-lang/crates.io-index" 627 + checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 628 + 555 629 [[package]] 556 630 name = "encoding_rs" 557 631 version = "0.8.35" ··· 571 645 "regex", 572 646 ] 573 647 574 - [[package]] 575 - name = "env_logger" 576 - version = "0.11.8" 577 - source = "registry+https://github.com/rust-lang/crates.io-index" 578 - checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" 579 - dependencies = [ 580 - "anstream", 581 - "anstyle", 582 - "env_filter", 583 - "jiff", 584 - "log", 585 - ] 586 - 587 648 [[package]] 588 649 name = "equivalent" 589 650 version = "1.0.2" ··· 617 678 "anyhow", 618 679 "base64", 619 680 "dotenv", 620 - "env_logger", 621 681 "log", 682 + "logfire", 683 + "opentelemetry 0.26.0", 684 + "opentelemetry-instrumentation-actix-web", 685 + "opentelemetry-otlp 0.26.0", 622 686 "reqwest", 623 687 "serde", 624 688 "serde_json", 625 - "thiserror", 689 + "thiserror 1.0.69", 626 690 "tokio", 691 + "tracing", 627 692 ] 628 693 629 694 [[package]] ··· 790 855 checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 791 856 dependencies = [ 792 857 "cfg-if", 858 + "js-sys", 793 859 "libc", 794 860 "wasi", 861 + "wasm-bindgen", 795 862 ] 796 863 797 864 [[package]] ··· 808 875 "wasm-bindgen", 809 876 ] 810 877 878 + [[package]] 879 + name = "glob" 880 + version = "0.3.3" 881 + source = "registry+https://github.com/rust-lang/crates.io-index" 882 + checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" 883 + 811 884 [[package]] 812 885 name = "governor" 813 886 version = "0.10.1" ··· 825 898 "parking_lot", 826 899 "portable-atomic", 827 900 "quanta", 828 - "rand", 901 + "rand 0.9.2", 829 902 "smallvec", 830 903 "spinning_top", 831 904 "web-time", ··· 843 916 "futures-sink", 844 917 "futures-util", 845 918 "http 0.2.12", 846 - "indexmap", 919 + "indexmap 2.12.0", 847 920 "slab", 848 921 "tokio", 849 922 "tokio-util", ··· 862 935 "futures-core", 863 936 "futures-sink", 864 937 "http 1.3.1", 865 - "indexmap", 938 + "indexmap 2.12.0", 866 939 "slab", 867 940 "tokio", 868 941 "tokio-util", 869 942 "tracing", 870 943 ] 871 944 945 + [[package]] 946 + name = "hashbrown" 947 + version = "0.12.3" 948 + source = "registry+https://github.com/rust-lang/crates.io-index" 949 + checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 950 + 872 951 [[package]] 873 952 name = "hashbrown" 874 953 version = "0.14.5" ··· 969 1048 "http 1.3.1", 970 1049 "http-body", 971 1050 "httparse", 1051 + "httpdate", 972 1052 "itoa", 973 1053 "pin-project-lite", 974 1054 "pin-utils", ··· 987 1067 "hyper", 988 1068 "hyper-util", 989 1069 "rustls", 1070 + "rustls-native-certs", 990 1071 "rustls-pki-types", 991 1072 "tokio", 992 1073 "tokio-rustls", 993 1074 "tower-service", 994 1075 ] 995 1076 1077 + [[package]] 1078 + name = "hyper-timeout" 1079 + version = "0.5.2" 1080 + source = "registry+https://github.com/rust-lang/crates.io-index" 1081 + checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" 1082 + dependencies = [ 1083 + "hyper", 1084 + "hyper-util", 1085 + "pin-project-lite", 1086 + "tokio", 1087 + "tower-service", 1088 + ] 1089 + 996 1090 [[package]] 997 1091 name = "hyper-tls" 998 1092 version = "0.6.0" ··· 1035 1129 "windows-registry", 1036 1130 ] 1037 1131 1132 + [[package]] 1133 + name = "iana-time-zone" 1134 + version = "0.1.64" 1135 + source = "registry+https://github.com/rust-lang/crates.io-index" 1136 + checksum = "33e57f83510bb73707521ebaffa789ec8caf86f9657cad665b092b581d40e9fb" 1137 + dependencies = [ 1138 + "android_system_properties", 1139 + "core-foundation-sys", 1140 + "iana-time-zone-haiku", 1141 + "js-sys", 1142 + "log", 1143 + "wasm-bindgen", 1144 + "windows-core", 1145 + ] 1146 + 1147 + [[package]] 1148 + name = "iana-time-zone-haiku" 1149 + version = "0.1.2" 1150 + source = "registry+https://github.com/rust-lang/crates.io-index" 1151 + checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 1152 + dependencies = [ 1153 + "cc", 1154 + ] 1155 + 1038 1156 [[package]] 1039 1157 name = "icu_collections" 1040 1158 version = "2.0.0" ··· 1148 1266 source = "registry+https://github.com/rust-lang/crates.io-index" 1149 1267 checksum = "e8a5a9a0ff0086c7a148acb942baaabeadf9504d10400b5a05645853729b9cd2" 1150 1268 1269 + [[package]] 1270 + name = "indexmap" 1271 + version = "1.9.3" 1272 + source = "registry+https://github.com/rust-lang/crates.io-index" 1273 + checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 1274 + dependencies = [ 1275 + "autocfg", 1276 + "hashbrown 0.12.3", 1277 + ] 1278 + 1151 1279 [[package]] 1152 1280 name = "indexmap" 1153 1281 version = "2.12.0" ··· 1175 1303 ] 1176 1304 1177 1305 [[package]] 1178 - name = "is_terminal_polyfill" 1179 - version = "1.70.2" 1306 + name = "itertools" 1307 + version = "0.14.0" 1180 1308 source = "registry+https://github.com/rust-lang/crates.io-index" 1181 - checksum = "a6cb138bb79a146c1bd460005623e142ef0181e3d0219cb493e02f7d08a35695" 1309 + checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" 1310 + dependencies = [ 1311 + "either", 1312 + ] 1182 1313 1183 1314 [[package]] 1184 1315 name = "itoa" ··· 1186 1317 source = "registry+https://github.com/rust-lang/crates.io-index" 1187 1318 checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 1188 1319 1189 - [[package]] 1190 - name = "jiff" 1191 - version = "0.2.15" 1192 - source = "registry+https://github.com/rust-lang/crates.io-index" 1193 - checksum = "be1f93b8b1eb69c77f24bbb0afdf66f54b632ee39af40ca21c4365a1d7347e49" 1194 - dependencies = [ 1195 - "jiff-static", 1196 - "log", 1197 - "portable-atomic", 1198 - "portable-atomic-util", 1199 - "serde", 1200 - ] 1201 - 1202 - [[package]] 1203 - name = "jiff-static" 1204 - version = "0.2.15" 1205 - source = "registry+https://github.com/rust-lang/crates.io-index" 1206 - checksum = "03343451ff899767262ec32146f6d559dd759fdadf42ff0e227c7c48f72594b4" 1207 - dependencies = [ 1208 - "proc-macro2", 1209 - "quote", 1210 - "syn", 1211 - ] 1212 - 1213 1320 [[package]] 1214 1321 name = "jobserver" 1215 1322 version = "0.1.34" ··· 1236 1343 source = "registry+https://github.com/rust-lang/crates.io-index" 1237 1344 checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" 1238 1345 1346 + [[package]] 1347 + name = "lazy_static" 1348 + version = "1.5.0" 1349 + source = "registry+https://github.com/rust-lang/crates.io-index" 1350 + checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 1351 + 1239 1352 [[package]] 1240 1353 name = "libc" 1241 1354 version = "0.2.177" ··· 1286 1399 source = "registry+https://github.com/rust-lang/crates.io-index" 1287 1400 checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" 1288 1401 1402 + [[package]] 1403 + name = "logfire" 1404 + version = "0.8.2" 1405 + source = "registry+https://github.com/rust-lang/crates.io-index" 1406 + checksum = "ecdeef502337c0cb7ab6646e79a8198aedddbbaa6351b6f9a2ccfb1bb0ed2cf7" 1407 + dependencies = [ 1408 + "chrono", 1409 + "env_filter", 1410 + "futures-util", 1411 + "log", 1412 + "nu-ansi-term", 1413 + "opentelemetry 0.30.0", 1414 + "opentelemetry-otlp 0.30.0", 1415 + "opentelemetry_sdk 0.30.0", 1416 + "rand 0.9.2", 1417 + "regex", 1418 + "serde", 1419 + "serde_json", 1420 + "thiserror 2.0.17", 1421 + "tokio", 1422 + "tracing", 1423 + "tracing-opentelemetry", 1424 + "tracing-subscriber", 1425 + ] 1426 + 1427 + [[package]] 1428 + name = "lru-slab" 1429 + version = "0.1.2" 1430 + source = "registry+https://github.com/rust-lang/crates.io-index" 1431 + checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" 1432 + 1433 + [[package]] 1434 + name = "matchers" 1435 + version = "0.2.0" 1436 + source = "registry+https://github.com/rust-lang/crates.io-index" 1437 + checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" 1438 + dependencies = [ 1439 + "regex-automata", 1440 + ] 1441 + 1442 + [[package]] 1443 + name = "matchit" 1444 + version = "0.7.3" 1445 + source = "registry+https://github.com/rust-lang/crates.io-index" 1446 + checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" 1447 + 1289 1448 [[package]] 1290 1449 name = "memchr" 1291 1450 version = "2.7.6" ··· 1342 1501 "openssl-probe", 1343 1502 "openssl-sys", 1344 1503 "schannel", 1345 - "security-framework", 1504 + "security-framework 2.11.1", 1346 1505 "security-framework-sys", 1347 1506 "tempfile", 1348 1507 ] ··· 1353 1512 source = "registry+https://github.com/rust-lang/crates.io-index" 1354 1513 checksum = "38bf9645c8b145698bb0b18a4637dcacbc421ea49bef2317e4fd8065a387cf21" 1355 1514 1515 + [[package]] 1516 + name = "nu-ansi-term" 1517 + version = "0.50.3" 1518 + source = "registry+https://github.com/rust-lang/crates.io-index" 1519 + checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" 1520 + dependencies = [ 1521 + "windows-sys 0.61.2", 1522 + ] 1523 + 1356 1524 [[package]] 1357 1525 name = "num-conv" 1358 1526 version = "0.1.0" ··· 1360 1528 checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" 1361 1529 1362 1530 [[package]] 1363 - name = "once_cell" 1364 - version = "1.21.3" 1531 + name = "num-traits" 1532 + version = "0.2.19" 1365 1533 source = "registry+https://github.com/rust-lang/crates.io-index" 1366 - checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 1534 + checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1535 + dependencies = [ 1536 + "autocfg", 1537 + ] 1367 1538 1368 1539 [[package]] 1369 - name = "once_cell_polyfill" 1370 - version = "1.70.2" 1540 + name = "once_cell" 1541 + version = "1.21.3" 1371 1542 source = "registry+https://github.com/rust-lang/crates.io-index" 1372 - checksum = "384b8ab6d37215f3c5301a95a4accb5d64aa607f1fcb26a11b5303878451b4fe" 1543 + checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 1373 1544 1374 1545 [[package]] 1375 1546 name = "openssl" ··· 1416 1587 ] 1417 1588 1418 1589 [[package]] 1419 - name = "parking_lot" 1420 - version = "0.12.5" 1590 + name = "opentelemetry" 1591 + version = "0.26.0" 1421 1592 source = "registry+https://github.com/rust-lang/crates.io-index" 1422 - checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" 1593 + checksum = "570074cc999d1a58184080966e5bd3bf3a9a4af650c3b05047c2621e7405cd17" 1423 1594 dependencies = [ 1424 - "lock_api", 1425 - "parking_lot_core", 1595 + "futures-core", 1596 + "futures-sink", 1597 + "js-sys", 1598 + "once_cell", 1599 + "pin-project-lite", 1600 + "thiserror 1.0.69", 1426 1601 ] 1427 1602 1428 1603 [[package]] 1429 - name = "parking_lot_core" 1430 - version = "0.9.12" 1604 + name = "opentelemetry" 1605 + version = "0.30.0" 1431 1606 source = "registry+https://github.com/rust-lang/crates.io-index" 1432 - checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" 1607 + checksum = "aaf416e4cb72756655126f7dd7bb0af49c674f4c1b9903e80c009e0c37e552e6" 1433 1608 dependencies = [ 1434 - "cfg-if", 1435 - "libc", 1436 - "redox_syscall", 1437 - "smallvec", 1438 - "windows-link 0.2.1", 1609 + "futures-core", 1610 + "futures-sink", 1611 + "js-sys", 1612 + "pin-project-lite", 1613 + "thiserror 2.0.17", 1614 + "tracing", 1439 1615 ] 1440 1616 1441 1617 [[package]] 1442 - name = "percent-encoding" 1443 - version = "2.3.2" 1444 - source = "registry+https://github.com/rust-lang/crates.io-index" 1445 - checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" 1446 - 1447 - [[package]] 1448 - name = "pin-project-lite" 1449 - version = "0.2.16" 1618 + name = "opentelemetry" 1619 + version = "0.31.0" 1450 1620 source = "registry+https://github.com/rust-lang/crates.io-index" 1451 - checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 1621 + checksum = "b84bcd6ae87133e903af7ef497404dda70c60d0ea14895fc8a5e6722754fc2a0" 1622 + dependencies = [ 1623 + "futures-core", 1624 + "futures-sink", 1625 + "js-sys", 1626 + "pin-project-lite", 1627 + "thiserror 2.0.17", 1628 + "tracing", 1629 + ] 1452 1630 1453 1631 [[package]] 1454 - name = "pin-utils" 1455 - version = "0.1.0" 1632 + name = "opentelemetry-http" 1633 + version = "0.26.0" 1456 1634 source = "registry+https://github.com/rust-lang/crates.io-index" 1457 - checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1635 + checksum = "6351496aeaa49d7c267fb480678d85d1cd30c5edb20b497c48c56f62a8c14b99" 1636 + dependencies = [ 1637 + "async-trait", 1638 + "bytes", 1639 + "http 1.3.1", 1640 + "opentelemetry 0.26.0", 1641 + "reqwest", 1642 + ] 1458 1643 1459 1644 [[package]] 1460 - name = "pkg-config" 1461 - version = "0.3.32" 1645 + name = "opentelemetry-http" 1646 + version = "0.30.0" 1462 1647 source = "registry+https://github.com/rust-lang/crates.io-index" 1463 - checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 1648 + checksum = "50f6639e842a97dbea8886e3439710ae463120091e2e064518ba8e716e6ac36d" 1649 + dependencies = [ 1650 + "async-trait", 1651 + "bytes", 1652 + "http 1.3.1", 1653 + "opentelemetry 0.30.0", 1654 + "reqwest", 1655 + ] 1464 1656 1465 1657 [[package]] 1466 - name = "portable-atomic" 1467 - version = "1.11.1" 1658 + name = "opentelemetry-instrumentation-actix-web" 1659 + version = "0.23.0" 1468 1660 source = "registry+https://github.com/rust-lang/crates.io-index" 1469 - checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" 1661 + checksum = "936e41b4ed3365bae2a4a9216f52d3fb9ad30e848dde33ed229c8c454ccba31d" 1662 + dependencies = [ 1663 + "actix-http", 1664 + "actix-web", 1665 + "futures-util", 1666 + "opentelemetry 0.31.0", 1667 + "opentelemetry-semantic-conventions", 1668 + "serde", 1669 + ] 1470 1670 1471 1671 [[package]] 1472 - name = "portable-atomic-util" 1473 - version = "0.2.4" 1672 + name = "opentelemetry-otlp" 1673 + version = "0.26.0" 1474 1674 source = "registry+https://github.com/rust-lang/crates.io-index" 1475 - checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" 1675 + checksum = "29e1f9c8b032d4f635c730c0efcf731d5e2530ea13fa8bef7939ddc8420696bd" 1476 1676 dependencies = [ 1477 - "portable-atomic", 1677 + "async-trait", 1678 + "futures-core", 1679 + "http 1.3.1", 1680 + "opentelemetry 0.26.0", 1681 + "opentelemetry-http 0.26.0", 1682 + "opentelemetry-proto 0.26.1", 1683 + "opentelemetry_sdk 0.26.0", 1684 + "prost", 1685 + "reqwest", 1686 + "thiserror 1.0.69", 1687 + "tokio", 1688 + "tonic 0.12.3", 1689 + ] 1690 + 1691 + [[package]] 1692 + name = "opentelemetry-otlp" 1693 + version = "0.30.0" 1694 + source = "registry+https://github.com/rust-lang/crates.io-index" 1695 + checksum = "dbee664a43e07615731afc539ca60c6d9f1a9425e25ca09c57bc36c87c55852b" 1696 + dependencies = [ 1697 + "http 1.3.1", 1698 + "opentelemetry 0.30.0", 1699 + "opentelemetry-http 0.30.0", 1700 + "opentelemetry-proto 0.30.0", 1701 + "opentelemetry_sdk 0.30.0", 1702 + "prost", 1703 + "reqwest", 1704 + "thiserror 2.0.17", 1705 + ] 1706 + 1707 + [[package]] 1708 + name = "opentelemetry-proto" 1709 + version = "0.26.1" 1710 + source = "registry+https://github.com/rust-lang/crates.io-index" 1711 + checksum = "c9d3968ce3aefdcca5c27e3c4ea4391b37547726a70893aab52d3de95d5f8b34" 1712 + dependencies = [ 1713 + "opentelemetry 0.26.0", 1714 + "opentelemetry_sdk 0.26.0", 1715 + "prost", 1716 + "tonic 0.12.3", 1717 + ] 1718 + 1719 + [[package]] 1720 + name = "opentelemetry-proto" 1721 + version = "0.30.0" 1722 + source = "registry+https://github.com/rust-lang/crates.io-index" 1723 + checksum = "2e046fd7660710fe5a05e8748e70d9058dc15c94ba914e7c4faa7c728f0e8ddc" 1724 + dependencies = [ 1725 + "opentelemetry 0.30.0", 1726 + "opentelemetry_sdk 0.30.0", 1727 + "prost", 1728 + "tonic 0.13.1", 1729 + ] 1730 + 1731 + [[package]] 1732 + name = "opentelemetry-semantic-conventions" 1733 + version = "0.31.0" 1734 + source = "registry+https://github.com/rust-lang/crates.io-index" 1735 + checksum = "e62e29dfe041afb8ed2a6c9737ab57db4907285d999ef8ad3a59092a36bdc846" 1736 + 1737 + [[package]] 1738 + name = "opentelemetry_sdk" 1739 + version = "0.26.0" 1740 + source = "registry+https://github.com/rust-lang/crates.io-index" 1741 + checksum = "d2c627d9f4c9cdc1f21a29ee4bfbd6028fcb8bcf2a857b43f3abdf72c9c862f3" 1742 + dependencies = [ 1743 + "async-trait", 1744 + "futures-channel", 1745 + "futures-executor", 1746 + "futures-util", 1747 + "glob", 1748 + "once_cell", 1749 + "opentelemetry 0.26.0", 1750 + "percent-encoding", 1751 + "rand 0.8.5", 1752 + "serde_json", 1753 + "thiserror 1.0.69", 1754 + ] 1755 + 1756 + [[package]] 1757 + name = "opentelemetry_sdk" 1758 + version = "0.30.0" 1759 + source = "registry+https://github.com/rust-lang/crates.io-index" 1760 + checksum = "11f644aa9e5e31d11896e024305d7e3c98a88884d9f8919dbf37a9991bc47a4b" 1761 + dependencies = [ 1762 + "futures-channel", 1763 + "futures-executor", 1764 + "futures-util", 1765 + "opentelemetry 0.30.0", 1766 + "percent-encoding", 1767 + "rand 0.9.2", 1768 + "serde_json", 1769 + "thiserror 2.0.17", 1770 + "tokio", 1771 + "tokio-stream", 1772 + ] 1773 + 1774 + [[package]] 1775 + name = "parking_lot" 1776 + version = "0.12.5" 1777 + source = "registry+https://github.com/rust-lang/crates.io-index" 1778 + checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a" 1779 + dependencies = [ 1780 + "lock_api", 1781 + "parking_lot_core", 1782 + ] 1783 + 1784 + [[package]] 1785 + name = "parking_lot_core" 1786 + version = "0.9.12" 1787 + source = "registry+https://github.com/rust-lang/crates.io-index" 1788 + checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1" 1789 + dependencies = [ 1790 + "cfg-if", 1791 + "libc", 1792 + "redox_syscall", 1793 + "smallvec", 1794 + "windows-link 0.2.1", 1795 + ] 1796 + 1797 + [[package]] 1798 + name = "percent-encoding" 1799 + version = "2.3.2" 1800 + source = "registry+https://github.com/rust-lang/crates.io-index" 1801 + checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" 1802 + 1803 + [[package]] 1804 + name = "pin-project" 1805 + version = "1.1.10" 1806 + source = "registry+https://github.com/rust-lang/crates.io-index" 1807 + checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" 1808 + dependencies = [ 1809 + "pin-project-internal", 1810 + ] 1811 + 1812 + [[package]] 1813 + name = "pin-project-internal" 1814 + version = "1.1.10" 1815 + source = "registry+https://github.com/rust-lang/crates.io-index" 1816 + checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" 1817 + dependencies = [ 1818 + "proc-macro2", 1819 + "quote", 1820 + "syn", 1478 1821 ] 1479 1822 1823 + [[package]] 1824 + name = "pin-project-lite" 1825 + version = "0.2.16" 1826 + source = "registry+https://github.com/rust-lang/crates.io-index" 1827 + checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 1828 + 1829 + [[package]] 1830 + name = "pin-utils" 1831 + version = "0.1.0" 1832 + source = "registry+https://github.com/rust-lang/crates.io-index" 1833 + checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1834 + 1835 + [[package]] 1836 + name = "pkg-config" 1837 + version = "0.3.32" 1838 + source = "registry+https://github.com/rust-lang/crates.io-index" 1839 + checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 1840 + 1841 + [[package]] 1842 + name = "portable-atomic" 1843 + version = "1.11.1" 1844 + source = "registry+https://github.com/rust-lang/crates.io-index" 1845 + checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" 1846 + 1480 1847 [[package]] 1481 1848 name = "potential_utf" 1482 1849 version = "0.1.3" ··· 1510 1877 "unicode-ident", 1511 1878 ] 1512 1879 1880 + [[package]] 1881 + name = "prost" 1882 + version = "0.13.5" 1883 + source = "registry+https://github.com/rust-lang/crates.io-index" 1884 + checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" 1885 + dependencies = [ 1886 + "bytes", 1887 + "prost-derive", 1888 + ] 1889 + 1890 + [[package]] 1891 + name = "prost-derive" 1892 + version = "0.13.5" 1893 + source = "registry+https://github.com/rust-lang/crates.io-index" 1894 + checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" 1895 + dependencies = [ 1896 + "anyhow", 1897 + "itertools", 1898 + "proc-macro2", 1899 + "quote", 1900 + "syn", 1901 + ] 1902 + 1513 1903 [[package]] 1514 1904 name = "quanta" 1515 1905 version = "0.12.6" ··· 1525 1915 "winapi", 1526 1916 ] 1527 1917 1918 + [[package]] 1919 + name = "quinn" 1920 + version = "0.11.9" 1921 + source = "registry+https://github.com/rust-lang/crates.io-index" 1922 + checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" 1923 + dependencies = [ 1924 + "bytes", 1925 + "cfg_aliases", 1926 + "pin-project-lite", 1927 + "quinn-proto", 1928 + "quinn-udp", 1929 + "rustc-hash", 1930 + "rustls", 1931 + "socket2 0.6.1", 1932 + "thiserror 2.0.17", 1933 + "tokio", 1934 + "tracing", 1935 + "web-time", 1936 + ] 1937 + 1938 + [[package]] 1939 + name = "quinn-proto" 1940 + version = "0.11.13" 1941 + source = "registry+https://github.com/rust-lang/crates.io-index" 1942 + checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" 1943 + dependencies = [ 1944 + "bytes", 1945 + "getrandom 0.3.4", 1946 + "lru-slab", 1947 + "rand 0.9.2", 1948 + "ring", 1949 + "rustc-hash", 1950 + "rustls", 1951 + "rustls-pki-types", 1952 + "slab", 1953 + "thiserror 2.0.17", 1954 + "tinyvec", 1955 + "tracing", 1956 + "web-time", 1957 + ] 1958 + 1959 + [[package]] 1960 + name = "quinn-udp" 1961 + version = "0.5.14" 1962 + source = "registry+https://github.com/rust-lang/crates.io-index" 1963 + checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" 1964 + dependencies = [ 1965 + "cfg_aliases", 1966 + "libc", 1967 + "once_cell", 1968 + "socket2 0.6.1", 1969 + "tracing", 1970 + "windows-sys 0.60.2", 1971 + ] 1972 + 1528 1973 [[package]] 1529 1974 name = "quote" 1530 1975 version = "1.0.41" ··· 1540 1985 source = "registry+https://github.com/rust-lang/crates.io-index" 1541 1986 checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" 1542 1987 1988 + [[package]] 1989 + name = "rand" 1990 + version = "0.8.5" 1991 + source = "registry+https://github.com/rust-lang/crates.io-index" 1992 + checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1993 + dependencies = [ 1994 + "libc", 1995 + "rand_chacha 0.3.1", 1996 + "rand_core 0.6.4", 1997 + ] 1998 + 1543 1999 [[package]] 1544 2000 name = "rand" 1545 2001 version = "0.9.2" 1546 2002 source = "registry+https://github.com/rust-lang/crates.io-index" 1547 2003 checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" 1548 2004 dependencies = [ 1549 - "rand_chacha", 1550 - "rand_core", 2005 + "rand_chacha 0.9.0", 2006 + "rand_core 0.9.3", 2007 + ] 2008 + 2009 + [[package]] 2010 + name = "rand_chacha" 2011 + version = "0.3.1" 2012 + source = "registry+https://github.com/rust-lang/crates.io-index" 2013 + checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 2014 + dependencies = [ 2015 + "ppv-lite86", 2016 + "rand_core 0.6.4", 1551 2017 ] 1552 2018 1553 2019 [[package]] ··· 1557 2023 checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" 1558 2024 dependencies = [ 1559 2025 "ppv-lite86", 1560 - "rand_core", 2026 + "rand_core 0.9.3", 2027 + ] 2028 + 2029 + [[package]] 2030 + name = "rand_core" 2031 + version = "0.6.4" 2032 + source = "registry+https://github.com/rust-lang/crates.io-index" 2033 + checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 2034 + dependencies = [ 2035 + "getrandom 0.2.16", 1561 2036 ] 1562 2037 1563 2038 [[package]] ··· 1631 2106 "base64", 1632 2107 "bytes", 1633 2108 "encoding_rs", 2109 + "futures-channel", 1634 2110 "futures-core", 1635 2111 "futures-util", 1636 2112 "h2 0.4.12", ··· 1648 2124 "native-tls", 1649 2125 "percent-encoding", 1650 2126 "pin-project-lite", 2127 + "quinn", 2128 + "rustls", 2129 + "rustls-native-certs", 1651 2130 "rustls-pki-types", 1652 2131 "serde", 1653 2132 "serde_json", ··· 1655 2134 "sync_wrapper", 1656 2135 "tokio", 1657 2136 "tokio-native-tls", 1658 - "tower", 2137 + "tokio-rustls", 2138 + "tower 0.5.2", 1659 2139 "tower-http", 1660 2140 "tower-service", 1661 2141 "url", ··· 1678 2158 "windows-sys 0.52.0", 1679 2159 ] 1680 2160 2161 + [[package]] 2162 + name = "rustc-hash" 2163 + version = "2.1.1" 2164 + source = "registry+https://github.com/rust-lang/crates.io-index" 2165 + checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" 2166 + 1681 2167 [[package]] 1682 2168 name = "rustix" 1683 2169 version = "1.1.2" ··· 1698 2184 checksum = "6a9586e9ee2b4f8fab52a0048ca7334d7024eef48e2cb9407e3497bb7cab7fa7" 1699 2185 dependencies = [ 1700 2186 "once_cell", 2187 + "ring", 1701 2188 "rustls-pki-types", 1702 2189 "rustls-webpki", 1703 2190 "subtle", 1704 2191 "zeroize", 1705 2192 ] 1706 2193 2194 + [[package]] 2195 + name = "rustls-native-certs" 2196 + version = "0.8.2" 2197 + source = "registry+https://github.com/rust-lang/crates.io-index" 2198 + checksum = "9980d917ebb0c0536119ba501e90834767bffc3d60641457fd84a1f3fd337923" 2199 + dependencies = [ 2200 + "openssl-probe", 2201 + "rustls-pki-types", 2202 + "schannel", 2203 + "security-framework 3.5.1", 2204 + ] 2205 + 1707 2206 [[package]] 1708 2207 name = "rustls-pki-types" 1709 2208 version = "1.12.0" 1710 2209 source = "registry+https://github.com/rust-lang/crates.io-index" 1711 2210 checksum = "229a4a4c221013e7e1f1a043678c5cc39fe5171437c88fb47151a21e6f5b5c79" 1712 2211 dependencies = [ 2212 + "web-time", 1713 2213 "zeroize", 1714 2214 ] 1715 2215 ··· 1758 2258 checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" 1759 2259 dependencies = [ 1760 2260 "bitflags", 1761 - "core-foundation", 2261 + "core-foundation 0.9.4", 2262 + "core-foundation-sys", 2263 + "libc", 2264 + "security-framework-sys", 2265 + ] 2266 + 2267 + [[package]] 2268 + name = "security-framework" 2269 + version = "3.5.1" 2270 + source = "registry+https://github.com/rust-lang/crates.io-index" 2271 + checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" 2272 + dependencies = [ 2273 + "bitflags", 2274 + "core-foundation 0.10.1", 1762 2275 "core-foundation-sys", 1763 2276 "libc", 1764 2277 "security-framework-sys", ··· 1840 2353 "digest", 1841 2354 ] 1842 2355 2356 + [[package]] 2357 + name = "sharded-slab" 2358 + version = "0.1.7" 2359 + source = "registry+https://github.com/rust-lang/crates.io-index" 2360 + checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" 2361 + dependencies = [ 2362 + "lazy_static", 2363 + ] 2364 + 1843 2365 [[package]] 1844 2366 name = "shlex" 1845 2367 version = "1.3.0" ··· 1952 2474 checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" 1953 2475 dependencies = [ 1954 2476 "bitflags", 1955 - "core-foundation", 2477 + "core-foundation 0.9.4", 1956 2478 "system-configuration-sys", 1957 2479 ] 1958 2480 ··· 1985 2507 source = "registry+https://github.com/rust-lang/crates.io-index" 1986 2508 checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 1987 2509 dependencies = [ 1988 - "thiserror-impl", 2510 + "thiserror-impl 1.0.69", 2511 + ] 2512 + 2513 + [[package]] 2514 + name = "thiserror" 2515 + version = "2.0.17" 2516 + source = "registry+https://github.com/rust-lang/crates.io-index" 2517 + checksum = "f63587ca0f12b72a0600bcba1d40081f830876000bb46dd2337a3051618f4fc8" 2518 + dependencies = [ 2519 + "thiserror-impl 2.0.17", 1989 2520 ] 1990 2521 1991 2522 [[package]] ··· 1999 2530 "syn", 2000 2531 ] 2001 2532 2533 + [[package]] 2534 + name = "thiserror-impl" 2535 + version = "2.0.17" 2536 + source = "registry+https://github.com/rust-lang/crates.io-index" 2537 + checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" 2538 + dependencies = [ 2539 + "proc-macro2", 2540 + "quote", 2541 + "syn", 2542 + ] 2543 + 2544 + [[package]] 2545 + name = "thread_local" 2546 + version = "1.1.9" 2547 + source = "registry+https://github.com/rust-lang/crates.io-index" 2548 + checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" 2549 + dependencies = [ 2550 + "cfg-if", 2551 + ] 2552 + 2002 2553 [[package]] 2003 2554 name = "time" 2004 2555 version = "0.3.44" ··· 2040 2591 "zerovec", 2041 2592 ] 2042 2593 2594 + [[package]] 2595 + name = "tinyvec" 2596 + version = "1.10.0" 2597 + source = "registry+https://github.com/rust-lang/crates.io-index" 2598 + checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" 2599 + dependencies = [ 2600 + "tinyvec_macros", 2601 + ] 2602 + 2603 + [[package]] 2604 + name = "tinyvec_macros" 2605 + version = "0.1.1" 2606 + source = "registry+https://github.com/rust-lang/crates.io-index" 2607 + checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2608 + 2043 2609 [[package]] 2044 2610 name = "tokio" 2045 2611 version = "1.48.0" ··· 2088 2654 "tokio", 2089 2655 ] 2090 2656 2657 + [[package]] 2658 + name = "tokio-stream" 2659 + version = "0.1.17" 2660 + source = "registry+https://github.com/rust-lang/crates.io-index" 2661 + checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" 2662 + dependencies = [ 2663 + "futures-core", 2664 + "pin-project-lite", 2665 + "tokio", 2666 + ] 2667 + 2091 2668 [[package]] 2092 2669 name = "tokio-util" 2093 2670 version = "0.7.16" ··· 2101 2678 "tokio", 2102 2679 ] 2103 2680 2681 + [[package]] 2682 + name = "tonic" 2683 + version = "0.12.3" 2684 + source = "registry+https://github.com/rust-lang/crates.io-index" 2685 + checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" 2686 + dependencies = [ 2687 + "async-stream", 2688 + "async-trait", 2689 + "axum", 2690 + "base64", 2691 + "bytes", 2692 + "h2 0.4.12", 2693 + "http 1.3.1", 2694 + "http-body", 2695 + "http-body-util", 2696 + "hyper", 2697 + "hyper-timeout", 2698 + "hyper-util", 2699 + "percent-encoding", 2700 + "pin-project", 2701 + "prost", 2702 + "socket2 0.5.10", 2703 + "tokio", 2704 + "tokio-stream", 2705 + "tower 0.4.13", 2706 + "tower-layer", 2707 + "tower-service", 2708 + "tracing", 2709 + ] 2710 + 2711 + [[package]] 2712 + name = "tonic" 2713 + version = "0.13.1" 2714 + source = "registry+https://github.com/rust-lang/crates.io-index" 2715 + checksum = "7e581ba15a835f4d9ea06c55ab1bd4dce26fc53752c69a04aac00703bfb49ba9" 2716 + dependencies = [ 2717 + "async-trait", 2718 + "base64", 2719 + "bytes", 2720 + "http 1.3.1", 2721 + "http-body", 2722 + "http-body-util", 2723 + "percent-encoding", 2724 + "pin-project", 2725 + "prost", 2726 + "tokio-stream", 2727 + "tower-layer", 2728 + "tower-service", 2729 + "tracing", 2730 + ] 2731 + 2732 + [[package]] 2733 + name = "tower" 2734 + version = "0.4.13" 2735 + source = "registry+https://github.com/rust-lang/crates.io-index" 2736 + checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 2737 + dependencies = [ 2738 + "futures-core", 2739 + "futures-util", 2740 + "indexmap 1.9.3", 2741 + "pin-project", 2742 + "pin-project-lite", 2743 + "rand 0.8.5", 2744 + "slab", 2745 + "tokio", 2746 + "tokio-util", 2747 + "tower-layer", 2748 + "tower-service", 2749 + "tracing", 2750 + ] 2751 + 2104 2752 [[package]] 2105 2753 name = "tower" 2106 2754 version = "0.5.2" ··· 2129 2777 "http-body", 2130 2778 "iri-string", 2131 2779 "pin-project-lite", 2132 - "tower", 2780 + "tower 0.5.2", 2133 2781 "tower-layer", 2134 2782 "tower-service", 2135 2783 ] ··· 2176 2824 checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" 2177 2825 dependencies = [ 2178 2826 "once_cell", 2827 + "valuable", 2828 + ] 2829 + 2830 + [[package]] 2831 + name = "tracing-log" 2832 + version = "0.2.0" 2833 + source = "registry+https://github.com/rust-lang/crates.io-index" 2834 + checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" 2835 + dependencies = [ 2836 + "log", 2837 + "once_cell", 2838 + "tracing-core", 2839 + ] 2840 + 2841 + [[package]] 2842 + name = "tracing-opentelemetry" 2843 + version = "0.31.0" 2844 + source = "registry+https://github.com/rust-lang/crates.io-index" 2845 + checksum = "ddcf5959f39507d0d04d6413119c04f33b623f4f951ebcbdddddfad2d0623a9c" 2846 + dependencies = [ 2847 + "js-sys", 2848 + "once_cell", 2849 + "opentelemetry 0.30.0", 2850 + "opentelemetry_sdk 0.30.0", 2851 + "smallvec", 2852 + "tracing", 2853 + "tracing-core", 2854 + "tracing-log", 2855 + "tracing-subscriber", 2856 + "web-time", 2857 + ] 2858 + 2859 + [[package]] 2860 + name = "tracing-subscriber" 2861 + version = "0.3.20" 2862 + source = "registry+https://github.com/rust-lang/crates.io-index" 2863 + checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" 2864 + dependencies = [ 2865 + "matchers", 2866 + "nu-ansi-term", 2867 + "once_cell", 2868 + "regex-automata", 2869 + "sharded-slab", 2870 + "smallvec", 2871 + "thread_local", 2872 + "tracing", 2873 + "tracing-core", 2874 + "tracing-log", 2179 2875 ] 2180 2876 2181 2877 [[package]] ··· 2232 2928 source = "registry+https://github.com/rust-lang/crates.io-index" 2233 2929 checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 2234 2930 2235 - [[package]] 2236 - name = "utf8parse" 2237 - version = "0.2.2" 2238 - source = "registry+https://github.com/rust-lang/crates.io-index" 2239 - checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 2240 - 2241 2931 [[package]] 2242 2932 name = "v_htmlescape" 2243 2933 version = "0.15.8" 2244 2934 source = "registry+https://github.com/rust-lang/crates.io-index" 2245 2935 checksum = "4e8257fbc510f0a46eb602c10215901938b5c2a7d5e70fc11483b1d3c9b5b18c" 2246 2936 2937 + [[package]] 2938 + name = "valuable" 2939 + version = "0.1.1" 2940 + source = "registry+https://github.com/rust-lang/crates.io-index" 2941 + checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" 2942 + 2247 2943 [[package]] 2248 2944 name = "vcpkg" 2249 2945 version = "0.2.15" ··· 2394 3090 source = "registry+https://github.com/rust-lang/crates.io-index" 2395 3091 checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2396 3092 3093 + [[package]] 3094 + name = "windows-core" 3095 + version = "0.62.2" 3096 + source = "registry+https://github.com/rust-lang/crates.io-index" 3097 + checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" 3098 + dependencies = [ 3099 + "windows-implement", 3100 + "windows-interface", 3101 + "windows-link 0.2.1", 3102 + "windows-result 0.4.1", 3103 + "windows-strings 0.5.1", 3104 + ] 3105 + 3106 + [[package]] 3107 + name = "windows-implement" 3108 + version = "0.60.2" 3109 + source = "registry+https://github.com/rust-lang/crates.io-index" 3110 + checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" 3111 + dependencies = [ 3112 + "proc-macro2", 3113 + "quote", 3114 + "syn", 3115 + ] 3116 + 3117 + [[package]] 3118 + name = "windows-interface" 3119 + version = "0.59.3" 3120 + source = "registry+https://github.com/rust-lang/crates.io-index" 3121 + checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" 3122 + dependencies = [ 3123 + "proc-macro2", 3124 + "quote", 3125 + "syn", 3126 + ] 3127 + 2397 3128 [[package]] 2398 3129 name = "windows-link" 2399 3130 version = "0.1.3" ··· 2413 3144 checksum = "5b8a9ed28765efc97bbc954883f4e6796c33a06546ebafacbabee9696967499e" 2414 3145 dependencies = [ 2415 3146 "windows-link 0.1.3", 2416 - "windows-result", 2417 - "windows-strings", 3147 + "windows-result 0.3.4", 3148 + "windows-strings 0.4.2", 2418 3149 ] 2419 3150 2420 3151 [[package]] ··· 2426 3157 "windows-link 0.1.3", 2427 3158 ] 2428 3159 3160 + [[package]] 3161 + name = "windows-result" 3162 + version = "0.4.1" 3163 + source = "registry+https://github.com/rust-lang/crates.io-index" 3164 + checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" 3165 + dependencies = [ 3166 + "windows-link 0.2.1", 3167 + ] 3168 + 2429 3169 [[package]] 2430 3170 name = "windows-strings" 2431 3171 version = "0.4.2" ··· 2435 3175 "windows-link 0.1.3", 2436 3176 ] 2437 3177 3178 + [[package]] 3179 + name = "windows-strings" 3180 + version = "0.5.1" 3181 + source = "registry+https://github.com/rust-lang/crates.io-index" 3182 + checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" 3183 + dependencies = [ 3184 + "windows-link 0.2.1", 3185 + ] 3186 + 2438 3187 [[package]] 2439 3188 name = "windows-sys" 2440 3189 version = "0.52.0"
+8 -2
Cargo.toml
··· 14 14 anyhow = "1.0" 15 15 thiserror = "1.0" 16 16 dotenv = "0.15" 17 - env_logger = "0.11" 18 - log = "0.4" 19 17 base64 = "0.22" 20 18 actix-governor = "0.10.0" 19 + 20 + # observability with logfire 21 + logfire = "0.8" 22 + tracing = "0.1" 23 + log = "0.4" # keep for compatibility with existing debug logs 24 + opentelemetry = { version = "0.26", features = ["trace", "metrics"] } 25 + opentelemetry-instrumentation-actix-web = { version = "0.23", features = ["metrics"] } 26 + opentelemetry-otlp = { version = "0.26", features = ["trace", "http-proto", "reqwest-client", "reqwest-rustls"] }
+16 -2
src/main.rs
··· 9 9 use actix_web::{middleware, web, App, HttpResponse, HttpServer}; 10 10 use anyhow::Result; 11 11 use config::Config; 12 + use opentelemetry_instrumentation_actix_web::{RequestMetrics, RequestTracing}; 12 13 13 14 async fn index() -> HttpResponse { 14 15 HttpResponse::Ok() ··· 19 20 #[actix_web::main] 20 21 async fn main() -> Result<()> { 21 22 dotenv::dotenv().ok(); 22 - env_logger::init(); 23 + 24 + // initialize logfire 25 + let logfire = logfire::configure() 26 + .finish() 27 + .map_err(|e| anyhow::anyhow!("failed to initialize logfire: {}", e))?; 28 + 29 + let _guard = logfire.shutdown_guard(); 23 30 24 31 let config = Config::from_env()?; 25 32 let host = config.host.clone(); 26 33 let port = config.port; 27 34 28 - log::info!("starting bufo search server on {}:{}", host, port); 35 + logfire::info!("starting bufo search server", 36 + host = &host, 37 + port = port as i64 38 + ); 29 39 30 40 // rate limiter: 10 requests per minute per IP 31 41 let governor_conf = GovernorConfigBuilder::default() ··· 38 48 let cors = Cors::permissive(); 39 49 40 50 App::new() 51 + // opentelemetry tracing and metrics FIRST 52 + .wrap(RequestTracing::new()) 53 + .wrap(RequestMetrics::default()) 54 + // existing middleware 41 55 .wrap(middleware::Logger::default()) 42 56 .wrap(cors) 43 57 .app_data(web::Data::new(config.clone()))
+52 -29
src/search.rs
··· 3 3 use crate::turbopuffer::{QueryRequest, TurbopufferClient}; 4 4 use actix_web::{web, HttpResponse, Result as ActixResult}; 5 5 use serde::{Deserialize, Serialize}; 6 + use tracing::instrument; 6 7 7 8 #[derive(Debug, Deserialize)] 8 9 pub struct SearchQuery { ··· 28 29 pub score: f32, // normalized 0-1 score for display 29 30 } 30 31 32 + #[instrument(skip(config), fields(query = %query.query, top_k = query.top_k))] 31 33 pub async fn search( 32 34 query: web::Json<SearchQuery>, 33 35 config: web::Data<Config>, ··· 38 40 config.turbopuffer_namespace.clone(), 39 41 ); 40 42 41 - // Run vector search 42 - let query_embedding = embedding_client 43 - .embed_text(&query.query) 44 - .await 45 - .map_err(|e| { 46 - log::error!("failed to generate embedding: {}", e); 47 - actix_web::error::ErrorInternalServerError(format!( 48 - "failed to generate embedding: {}", 49 - e 50 - )) 51 - })?; 43 + // run vector search 44 + let query_embedding = { 45 + let _span = logfire::span!("generate_embedding", query = &query.query); 46 + embedding_client 47 + .embed_text(&query.query) 48 + .await 49 + .map_err(|e| { 50 + logfire::error!("failed to generate embedding", error = e.to_string()); 51 + actix_web::error::ErrorInternalServerError(format!( 52 + "failed to generate embedding: {}", 53 + e 54 + )) 55 + })? 56 + }; 52 57 53 58 let vector_request = QueryRequest { 54 59 rank_by: vec![ ··· 60 65 include_attributes: Some(vec!["url".to_string(), "name".to_string(), "filename".to_string()]), 61 66 }; 62 67 63 - let vector_results = tpuf_client.query(vector_request).await.map_err(|e| { 64 - log::error!("failed to query turbopuffer (vector): {}", e); 65 - actix_web::error::ErrorInternalServerError(format!( 66 - "failed to query turbopuffer (vector): {}", 67 - e 68 - )) 69 - })?; 70 - 71 - // Run BM25 text search 72 - let bm25_results = tpuf_client.bm25_query(&query.query, query.top_k * 2).await.map_err(|e| { 73 - log::error!("failed to query turbopuffer (BM25): {}", e); 74 - actix_web::error::ErrorInternalServerError(format!( 75 - "failed to query turbopuffer (BM25): {}", 76 - e 77 - )) 78 - })?; 79 - 80 - // Combine results using Reciprocal Rank Fusion (RRF) 68 + let vector_results = { 69 + let _span = logfire::span!("vector_search", top_k = query.top_k * 2); 70 + tpuf_client.query(vector_request).await.map_err(|e| { 71 + logfire::error!("vector search failed", error = e.to_string()); 72 + actix_web::error::ErrorInternalServerError(format!( 73 + "failed to query turbopuffer (vector): {}", 74 + e 75 + )) 76 + })? 77 + }; 78 + 79 + // run BM25 text search 80 + let bm25_top_k = query.top_k * 2; 81 + let bm25_results = { 82 + let _span = logfire::span!("bm25_search", query = &query.query, top_k = bm25_top_k as i64); 83 + tpuf_client.bm25_query(&query.query, bm25_top_k).await.map_err(|e| { 84 + logfire::error!("bm25 search failed", error = e.to_string()); 85 + actix_web::error::ErrorInternalServerError(format!( 86 + "failed to query turbopuffer (BM25): {}", 87 + e 88 + )) 89 + })? 90 + }; 91 + 92 + // combine results using Reciprocal Rank Fusion (RRF) 93 + let _span = logfire::span!("reciprocal_rank_fusion", 94 + vector_results = vector_results.len(), 95 + bm25_results = bm25_results.len() 96 + ); 97 + 81 98 use std::collections::HashMap; 82 99 let mut rrf_scores: HashMap<String, f32> = HashMap::new(); 83 100 let k = 60.0; // RRF constant ··· 141 158 }) 142 159 .collect(); 143 160 161 + logfire::info!("search completed", 162 + query = &query.query, 163 + results_count = results.len() as i64, 164 + top_score = results.first().map(|r| r.score as f64).unwrap_or(0.0) 165 + ); 166 + 144 167 Ok(HttpResponse::Ok().json(SearchResponse { results })) 145 168 }
-35
src/turbopuffer.rs
··· 2 2 use reqwest::Client; 3 3 use serde::{Deserialize, Serialize}; 4 4 5 - #[derive(Debug, Serialize)] 6 - pub struct UpsertRequest { 7 - pub ids: Vec<String>, 8 - pub vectors: Vec<Vec<f32>>, 9 - pub attributes: serde_json::Value, 10 - } 11 - 12 5 #[derive(Debug, Serialize)] 13 6 pub struct QueryRequest { 14 7 pub rank_by: Vec<serde_json::Value>, ··· 41 34 } 42 35 } 43 36 44 - pub async fn upsert(&self, request: UpsertRequest) -> Result<()> { 45 - let url = format!( 46 - "https://api.turbopuffer.com/v1/vectors/{}", 47 - self.namespace 48 - ); 49 - 50 - let response = self 51 - .client 52 - .post(&url) 53 - .header("Authorization", format!("Bearer {}", self.api_key)) 54 - .json(&request) 55 - .send() 56 - .await 57 - .context("failed to send upsert request")?; 58 - 59 - if !response.status().is_success() { 60 - let status = response.status(); 61 - let body = response.text().await.unwrap_or_default(); 62 - anyhow::bail!( 63 - "turbopuffer upsert failed with status {}: {}", 64 - status, 65 - body 66 - ); 67 - } 68 - 69 - Ok(()) 70 - } 71 - 72 37 pub async fn query(&self, request: QueryRequest) -> Result<QueryResponse> { 73 38 let url = format!( 74 39 "https://api.turbopuffer.com/v1/vectors/{}/query",

History

1 round 0 comments
sign up or login to add to the discussion
zzstoatzz.io submitted #0
1 commit
expand
add logfire opentelemetry instrumentation
expand 0 comments
pull request successfully merged