A little app to serve my photography from my personal website

add tracing crate

ericwood.org df7346ba c2e75d95

Waiting for spindle ...
+830 -16
+807 -15
Cargo.lock
··· 33 33 checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61" 34 34 35 35 [[package]] 36 + name = "async-trait" 37 + version = "0.1.89" 38 + source = "registry+https://github.com/rust-lang/crates.io-index" 39 + checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" 40 + dependencies = [ 41 + "proc-macro2", 42 + "quote", 43 + "syn", 44 + ] 45 + 46 + [[package]] 36 47 name = "atoi" 37 48 version = "2.0.0" 38 49 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 143 154 ] 144 155 145 156 [[package]] 157 + name = "axum-tracing-opentelemetry" 158 + version = "0.32.2" 159 + source = "registry+https://github.com/rust-lang/crates.io-index" 160 + checksum = "e8ca2639ea8e778162fa734ddd5d77cb2fdf29ec39adb80192693834b6639ea6" 161 + dependencies = [ 162 + "axum", 163 + "futures-core", 164 + "futures-util", 165 + "http", 166 + "opentelemetry", 167 + "opentelemetry-semantic-conventions", 168 + "pin-project-lite", 169 + "tower", 170 + "tracing", 171 + "tracing-opentelemetry", 172 + "tracing-opentelemetry-instrumentation-sdk", 173 + ] 174 + 175 + [[package]] 146 176 name = "base64" 147 177 version = "0.22.1" 148 178 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 213 243 checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" 214 244 215 245 [[package]] 246 + name = "cfg_aliases" 247 + version = "0.2.1" 248 + source = "registry+https://github.com/rust-lang/crates.io-index" 249 + checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" 250 + 251 + [[package]] 216 252 name = "chrono" 217 253 version = "0.4.42" 218 254 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 239 275 version = "0.9.6" 240 276 source = "registry+https://github.com/rust-lang/crates.io-index" 241 277 checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" 278 + 279 + [[package]] 280 + name = "core-foundation" 281 + version = "0.10.1" 282 + source = "registry+https://github.com/rust-lang/crates.io-index" 283 + checksum = "b2a6cd9ae233e7f62ba4e9353e81a88df7fc8a5987b8d445b4d90c879bd156f6" 284 + dependencies = [ 285 + "core-foundation-sys", 286 + "libc", 287 + ] 242 288 243 289 [[package]] 244 290 name = "core-foundation-sys" ··· 464 510 checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" 465 511 466 512 [[package]] 513 + name = "futures-macro" 514 + version = "0.3.31" 515 + source = "registry+https://github.com/rust-lang/crates.io-index" 516 + checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" 517 + dependencies = [ 518 + "proc-macro2", 519 + "quote", 520 + "syn", 521 + ] 522 + 523 + [[package]] 467 524 name = "futures-sink" 468 525 version = "0.3.31" 469 526 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 483 540 dependencies = [ 484 541 "futures-core", 485 542 "futures-io", 543 + "futures-macro", 486 544 "futures-sink", 487 545 "futures-task", 488 546 "memchr", ··· 508 566 checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 509 567 dependencies = [ 510 568 "cfg-if", 569 + "js-sys", 511 570 "libc", 512 571 "wasi", 572 + "wasm-bindgen", 573 + ] 574 + 575 + [[package]] 576 + name = "getrandom" 577 + version = "0.3.4" 578 + source = "registry+https://github.com/rust-lang/crates.io-index" 579 + checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" 580 + dependencies = [ 581 + "cfg-if", 582 + "js-sys", 583 + "libc", 584 + "r-efi", 585 + "wasip2", 586 + "wasm-bindgen", 587 + ] 588 + 589 + [[package]] 590 + name = "h2" 591 + version = "0.4.12" 592 + source = "registry+https://github.com/rust-lang/crates.io-index" 593 + checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" 594 + dependencies = [ 595 + "atomic-waker", 596 + "bytes", 597 + "fnv", 598 + "futures-core", 599 + "futures-sink", 600 + "http", 601 + "indexmap", 602 + "slab", 603 + "tokio", 604 + "tokio-util", 605 + "tracing", 513 606 ] 514 607 515 608 [[package]] ··· 639 732 "bytes", 640 733 "futures-channel", 641 734 "futures-core", 735 + "h2", 642 736 "http", 643 737 "http-body", 644 738 "httparse", ··· 648 742 "pin-utils", 649 743 "smallvec", 650 744 "tokio", 745 + "want", 746 + ] 747 + 748 + [[package]] 749 + name = "hyper-rustls" 750 + version = "0.27.7" 751 + source = "registry+https://github.com/rust-lang/crates.io-index" 752 + checksum = "e3c93eb611681b207e1fe55d5a71ecf91572ec8a6705cdb6857f7d8d5242cf58" 753 + dependencies = [ 754 + "http", 755 + "hyper", 756 + "hyper-util", 757 + "rustls", 758 + "rustls-native-certs", 759 + "rustls-pki-types", 760 + "tokio", 761 + "tokio-rustls", 762 + "tower-service", 763 + ] 764 + 765 + [[package]] 766 + name = "hyper-timeout" 767 + version = "0.5.2" 768 + source = "registry+https://github.com/rust-lang/crates.io-index" 769 + checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" 770 + dependencies = [ 771 + "hyper", 772 + "hyper-util", 773 + "pin-project-lite", 774 + "tokio", 775 + "tower-service", 651 776 ] 652 777 653 778 [[package]] ··· 656 781 source = "registry+https://github.com/rust-lang/crates.io-index" 657 782 checksum = "3c6995591a8f1380fcb4ba966a252a4b29188d51d2b89e3a252f5305be65aea8" 658 783 dependencies = [ 784 + "base64", 659 785 "bytes", 786 + "futures-channel", 660 787 "futures-core", 788 + "futures-util", 661 789 "http", 662 790 "http-body", 663 791 "hyper", 792 + "ipnet", 793 + "libc", 794 + "percent-encoding", 664 795 "pin-project-lite", 796 + "socket2", 665 797 "tokio", 666 798 "tower-service", 799 + "tracing", 667 800 ] 668 801 669 802 [[package]] ··· 810 943 ] 811 944 812 945 [[package]] 946 + name = "init-tracing-opentelemetry" 947 + version = "0.34.0" 948 + source = "registry+https://github.com/rust-lang/crates.io-index" 949 + checksum = "317b92661b729d90cce708de8a43cc7963fafe0710399f84299f9198a114fd4a" 950 + dependencies = [ 951 + "opentelemetry", 952 + "opentelemetry-otlp", 953 + "opentelemetry-semantic-conventions", 954 + "opentelemetry-stdout", 955 + "opentelemetry_sdk", 956 + "thiserror 2.0.17", 957 + "tracing", 958 + "tracing-opentelemetry", 959 + "tracing-subscriber", 960 + ] 961 + 962 + [[package]] 813 963 name = "inotify" 814 964 version = "0.11.0" 815 965 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 830 980 ] 831 981 832 982 [[package]] 983 + name = "ipnet" 984 + version = "2.11.0" 985 + source = "registry+https://github.com/rust-lang/crates.io-index" 986 + checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" 987 + 988 + [[package]] 989 + name = "iri-string" 990 + version = "0.7.9" 991 + source = "registry+https://github.com/rust-lang/crates.io-index" 992 + checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397" 993 + dependencies = [ 994 + "memchr", 995 + "serde", 996 + ] 997 + 998 + [[package]] 833 999 name = "itertools" 834 1000 version = "0.14.0" 835 1001 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 937 1103 version = "0.4.28" 938 1104 source = "registry+https://github.com/rust-lang/crates.io-index" 939 1105 checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" 1106 + 1107 + [[package]] 1108 + name = "lru-slab" 1109 + version = "0.1.2" 1110 + source = "registry+https://github.com/rust-lang/crates.io-index" 1111 + checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" 1112 + 1113 + [[package]] 1114 + name = "matchers" 1115 + version = "0.2.0" 1116 + source = "registry+https://github.com/rust-lang/crates.io-index" 1117 + checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" 1118 + dependencies = [ 1119 + "regex-automata", 1120 + ] 940 1121 941 1122 [[package]] 942 1123 name = "matchit" ··· 1040 1221 checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d" 1041 1222 1042 1223 [[package]] 1224 + name = "nu-ansi-term" 1225 + version = "0.50.3" 1226 + source = "registry+https://github.com/rust-lang/crates.io-index" 1227 + checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" 1228 + dependencies = [ 1229 + "windows-sys 0.61.2", 1230 + ] 1231 + 1232 + [[package]] 1043 1233 name = "num-bigint-dig" 1044 1234 version = "0.8.4" 1045 1235 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1051 1241 "num-integer", 1052 1242 "num-iter", 1053 1243 "num-traits", 1054 - "rand", 1244 + "rand 0.8.5", 1055 1245 "smallvec", 1056 1246 "zeroize", 1057 1247 ] ··· 1093 1283 checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 1094 1284 1095 1285 [[package]] 1286 + name = "openssl-probe" 1287 + version = "0.1.6" 1288 + source = "registry+https://github.com/rust-lang/crates.io-index" 1289 + checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" 1290 + 1291 + [[package]] 1292 + name = "opentelemetry" 1293 + version = "0.31.0" 1294 + source = "registry+https://github.com/rust-lang/crates.io-index" 1295 + checksum = "b84bcd6ae87133e903af7ef497404dda70c60d0ea14895fc8a5e6722754fc2a0" 1296 + dependencies = [ 1297 + "futures-core", 1298 + "futures-sink", 1299 + "js-sys", 1300 + "pin-project-lite", 1301 + "thiserror 2.0.17", 1302 + ] 1303 + 1304 + [[package]] 1305 + name = "opentelemetry-http" 1306 + version = "0.31.0" 1307 + source = "registry+https://github.com/rust-lang/crates.io-index" 1308 + checksum = "d7a6d09a73194e6b66df7c8f1b680f156d916a1a942abf2de06823dd02b7855d" 1309 + dependencies = [ 1310 + "async-trait", 1311 + "bytes", 1312 + "http", 1313 + "opentelemetry", 1314 + "reqwest", 1315 + ] 1316 + 1317 + [[package]] 1318 + name = "opentelemetry-otlp" 1319 + version = "0.31.0" 1320 + source = "registry+https://github.com/rust-lang/crates.io-index" 1321 + checksum = "7a2366db2dca4d2ad033cad11e6ee42844fd727007af5ad04a1730f4cb8163bf" 1322 + dependencies = [ 1323 + "http", 1324 + "opentelemetry", 1325 + "opentelemetry-http", 1326 + "opentelemetry-proto", 1327 + "opentelemetry_sdk", 1328 + "prost", 1329 + "reqwest", 1330 + "thiserror 2.0.17", 1331 + "tokio", 1332 + "tonic", 1333 + ] 1334 + 1335 + [[package]] 1336 + name = "opentelemetry-proto" 1337 + version = "0.31.0" 1338 + source = "registry+https://github.com/rust-lang/crates.io-index" 1339 + checksum = "a7175df06de5eaee9909d4805a3d07e28bb752c34cab57fa9cff549da596b30f" 1340 + dependencies = [ 1341 + "opentelemetry", 1342 + "opentelemetry_sdk", 1343 + "prost", 1344 + "tonic", 1345 + "tonic-prost", 1346 + ] 1347 + 1348 + [[package]] 1349 + name = "opentelemetry-semantic-conventions" 1350 + version = "0.31.0" 1351 + source = "registry+https://github.com/rust-lang/crates.io-index" 1352 + checksum = "e62e29dfe041afb8ed2a6c9737ab57db4907285d999ef8ad3a59092a36bdc846" 1353 + 1354 + [[package]] 1355 + name = "opentelemetry-stdout" 1356 + version = "0.31.0" 1357 + source = "registry+https://github.com/rust-lang/crates.io-index" 1358 + checksum = "bc8887887e169414f637b18751487cce4e095be787d23fad13c454e2fb1b3811" 1359 + dependencies = [ 1360 + "chrono", 1361 + "opentelemetry", 1362 + "opentelemetry_sdk", 1363 + ] 1364 + 1365 + [[package]] 1366 + name = "opentelemetry_sdk" 1367 + version = "0.31.0" 1368 + source = "registry+https://github.com/rust-lang/crates.io-index" 1369 + checksum = "e14ae4f5991976fd48df6d843de219ca6d31b01daaab2dad5af2badeded372bd" 1370 + dependencies = [ 1371 + "futures-channel", 1372 + "futures-executor", 1373 + "futures-util", 1374 + "opentelemetry", 1375 + "percent-encoding", 1376 + "rand 0.9.2", 1377 + "thiserror 2.0.17", 1378 + "tokio", 1379 + "tokio-stream", 1380 + ] 1381 + 1382 + [[package]] 1096 1383 name = "parking" 1097 1384 version = "2.2.1" 1098 1385 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1149 1436 "anyhow", 1150 1437 "axum", 1151 1438 "axum-extra", 1439 + "axum-tracing-opentelemetry", 1152 1440 "chrono", 1153 1441 "dotenvy", 1442 + "init-tracing-opentelemetry", 1154 1443 "minijinja", 1155 1444 "minijinja-autoreload", 1156 1445 "serde", ··· 1161 1450 "tokio", 1162 1451 "tower", 1163 1452 "tower-http", 1453 + "tracing", 1164 1454 "urlencoding", 1165 1455 ] 1166 1456 1167 1457 [[package]] 1458 + name = "pin-project" 1459 + version = "1.1.10" 1460 + source = "registry+https://github.com/rust-lang/crates.io-index" 1461 + checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" 1462 + dependencies = [ 1463 + "pin-project-internal", 1464 + ] 1465 + 1466 + [[package]] 1467 + name = "pin-project-internal" 1468 + version = "1.1.10" 1469 + source = "registry+https://github.com/rust-lang/crates.io-index" 1470 + checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" 1471 + dependencies = [ 1472 + "proc-macro2", 1473 + "quote", 1474 + "syn", 1475 + ] 1476 + 1477 + [[package]] 1168 1478 name = "pin-project-lite" 1169 1479 version = "0.2.16" 1170 1480 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1252 1562 ] 1253 1563 1254 1564 [[package]] 1565 + name = "prost" 1566 + version = "0.14.1" 1567 + source = "registry+https://github.com/rust-lang/crates.io-index" 1568 + checksum = "7231bd9b3d3d33c86b58adbac74b5ec0ad9f496b19d22801d773636feaa95f3d" 1569 + dependencies = [ 1570 + "bytes", 1571 + "prost-derive", 1572 + ] 1573 + 1574 + [[package]] 1575 + name = "prost-derive" 1576 + version = "0.14.1" 1577 + source = "registry+https://github.com/rust-lang/crates.io-index" 1578 + checksum = "9120690fafc389a67ba3803df527d0ec9cbbc9cc45e4cc20b332996dfb672425" 1579 + dependencies = [ 1580 + "anyhow", 1581 + "itertools", 1582 + "proc-macro2", 1583 + "quote", 1584 + "syn", 1585 + ] 1586 + 1587 + [[package]] 1588 + name = "quinn" 1589 + version = "0.11.9" 1590 + source = "registry+https://github.com/rust-lang/crates.io-index" 1591 + checksum = "b9e20a958963c291dc322d98411f541009df2ced7b5a4f2bd52337638cfccf20" 1592 + dependencies = [ 1593 + "bytes", 1594 + "cfg_aliases", 1595 + "pin-project-lite", 1596 + "quinn-proto", 1597 + "quinn-udp", 1598 + "rustc-hash", 1599 + "rustls", 1600 + "socket2", 1601 + "thiserror 2.0.17", 1602 + "tokio", 1603 + "tracing", 1604 + "web-time", 1605 + ] 1606 + 1607 + [[package]] 1608 + name = "quinn-proto" 1609 + version = "0.11.13" 1610 + source = "registry+https://github.com/rust-lang/crates.io-index" 1611 + checksum = "f1906b49b0c3bc04b5fe5d86a77925ae6524a19b816ae38ce1e426255f1d8a31" 1612 + dependencies = [ 1613 + "bytes", 1614 + "getrandom 0.3.4", 1615 + "lru-slab", 1616 + "rand 0.9.2", 1617 + "ring", 1618 + "rustc-hash", 1619 + "rustls", 1620 + "rustls-pki-types", 1621 + "slab", 1622 + "thiserror 2.0.17", 1623 + "tinyvec", 1624 + "tracing", 1625 + "web-time", 1626 + ] 1627 + 1628 + [[package]] 1629 + name = "quinn-udp" 1630 + version = "0.5.14" 1631 + source = "registry+https://github.com/rust-lang/crates.io-index" 1632 + checksum = "addec6a0dcad8a8d96a771f815f0eaf55f9d1805756410b39f5fa81332574cbd" 1633 + dependencies = [ 1634 + "cfg_aliases", 1635 + "libc", 1636 + "once_cell", 1637 + "socket2", 1638 + "tracing", 1639 + "windows-sys 0.60.2", 1640 + ] 1641 + 1642 + [[package]] 1255 1643 name = "quote" 1256 1644 version = "1.0.41" 1257 1645 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1261 1649 ] 1262 1650 1263 1651 [[package]] 1652 + name = "r-efi" 1653 + version = "5.3.0" 1654 + source = "registry+https://github.com/rust-lang/crates.io-index" 1655 + checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" 1656 + 1657 + [[package]] 1264 1658 name = "rand" 1265 1659 version = "0.8.5" 1266 1660 source = "registry+https://github.com/rust-lang/crates.io-index" 1267 1661 checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1268 1662 dependencies = [ 1269 1663 "libc", 1270 - "rand_chacha", 1271 - "rand_core", 1664 + "rand_chacha 0.3.1", 1665 + "rand_core 0.6.4", 1666 + ] 1667 + 1668 + [[package]] 1669 + name = "rand" 1670 + version = "0.9.2" 1671 + source = "registry+https://github.com/rust-lang/crates.io-index" 1672 + checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" 1673 + dependencies = [ 1674 + "rand_chacha 0.9.0", 1675 + "rand_core 0.9.3", 1272 1676 ] 1273 1677 1274 1678 [[package]] ··· 1278 1682 checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1279 1683 dependencies = [ 1280 1684 "ppv-lite86", 1281 - "rand_core", 1685 + "rand_core 0.6.4", 1686 + ] 1687 + 1688 + [[package]] 1689 + name = "rand_chacha" 1690 + version = "0.9.0" 1691 + source = "registry+https://github.com/rust-lang/crates.io-index" 1692 + checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" 1693 + dependencies = [ 1694 + "ppv-lite86", 1695 + "rand_core 0.9.3", 1282 1696 ] 1283 1697 1284 1698 [[package]] ··· 1287 1701 source = "registry+https://github.com/rust-lang/crates.io-index" 1288 1702 checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1289 1703 dependencies = [ 1290 - "getrandom", 1704 + "getrandom 0.2.16", 1705 + ] 1706 + 1707 + [[package]] 1708 + name = "rand_core" 1709 + version = "0.9.3" 1710 + source = "registry+https://github.com/rust-lang/crates.io-index" 1711 + checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" 1712 + dependencies = [ 1713 + "getrandom 0.3.4", 1291 1714 ] 1292 1715 1293 1716 [[package]] ··· 1329 1752 checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58" 1330 1753 1331 1754 [[package]] 1755 + name = "reqwest" 1756 + version = "0.12.24" 1757 + source = "registry+https://github.com/rust-lang/crates.io-index" 1758 + checksum = "9d0946410b9f7b082a427e4ef5c8ff541a88b357bc6c637c40db3a68ac70a36f" 1759 + dependencies = [ 1760 + "base64", 1761 + "bytes", 1762 + "futures-channel", 1763 + "futures-core", 1764 + "futures-util", 1765 + "http", 1766 + "http-body", 1767 + "http-body-util", 1768 + "hyper", 1769 + "hyper-rustls", 1770 + "hyper-util", 1771 + "js-sys", 1772 + "log", 1773 + "percent-encoding", 1774 + "pin-project-lite", 1775 + "quinn", 1776 + "rustls", 1777 + "rustls-native-certs", 1778 + "rustls-pki-types", 1779 + "serde", 1780 + "serde_json", 1781 + "serde_urlencoded", 1782 + "sync_wrapper", 1783 + "tokio", 1784 + "tokio-rustls", 1785 + "tower", 1786 + "tower-http", 1787 + "tower-service", 1788 + "url", 1789 + "wasm-bindgen", 1790 + "wasm-bindgen-futures", 1791 + "web-sys", 1792 + ] 1793 + 1794 + [[package]] 1795 + name = "ring" 1796 + version = "0.17.14" 1797 + source = "registry+https://github.com/rust-lang/crates.io-index" 1798 + checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" 1799 + dependencies = [ 1800 + "cc", 1801 + "cfg-if", 1802 + "getrandom 0.2.16", 1803 + "libc", 1804 + "untrusted", 1805 + "windows-sys 0.52.0", 1806 + ] 1807 + 1808 + [[package]] 1332 1809 name = "rsa" 1333 1810 version = "0.9.8" 1334 1811 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1341 1818 "num-traits", 1342 1819 "pkcs1", 1343 1820 "pkcs8", 1344 - "rand_core", 1821 + "rand_core 0.6.4", 1345 1822 "signature", 1346 1823 "spki", 1347 1824 "subtle", ··· 1349 1826 ] 1350 1827 1351 1828 [[package]] 1829 + name = "rustc-hash" 1830 + version = "2.1.1" 1831 + source = "registry+https://github.com/rust-lang/crates.io-index" 1832 + checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" 1833 + 1834 + [[package]] 1835 + name = "rustls" 1836 + version = "0.23.35" 1837 + source = "registry+https://github.com/rust-lang/crates.io-index" 1838 + checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" 1839 + dependencies = [ 1840 + "once_cell", 1841 + "ring", 1842 + "rustls-pki-types", 1843 + "rustls-webpki", 1844 + "subtle", 1845 + "zeroize", 1846 + ] 1847 + 1848 + [[package]] 1849 + name = "rustls-native-certs" 1850 + version = "0.8.2" 1851 + source = "registry+https://github.com/rust-lang/crates.io-index" 1852 + checksum = "9980d917ebb0c0536119ba501e90834767bffc3d60641457fd84a1f3fd337923" 1853 + dependencies = [ 1854 + "openssl-probe", 1855 + "rustls-pki-types", 1856 + "schannel", 1857 + "security-framework", 1858 + ] 1859 + 1860 + [[package]] 1861 + name = "rustls-pki-types" 1862 + version = "1.13.1" 1863 + source = "registry+https://github.com/rust-lang/crates.io-index" 1864 + checksum = "708c0f9d5f54ba0272468c1d306a52c495b31fa155e91bc25371e6df7996908c" 1865 + dependencies = [ 1866 + "web-time", 1867 + "zeroize", 1868 + ] 1869 + 1870 + [[package]] 1871 + name = "rustls-webpki" 1872 + version = "0.103.8" 1873 + source = "registry+https://github.com/rust-lang/crates.io-index" 1874 + checksum = "2ffdfa2f5286e2247234e03f680868ac2815974dc39e00ea15adc445d0aafe52" 1875 + dependencies = [ 1876 + "ring", 1877 + "rustls-pki-types", 1878 + "untrusted", 1879 + ] 1880 + 1881 + [[package]] 1352 1882 name = "rustversion" 1353 1883 version = "1.0.22" 1354 1884 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1370 1900 ] 1371 1901 1372 1902 [[package]] 1903 + name = "schannel" 1904 + version = "0.1.28" 1905 + source = "registry+https://github.com/rust-lang/crates.io-index" 1906 + checksum = "891d81b926048e76efe18581bf793546b4c0eaf8448d72be8de2bbee5fd166e1" 1907 + dependencies = [ 1908 + "windows-sys 0.61.2", 1909 + ] 1910 + 1911 + [[package]] 1373 1912 name = "scopeguard" 1374 1913 version = "1.2.0" 1375 1914 source = "registry+https://github.com/rust-lang/crates.io-index" 1376 1915 checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 1377 1916 1378 1917 [[package]] 1918 + name = "security-framework" 1919 + version = "3.5.1" 1920 + source = "registry+https://github.com/rust-lang/crates.io-index" 1921 + checksum = "b3297343eaf830f66ede390ea39da1d462b6b0c1b000f420d0a83f898bbbe6ef" 1922 + dependencies = [ 1923 + "bitflags 2.9.4", 1924 + "core-foundation", 1925 + "core-foundation-sys", 1926 + "libc", 1927 + "security-framework-sys", 1928 + ] 1929 + 1930 + [[package]] 1931 + name = "security-framework-sys" 1932 + version = "2.15.0" 1933 + source = "registry+https://github.com/rust-lang/crates.io-index" 1934 + checksum = "cc1f0cbffaac4852523ce30d8bd3c5cdc873501d96ff467ca09b6767bb8cd5c0" 1935 + dependencies = [ 1936 + "core-foundation-sys", 1937 + "libc", 1938 + ] 1939 + 1940 + [[package]] 1379 1941 name = "self_cell" 1380 1942 version = "1.2.0" 1381 1943 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1528 2090 ] 1529 2091 1530 2092 [[package]] 2093 + name = "sharded-slab" 2094 + version = "0.1.7" 2095 + source = "registry+https://github.com/rust-lang/crates.io-index" 2096 + checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" 2097 + dependencies = [ 2098 + "lazy_static", 2099 + ] 2100 + 2101 + [[package]] 1531 2102 name = "shlex" 1532 2103 version = "1.3.0" 1533 2104 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1540 2111 checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" 1541 2112 dependencies = [ 1542 2113 "digest", 1543 - "rand_core", 2114 + "rand_core 0.6.4", 1544 2115 ] 1545 2116 1546 2117 [[package]] ··· 1701 2272 "memchr", 1702 2273 "once_cell", 1703 2274 "percent-encoding", 1704 - "rand", 2275 + "rand 0.8.5", 1705 2276 "rsa", 1706 2277 "serde", 1707 2278 "sha1", ··· 1739 2310 "md-5", 1740 2311 "memchr", 1741 2312 "once_cell", 1742 - "rand", 2313 + "rand 0.8.5", 1743 2314 "serde", 1744 2315 "serde_json", 1745 2316 "sha2", ··· 1820 2391 version = "1.0.2" 1821 2392 source = "registry+https://github.com/rust-lang/crates.io-index" 1822 2393 checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 2394 + dependencies = [ 2395 + "futures-core", 2396 + ] 1823 2397 1824 2398 [[package]] 1825 2399 name = "synstructure" ··· 1873 2447 ] 1874 2448 1875 2449 [[package]] 2450 + name = "thread_local" 2451 + version = "1.1.9" 2452 + source = "registry+https://github.com/rust-lang/crates.io-index" 2453 + checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" 2454 + dependencies = [ 2455 + "cfg-if", 2456 + ] 2457 + 2458 + [[package]] 1876 2459 name = "tinystr" 1877 2460 version = "0.8.1" 1878 2461 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1924 2507 ] 1925 2508 1926 2509 [[package]] 2510 + name = "tokio-rustls" 2511 + version = "0.26.4" 2512 + source = "registry+https://github.com/rust-lang/crates.io-index" 2513 + checksum = "1729aa945f29d91ba541258c8df89027d5792d85a8841fb65e8bf0f4ede4ef61" 2514 + dependencies = [ 2515 + "rustls", 2516 + "tokio", 2517 + ] 2518 + 2519 + [[package]] 1927 2520 name = "tokio-stream" 1928 2521 version = "0.1.17" 1929 2522 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1948 2541 ] 1949 2542 1950 2543 [[package]] 2544 + name = "tonic" 2545 + version = "0.14.2" 2546 + source = "registry+https://github.com/rust-lang/crates.io-index" 2547 + checksum = "eb7613188ce9f7df5bfe185db26c5814347d110db17920415cf2fbcad85e7203" 2548 + dependencies = [ 2549 + "async-trait", 2550 + "base64", 2551 + "bytes", 2552 + "http", 2553 + "http-body", 2554 + "http-body-util", 2555 + "hyper", 2556 + "hyper-timeout", 2557 + "hyper-util", 2558 + "percent-encoding", 2559 + "pin-project", 2560 + "sync_wrapper", 2561 + "tokio", 2562 + "tokio-stream", 2563 + "tower", 2564 + "tower-layer", 2565 + "tower-service", 2566 + "tracing", 2567 + ] 2568 + 2569 + [[package]] 2570 + name = "tonic-prost" 2571 + version = "0.14.2" 2572 + source = "registry+https://github.com/rust-lang/crates.io-index" 2573 + checksum = "66bd50ad6ce1252d87ef024b3d64fe4c3cf54a86fb9ef4c631fdd0ded7aeaa67" 2574 + dependencies = [ 2575 + "bytes", 2576 + "prost", 2577 + "tonic", 2578 + ] 2579 + 2580 + [[package]] 1951 2581 name = "tower" 1952 2582 version = "0.5.2" 1953 2583 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 1955 2585 dependencies = [ 1956 2586 "futures-core", 1957 2587 "futures-util", 2588 + "indexmap", 1958 2589 "pin-project-lite", 2590 + "slab", 1959 2591 "sync_wrapper", 1960 2592 "tokio", 2593 + "tokio-util", 1961 2594 "tower-layer", 1962 2595 "tower-service", 1963 2596 "tracing", ··· 1978 2611 "http-body-util", 1979 2612 "http-range-header", 1980 2613 "httpdate", 2614 + "iri-string", 1981 2615 "mime", 1982 2616 "mime_guess", 1983 2617 "percent-encoding", 1984 2618 "pin-project-lite", 1985 2619 "tokio", 1986 2620 "tokio-util", 2621 + "tower", 1987 2622 "tower-layer", 1988 2623 "tower-service", 1989 2624 "tracing", ··· 2003 2638 2004 2639 [[package]] 2005 2640 name = "tracing" 2006 - version = "0.1.41" 2641 + version = "0.1.43" 2007 2642 source = "registry+https://github.com/rust-lang/crates.io-index" 2008 - checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 2643 + checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" 2009 2644 dependencies = [ 2010 2645 "log", 2011 2646 "pin-project-lite", ··· 2015 2650 2016 2651 [[package]] 2017 2652 name = "tracing-attributes" 2018 - version = "0.1.30" 2653 + version = "0.1.31" 2019 2654 source = "registry+https://github.com/rust-lang/crates.io-index" 2020 - checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" 2655 + checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" 2021 2656 dependencies = [ 2022 2657 "proc-macro2", 2023 2658 "quote", ··· 2026 2661 2027 2662 [[package]] 2028 2663 name = "tracing-core" 2029 - version = "0.1.34" 2664 + version = "0.1.35" 2665 + source = "registry+https://github.com/rust-lang/crates.io-index" 2666 + checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" 2667 + dependencies = [ 2668 + "once_cell", 2669 + "valuable", 2670 + ] 2671 + 2672 + [[package]] 2673 + name = "tracing-log" 2674 + version = "0.2.0" 2675 + source = "registry+https://github.com/rust-lang/crates.io-index" 2676 + checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" 2677 + dependencies = [ 2678 + "log", 2679 + "once_cell", 2680 + "tracing-core", 2681 + ] 2682 + 2683 + [[package]] 2684 + name = "tracing-opentelemetry" 2685 + version = "0.32.0" 2686 + source = "registry+https://github.com/rust-lang/crates.io-index" 2687 + checksum = "1e6e5658463dd88089aba75c7791e1d3120633b1bfde22478b28f625a9bb1b8e" 2688 + dependencies = [ 2689 + "js-sys", 2690 + "opentelemetry", 2691 + "opentelemetry_sdk", 2692 + "rustversion", 2693 + "smallvec", 2694 + "thiserror 2.0.17", 2695 + "tracing", 2696 + "tracing-core", 2697 + "tracing-log", 2698 + "tracing-subscriber", 2699 + "web-time", 2700 + ] 2701 + 2702 + [[package]] 2703 + name = "tracing-opentelemetry-instrumentation-sdk" 2704 + version = "0.32.2" 2705 + source = "registry+https://github.com/rust-lang/crates.io-index" 2706 + checksum = "4aea2e5bee9df9d098d951baeccb84e614f12cbc74d01d99fb3ac99a55bf7bf7" 2707 + dependencies = [ 2708 + "http", 2709 + "opentelemetry", 2710 + "opentelemetry-semantic-conventions", 2711 + "tracing", 2712 + "tracing-opentelemetry", 2713 + ] 2714 + 2715 + [[package]] 2716 + name = "tracing-serde" 2717 + version = "0.2.0" 2718 + source = "registry+https://github.com/rust-lang/crates.io-index" 2719 + checksum = "704b1aeb7be0d0a84fc9828cae51dab5970fee5088f83d1dd7ee6f6246fc6ff1" 2720 + dependencies = [ 2721 + "serde", 2722 + "tracing-core", 2723 + ] 2724 + 2725 + [[package]] 2726 + name = "tracing-subscriber" 2727 + version = "0.3.20" 2030 2728 source = "registry+https://github.com/rust-lang/crates.io-index" 2031 - checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" 2729 + checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" 2032 2730 dependencies = [ 2731 + "matchers", 2732 + "nu-ansi-term", 2033 2733 "once_cell", 2734 + "regex-automata", 2735 + "serde", 2736 + "serde_json", 2737 + "sharded-slab", 2738 + "thread_local", 2739 + "tracing", 2740 + "tracing-core", 2741 + "tracing-serde", 2034 2742 ] 2743 + 2744 + [[package]] 2745 + name = "try-lock" 2746 + version = "0.2.5" 2747 + source = "registry+https://github.com/rust-lang/crates.io-index" 2748 + checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 2035 2749 2036 2750 [[package]] 2037 2751 name = "typenum" ··· 2079 2793 checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" 2080 2794 2081 2795 [[package]] 2796 + name = "untrusted" 2797 + version = "0.9.0" 2798 + source = "registry+https://github.com/rust-lang/crates.io-index" 2799 + checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 2800 + 2801 + [[package]] 2082 2802 name = "url" 2083 2803 version = "2.5.7" 2084 2804 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2103 2823 checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 2104 2824 2105 2825 [[package]] 2826 + name = "valuable" 2827 + version = "0.1.1" 2828 + source = "registry+https://github.com/rust-lang/crates.io-index" 2829 + checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" 2830 + 2831 + [[package]] 2106 2832 name = "vcpkg" 2107 2833 version = "0.2.15" 2108 2834 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2125 2851 ] 2126 2852 2127 2853 [[package]] 2854 + name = "want" 2855 + version = "0.3.1" 2856 + source = "registry+https://github.com/rust-lang/crates.io-index" 2857 + checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 2858 + dependencies = [ 2859 + "try-lock", 2860 + ] 2861 + 2862 + [[package]] 2128 2863 name = "wasi" 2129 2864 version = "0.11.1+wasi-snapshot-preview1" 2130 2865 source = "registry+https://github.com/rust-lang/crates.io-index" 2131 2866 checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" 2132 2867 2133 2868 [[package]] 2869 + name = "wasip2" 2870 + version = "1.0.1+wasi-0.2.4" 2871 + source = "registry+https://github.com/rust-lang/crates.io-index" 2872 + checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" 2873 + dependencies = [ 2874 + "wit-bindgen", 2875 + ] 2876 + 2877 + [[package]] 2134 2878 name = "wasite" 2135 2879 version = "0.1.0" 2136 2880 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2164 2908 ] 2165 2909 2166 2910 [[package]] 2911 + name = "wasm-bindgen-futures" 2912 + version = "0.4.54" 2913 + source = "registry+https://github.com/rust-lang/crates.io-index" 2914 + checksum = "7e038d41e478cc73bae0ff9b36c60cff1c98b8f38f8d7e8061e79ee63608ac5c" 2915 + dependencies = [ 2916 + "cfg-if", 2917 + "js-sys", 2918 + "once_cell", 2919 + "wasm-bindgen", 2920 + "web-sys", 2921 + ] 2922 + 2923 + [[package]] 2167 2924 name = "wasm-bindgen-macro" 2168 2925 version = "0.2.104" 2169 2926 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2196 2953 ] 2197 2954 2198 2955 [[package]] 2956 + name = "web-sys" 2957 + version = "0.3.81" 2958 + source = "registry+https://github.com/rust-lang/crates.io-index" 2959 + checksum = "9367c417a924a74cae129e6a2ae3b47fabb1f8995595ab474029da749a8be120" 2960 + dependencies = [ 2961 + "js-sys", 2962 + "wasm-bindgen", 2963 + ] 2964 + 2965 + [[package]] 2966 + name = "web-time" 2967 + version = "1.1.0" 2968 + source = "registry+https://github.com/rust-lang/crates.io-index" 2969 + checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" 2970 + dependencies = [ 2971 + "js-sys", 2972 + "wasm-bindgen", 2973 + ] 2974 + 2975 + [[package]] 2199 2976 name = "whoami" 2200 2977 version = "1.6.1" 2201 2978 source = "registry+https://github.com/rust-lang/crates.io-index" ··· 2280 3057 checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2281 3058 dependencies = [ 2282 3059 "windows-targets 0.48.5", 3060 + ] 3061 + 3062 + [[package]] 3063 + name = "windows-sys" 3064 + version = "0.52.0" 3065 + source = "registry+https://github.com/rust-lang/crates.io-index" 3066 + checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 3067 + dependencies = [ 3068 + "windows-targets 0.52.6", 2283 3069 ] 2284 3070 2285 3071 [[package]] ··· 2494 3280 version = "0.53.1" 2495 3281 source = "registry+https://github.com/rust-lang/crates.io-index" 2496 3282 checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650" 3283 + 3284 + [[package]] 3285 + name = "wit-bindgen" 3286 + version = "0.46.0" 3287 + source = "registry+https://github.com/rust-lang/crates.io-index" 3288 + checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" 2497 3289 2498 3290 [[package]] 2499 3291 name = "writeable"
+7
Cargo.toml
··· 7 7 anyhow = "1.0.100" 8 8 axum = { version = "0.8.6", features = ["macros"] } 9 9 axum-extra = { version = "0.12.1", features = ["query"] } 10 + axum-tracing-opentelemetry = "0.32.2" 10 11 chrono = "0.4.42" 11 12 dotenvy = "0.15.7" 13 + init-tracing-opentelemetry = { version = "0.34.0", features = [ 14 + "otlp", 15 + "tracing_subscriber_ext", 16 + "metrics", 17 + ] } 12 18 minijinja = { version = "2.12.0", features = ["loader"] } 13 19 minijinja-autoreload = "2.12.0" 14 20 serde = "1.0.228" ··· 19 25 tokio = { version = "1.47.1", features = ["rt-multi-thread"] } 20 26 tower = "0.5.2" 21 27 tower-http = { version = "0.6.6", features = ["fs", "set-header"] } 28 + tracing = "0.1.43" 22 29 urlencoding = "2.1.3"
+16 -1
src/main.rs
··· 15 15 mod models; 16 16 mod routes; 17 17 mod templates; 18 + use axum_tracing_opentelemetry::middleware::{OtelAxumLayer, OtelInResponseLayer}; 19 + use init_tracing_opentelemetry::TracingConfig; 18 20 use models::{Photo, Tag}; 19 21 use sqlx::SqlitePool; 20 22 use templates::load_templates_dyn; ··· 28 30 #[tokio::main] 29 31 async fn main() -> anyhow::Result<()> { 30 32 let _ = dotenv(); 33 + let environment = env::var("ENVIRONMENT").unwrap_or("development".to_string()); 34 + let tracing_config = if environment == "production" { 35 + TracingConfig::production() 36 + } else { 37 + TracingConfig::development() 38 + }; 39 + 40 + let _guard = tracing_config.init_subscriber()?; 41 + 31 42 let pool = SqlitePool::connect(&env::var("DATABASE_URL")?) 32 43 .await 33 44 .expect("Where's the database???"); 45 + 46 + tracing::info!("connected to DB"); 34 47 35 48 let reloader = load_templates_dyn(); 36 49 let app_state = Arc::new(AppState { reloader, pool }); ··· 65 78 .route("/photos", get(routes::photos::index)) 66 79 .route("/photos/{id}", get(routes::photos::show)) 67 80 .with_state(app_state) 68 - .fallback(handler_404); 81 + .fallback(handler_404) 82 + .layer(OtelInResponseLayer) 83 + .layer(OtelAxumLayer::default()); 69 84 let listener = tokio::net::TcpListener::bind("0.0.0.0:3000").await.unwrap(); 70 85 axum::serve(listener, app).await?; 71 86