difftreelog
feat extract otel autoconfig from pusher
in: trunk
6 files changed
Cargo.lockdiffbeforeafterboth672 "libc",672 "libc",673]673]674675[[package]]676name = "crc32fast"677version = "1.5.0"678source = "registry+https://github.com/rust-lang/crates.io-index"679checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"680dependencies = [681 "cfg-if",682]674683675[[package]]684[[package]]676name = "crossterm"685name = "crossterm"999source = "registry+https://github.com/rust-lang/crates.io-index"1008source = "registry+https://github.com/rust-lang/crates.io-index"1000checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"1009checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"10101011[[package]]1012name = "flate2"1013version = "1.1.1"1014source = "registry+https://github.com/rust-lang/crates.io-index"1015checksum = "7ced92e76e966ca2fd84c8f7aa01a4aea65b0eb6648d72f7c8f3e2764a67fece"1016dependencies = [1017 "crc32fast",1018 "miniz_oxide",1019]100110201002[[package]]1021[[package]]1003name = "fleet"1022name = "fleet"1025 "nixlike",1044 "nixlike",1026 "nom 8.0.0",1045 "nom 8.0.0",1027 "openssh",1046 "openssh",1047 "opentelemetry",1048 "opentelemetry_sdk",1028 "owo-colors",1049 "owo-colors",1029 "peg",1050 "peg",1030 "regex",1051 "regex",1038 "tokio-util",1059 "tokio-util",1039 "tracing",1060 "tracing",1040 "tracing-indicatif",1061 "tracing-indicatif",1062 "tracing-opentelemetry",1041 "tracing-subscriber",1063 "tracing-subscriber",1042]1064]104310651167source = "registry+https://github.com/rust-lang/crates.io-index"1189source = "registry+https://github.com/rust-lang/crates.io-index"1168checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"1190checksum = "77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb"11911192[[package]]1193name = "form_urlencoded"1194version = "1.2.2"1195source = "registry+https://github.com/rust-lang/crates.io-index"1196checksum = "cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf"1197dependencies = [1198 "percent-encoding",1199]116912001170[[package]]1201[[package]]1171name = "futures"1202name = "futures"1492source = "registry+https://github.com/rust-lang/crates.io-index"1523source = "registry+https://github.com/rust-lang/crates.io-index"1493checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e"1524checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e"1494dependencies = [1525dependencies = [1526 "base64 0.22.1",1495 "bytes",1527 "bytes",1496 "futures-channel",1528 "futures-channel",1497 "futures-core",1529 "futures-core",1498 "futures-util",1530 "futures-util",1499 "http",1531 "http",1500 "http-body",1532 "http-body",1501 "hyper",1533 "hyper",1534 "ipnet",1502 "libc",1535 "libc",1536 "percent-encoding",1503 "pin-project-lite",1537 "pin-project-lite",1504 "socket2 0.6.0",1538 "socket2 0.6.0",1505 "tokio",1539 "tokio",1597 "cc",1631 "cc",1598]1632]16331634[[package]]1635name = "icu_collections"1636version = "2.0.0"1637source = "registry+https://github.com/rust-lang/crates.io-index"1638checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47"1639dependencies = [1640 "displaydoc",1641 "potential_utf",1642 "yoke",1643 "zerofrom",1644 "zerovec",1645]16461647[[package]]1648name = "icu_locale_core"1649version = "2.0.0"1650source = "registry+https://github.com/rust-lang/crates.io-index"1651checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a"1652dependencies = [1653 "displaydoc",1654 "litemap",1655 "tinystr",1656 "writeable",1657 "zerovec",1658]16591660[[package]]1661name = "icu_normalizer"1662version = "2.0.0"1663source = "registry+https://github.com/rust-lang/crates.io-index"1664checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979"1665dependencies = [1666 "displaydoc",1667 "icu_collections",1668 "icu_normalizer_data",1669 "icu_properties",1670 "icu_provider",1671 "smallvec",1672 "zerovec",1673]16741675[[package]]1676name = "icu_normalizer_data"1677version = "2.0.0"1678source = "registry+https://github.com/rust-lang/crates.io-index"1679checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3"16801681[[package]]1682name = "icu_properties"1683version = "2.0.1"1684source = "registry+https://github.com/rust-lang/crates.io-index"1685checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b"1686dependencies = [1687 "displaydoc",1688 "icu_collections",1689 "icu_locale_core",1690 "icu_properties_data",1691 "icu_provider",1692 "potential_utf",1693 "zerotrie",1694 "zerovec",1695]16961697[[package]]1698name = "icu_properties_data"1699version = "2.0.1"1700source = "registry+https://github.com/rust-lang/crates.io-index"1701checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632"17021703[[package]]1704name = "icu_provider"1705version = "2.0.0"1706source = "registry+https://github.com/rust-lang/crates.io-index"1707checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af"1708dependencies = [1709 "displaydoc",1710 "icu_locale_core",1711 "stable_deref_trait",1712 "tinystr",1713 "writeable",1714 "yoke",1715 "zerofrom",1716 "zerotrie",1717 "zerovec",1718]17191720[[package]]1721name = "idna"1722version = "1.1.0"1723source = "registry+https://github.com/rust-lang/crates.io-index"1724checksum = "3b0875f23caa03898994f6ddc501886a45c7d3d62d04d2d90788d47be1b1e4de"1725dependencies = [1726 "idna_adapter",1727 "smallvec",1728 "utf8_iter",1729]17301731[[package]]1732name = "idna_adapter"1733version = "1.2.1"1734source = "registry+https://github.com/rust-lang/crates.io-index"1735checksum = "3acae9609540aa318d1bc588455225fb2085b9ed0c4f6bd0d9d5bcd86f1a0344"1736dependencies = [1737 "icu_normalizer",1738 "icu_properties",1739]159917401600[[package]]1741[[package]]1601name = "indexmap"1742name = "indexmap"1683source = "registry+https://github.com/rust-lang/crates.io-index"1824source = "registry+https://github.com/rust-lang/crates.io-index"1684checksum = "4b3f7cef34251886990511df1c61443aa928499d598a9473929ab5a90a527304"1825checksum = "4b3f7cef34251886990511df1c61443aa928499d598a9473929ab5a90a527304"18261827[[package]]1828name = "ipnet"1829version = "2.11.0"1830source = "registry+https://github.com/rust-lang/crates.io-index"1831checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130"18321833[[package]]1834name = "iri-string"1835version = "0.7.8"1836source = "registry+https://github.com/rust-lang/crates.io-index"1837checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2"1838dependencies = [1839 "memchr",1840 "serde",1841]168518421686[[package]]1843[[package]]1687name = "is-terminal"1844name = "is-terminal"1798source = "registry+https://github.com/rust-lang/crates.io-index"1955source = "registry+https://github.com/rust-lang/crates.io-index"1799checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"1956checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12"19571958[[package]]1959name = "litemap"1960version = "0.8.0"1961source = "registry+https://github.com/rust-lang/crates.io-index"1962checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956"180019631801[[package]]1964[[package]]1802name = "litrs"1965name = "litrs"2049 "tokio",2212 "tokio",2050]2213]22142215[[package]]2216name = "opentelemetry"2217version = "0.30.0"2218source = "registry+https://github.com/rust-lang/crates.io-index"2219checksum = "aaf416e4cb72756655126f7dd7bb0af49c674f4c1b9903e80c009e0c37e552e6"2220dependencies = [2221 "futures-core",2222 "futures-sink",2223 "js-sys",2224 "pin-project-lite",2225 "thiserror 2.0.16",2226 "tracing",2227]22282229[[package]]2230name = "opentelemetry-exporter-env"2231version = "0.1.0"2232dependencies = [2233 "clap",2234 "opentelemetry-otlp",2235 "thiserror 2.0.16",2236]22372238[[package]]2239name = "opentelemetry-http"2240version = "0.30.0"2241source = "registry+https://github.com/rust-lang/crates.io-index"2242checksum = "50f6639e842a97dbea8886e3439710ae463120091e2e064518ba8e716e6ac36d"2243dependencies = [2244 "async-trait",2245 "bytes",2246 "http",2247 "opentelemetry",2248 "reqwest",2249]22502251[[package]]2252name = "opentelemetry-otlp"2253version = "0.30.0"2254source = "registry+https://github.com/rust-lang/crates.io-index"2255checksum = "dbee664a43e07615731afc539ca60c6d9f1a9425e25ca09c57bc36c87c55852b"2256dependencies = [2257 "http",2258 "opentelemetry",2259 "opentelemetry-http",2260 "opentelemetry-proto",2261 "opentelemetry_sdk",2262 "prost",2263 "reqwest",2264 "serde_json",2265 "thiserror 2.0.16",2266 "tokio",2267 "tonic 0.13.1",2268 "tracing",2269]22702271[[package]]2272name = "opentelemetry-proto"2273version = "0.30.0"2274source = "registry+https://github.com/rust-lang/crates.io-index"2275checksum = "2e046fd7660710fe5a05e8748e70d9058dc15c94ba914e7c4faa7c728f0e8ddc"2276dependencies = [2277 "base64 0.22.1",2278 "hex",2279 "opentelemetry",2280 "opentelemetry_sdk",2281 "prost",2282 "serde",2283 "tonic 0.13.1",2284]22852286[[package]]2287name = "opentelemetry_sdk"2288version = "0.30.0"2289source = "registry+https://github.com/rust-lang/crates.io-index"2290checksum = "11f644aa9e5e31d11896e024305d7e3c98a88884d9f8919dbf37a9991bc47a4b"2291dependencies = [2292 "futures-channel",2293 "futures-executor",2294 "futures-util",2295 "opentelemetry",2296 "percent-encoding",2297 "rand 0.9.2",2298 "serde_json",2299 "thiserror 2.0.16",2300]205123012052[[package]]2302[[package]]2053name = "owo-colors"2303name = "owo-colors"2250source = "registry+https://github.com/rust-lang/crates.io-index"2500source = "registry+https://github.com/rust-lang/crates.io-index"2251checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"2501checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"25022503[[package]]2504name = "potential_utf"2505version = "0.1.3"2506source = "registry+https://github.com/rust-lang/crates.io-index"2507checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a"2508dependencies = [2509 "zerovec",2510]225225112253[[package]]2512[[package]]2254name = "powerfmt"2513name = "powerfmt"2483source = "registry+https://github.com/rust-lang/crates.io-index"2742source = "registry+https://github.com/rust-lang/crates.io-index"2484checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"2743checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001"27442745[[package]]2746name = "reqwest"2747version = "0.12.23"2748source = "registry+https://github.com/rust-lang/crates.io-index"2749checksum = "d429f34c8092b2d42c7c93cec323bb4adeb7c67698f70839adec842ec10c7ceb"2750dependencies = [2751 "base64 0.22.1",2752 "bytes",2753 "futures-channel",2754 "futures-core",2755 "futures-util",2756 "http",2757 "http-body",2758 "http-body-util",2759 "hyper",2760 "hyper-util",2761 "js-sys",2762 "log",2763 "percent-encoding",2764 "pin-project-lite",2765 "serde",2766 "serde_json",2767 "serde_urlencoded",2768 "sync_wrapper",2769 "tokio",2770 "tower 0.5.2",2771 "tower-http 0.6.6",2772 "tower-service",2773 "url",2774 "wasm-bindgen",2775 "wasm-bindgen-futures",2776 "web-sys",2777]248527782486[[package]]2779[[package]]2487name = "ring"2780name = "ring"2816 "serde",3109 "serde",2817]3110]31113112[[package]]3113name = "serde_urlencoded"3114version = "0.7.1"3115source = "registry+https://github.com/rust-lang/crates.io-index"3116checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd"3117dependencies = [3118 "form_urlencoded",3119 "itoa",3120 "ryu",3121 "serde",3122]281831232819[[package]]3124[[package]]2820name = "sha2"3125name = "sha2"2936 "der",3241 "der",2937]3242]32433244[[package]]3245name = "stable_deref_trait"3246version = "1.2.0"3247source = "registry+https://github.com/rust-lang/crates.io-index"3248checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"293832492939[[package]]3250[[package]]2940name = "strsim"3251name = "strsim"2983version = "1.0.2"3294version = "1.0.2"2984source = "registry+https://github.com/rust-lang/crates.io-index"3295source = "registry+https://github.com/rust-lang/crates.io-index"2985checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"3296checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263"3297dependencies = [3298 "futures-core",3299]33003301[[package]]3302name = "synstructure"3303version = "0.13.2"3304source = "registry+https://github.com/rust-lang/crates.io-index"3305checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2"3306dependencies = [3307 "proc-macro2",3308 "quote",3309 "syn",3310]298633112987[[package]]3312[[package]]2988name = "tabled"3313name = "tabled"3103 "tokio",3428 "tokio",3104 "tokio-stream",3429 "tokio-stream",3105 "tokio-util",3430 "tokio-util",3106 "tonic",3431 "tonic 0.12.3",3107 "tonic-build",3432 "tonic-build",3108 "tower-http",3433 "tower-http 0.5.2",3109 "tracing",3434 "tracing",3110 "tracing-subscriber",3435 "tracing-subscriber",3111]3436]3305 "tracing",3630 "tracing",3306]3631]36323633[[package]]3634name = "tonic"3635version = "0.13.1"3636source = "registry+https://github.com/rust-lang/crates.io-index"3637checksum = "7e581ba15a835f4d9ea06c55ab1bd4dce26fc53752c69a04aac00703bfb49ba9"3638dependencies = [3639 "async-trait",3640 "base64 0.22.1",3641 "bytes",3642 "flate2",3643 "http",3644 "http-body",3645 "http-body-util",3646 "hyper",3647 "hyper-timeout",3648 "hyper-util",3649 "percent-encoding",3650 "pin-project",3651 "prost",3652 "tokio",3653 "tokio-stream",3654 "tower 0.5.2",3655 "tower-layer",3656 "tower-service",3657 "tracing",3658]330736593308[[package]]3660[[package]]3309name = "tonic-build"3661name = "tonic-build"3347dependencies = [3699dependencies = [3348 "futures-core",3700 "futures-core",3349 "futures-util",3701 "futures-util",3702 "indexmap 2.11.0",3350 "pin-project-lite",3703 "pin-project-lite",3704 "slab",3351 "sync_wrapper",3705 "sync_wrapper",3706 "tokio",3707 "tokio-util",3352 "tower-layer",3708 "tower-layer",3353 "tower-service",3709 "tower-service",3710 "tracing",3354]3711]335537123356[[package]]3713[[package]]3370 "tracing",3727 "tracing",3371]3728]37293730[[package]]3731name = "tower-http"3732version = "0.6.6"3733source = "registry+https://github.com/rust-lang/crates.io-index"3734checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2"3735dependencies = [3736 "bitflags",3737 "bytes",3738 "futures-util",3739 "http",3740 "http-body",3741 "iri-string",3742 "pin-project-lite",3743 "tower 0.5.2",3744 "tower-layer",3745 "tower-service",3746]337237473373[[package]]3748[[package]]3374name = "tower-layer"3749name = "tower-layer"3437 "tracing-core",3812 "tracing-core",3438]3813]38143815[[package]]3816name = "tracing-opentelemetry"3817version = "0.31.0"3818source = "registry+https://github.com/rust-lang/crates.io-index"3819checksum = "ddcf5959f39507d0d04d6413119c04f33b623f4f951ebcbdddddfad2d0623a9c"3820dependencies = [3821 "js-sys",3822 "once_cell",3823 "opentelemetry",3824 "opentelemetry_sdk",3825 "smallvec",3826 "tracing",3827 "tracing-core",3828 "tracing-log",3829 "tracing-subscriber",3830 "web-time",3831]343938323440[[package]]3833[[package]]3441name = "tracing-serde"3834name = "tracing-serde"3566source = "registry+https://github.com/rust-lang/crates.io-index"3959source = "registry+https://github.com/rust-lang/crates.io-index"3567checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"3960checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"39613962[[package]]3963name = "url"3964version = "2.5.7"3965source = "registry+https://github.com/rust-lang/crates.io-index"3966checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b"3967dependencies = [3968 "form_urlencoded",3969 "idna",3970 "percent-encoding",3971 "serde",3972]39733974[[package]]3975name = "utf8_iter"3976version = "1.0.4"3977source = "registry+https://github.com/rust-lang/crates.io-index"3978checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be"356839793569[[package]]3980[[package]]3570name = "utf8parse"3981name = "utf8parse"3690 "wasm-bindgen-shared",4101 "wasm-bindgen-shared",3691]4102]41034104[[package]]4105name = "wasm-bindgen-futures"4106version = "0.4.50"4107source = "registry+https://github.com/rust-lang/crates.io-index"4108checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61"4109dependencies = [4110 "cfg-if",4111 "js-sys",4112 "once_cell",4113 "wasm-bindgen",4114 "web-sys",4115]369241163693[[package]]4117[[package]]3694name = "wasm-bindgen-macro"4118name = "wasm-bindgen-macro"3722 "unicode-ident",4146 "unicode-ident",3723]4147]41484149[[package]]4150name = "web-sys"4151version = "0.3.77"4152source = "registry+https://github.com/rust-lang/crates.io-index"4153checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2"4154dependencies = [4155 "js-sys",4156 "wasm-bindgen",4157]372441583725[[package]]4159[[package]]3726name = "web-time"4160name = "web-time"3996source = "registry+https://github.com/rust-lang/crates.io-index"4430source = "registry+https://github.com/rust-lang/crates.io-index"3997checksum = "052283831dbae3d879dc7f51f3d92703a316ca49f91540417d38591826127814"4431checksum = "052283831dbae3d879dc7f51f3d92703a316ca49f91540417d38591826127814"44324433[[package]]4434name = "writeable"4435version = "0.6.1"4436source = "registry+https://github.com/rust-lang/crates.io-index"4437checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb"399844383999[[package]]4439[[package]]4000name = "wsl"4440name = "wsl"4023 "time",4463 "time",4024]4464]44654466[[package]]4467name = "yoke"4468version = "0.8.0"4469source = "registry+https://github.com/rust-lang/crates.io-index"4470checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc"4471dependencies = [4472 "serde",4473 "stable_deref_trait",4474 "yoke-derive",4475 "zerofrom",4476]44774478[[package]]4479name = "yoke-derive"4480version = "0.8.0"4481source = "registry+https://github.com/rust-lang/crates.io-index"4482checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6"4483dependencies = [4484 "proc-macro2",4485 "quote",4486 "syn",4487 "synstructure",4488]402544894026[[package]]4490[[package]]4027name = "z85"4491name = "z85"4054version = "0.1.6"4518version = "0.1.6"4055source = "registry+https://github.com/rust-lang/crates.io-index"4519source = "registry+https://github.com/rust-lang/crates.io-index"4056checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"4520checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5"4521dependencies = [4522 "zerofrom-derive",4523]45244525[[package]]4526name = "zerofrom-derive"4527version = "0.1.6"4528source = "registry+https://github.com/rust-lang/crates.io-index"4529checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502"4530dependencies = [4531 "proc-macro2",4532 "quote",4533 "syn",4534 "synstructure",4535]405745364058[[package]]4537[[package]]4059name = "zeroize"4538name = "zeroize"4075 "syn",4554 "syn",4076]4555]45564557[[package]]4558name = "zerotrie"4559version = "0.2.2"4560source = "registry+https://github.com/rust-lang/crates.io-index"4561checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595"4562dependencies = [4563 "displaydoc",4564 "yoke",4565 "zerofrom",4566]407745674078[[package]]4568[[package]]4079name = "zerovec"4569name = "zerovec"4080version = "0.11.4"4570version = "0.11.4"4081source = "registry+https://github.com/rust-lang/crates.io-index"4571source = "registry+https://github.com/rust-lang/crates.io-index"4082checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b"4572checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b"4083dependencies = [4573dependencies = [4574 "yoke",4084 "zerofrom",4575 "zerofrom",4576 "zerovec-derive",4085]4577]45784579[[package]]4580name = "zerovec-derive"4581version = "0.11.1"4582source = "registry+https://github.com/rust-lang/crates.io-index"4583checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f"4584dependencies = [4585 "proc-macro2",4586 "quote",4587 "syn",4588]40864589cmds/fleet/Cargo.tomldiffbeforeafterboth--- a/cmds/fleet/Cargo.toml
+++ b/cmds/fleet/Cargo.toml
@@ -46,6 +46,9 @@
indicatif = { version = "0.18", optional = true }
nom = "8.0.0"
tracing-indicatif = { version = "0.3", optional = true }
+tracing-opentelemetry = "0.31.0"
+opentelemetry = "0.30.0"
+opentelemetry_sdk = "0.30.0"
[features]
default = []
cmds/fleet/src/main.rsdiffbeforeafterboth--- a/cmds/fleet/src/main.rs
+++ b/cmds/fleet/src/main.rs
@@ -4,7 +4,7 @@
// pub(crate) mod command;
pub(crate) mod extra_args;
-use std::{ffi::OsString, process::ExitCode};
+use std::{env, ffi::OsString, process::ExitCode};
use anyhow::{Result, bail};
use clap::{CommandFactory, Parser};
@@ -27,7 +27,7 @@
use tracing::{Instrument, error, info, info_span};
#[cfg(feature = "indicatif")]
use tracing_indicatif::IndicatifLayer;
-use tracing_subscriber::{fmt::format::Format, prelude::*, EnvFilter};
+use tracing_subscriber::{EnvFilter, fmt::format::Format, prelude::*};
#[derive(Parser)]
struct Prefetch {}
@@ -170,6 +170,9 @@
let sub = sub.with_writer(indicatif_layer.get_stderr_writer());
sub.with_filter(filter) // .without,
});
+
+ if env::var_os("FLEET_OTEL").is_some() {}
+
// #[cfg(feature = "indicatif")]
#[cfg(feature = "indicatif")]
let reg = reg.with(indicatif_layer);
crates/opentelemetry-exporter-env/Cargo.tomldiffbeforeafterboth--- /dev/null
+++ b/crates/opentelemetry-exporter-env/Cargo.toml
@@ -0,0 +1,15 @@
+[package]
+name = "opentelemetry-exporter-env"
+version.workspace = true
+edition.workspace = true
+rust-version.workspace = true
+
+[dependencies]
+clap = { workspace = true, optional = true }
+opentelemetry-otlp = { version = "0.30.0", features = ["grpc-tonic", "gzip-tonic", "http-json"], optional = true }
+thiserror.workspace = true
+
+[features]
+default = ["clap", "otlp"]
+clap = ["dep:clap"]
+otlp = ["dep:opentelemetry-otlp"]
crates/opentelemetry-exporter-env/src/lib.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/opentelemetry-exporter-env/src/lib.rs
@@ -0,0 +1,264 @@
+use std::collections::HashMap;
+use std::convert::Infallible;
+use std::env::{self, VarError};
+use std::ffi::OsString;
+use std::num::ParseIntError;
+use std::str::FromStr;
+use std::time::Duration;
+
+use clap::Parser;
+#[cfg(feature = "otlp")]
+use opentelemetry_otlp::tonic_types::metadata::MetadataMap;
+#[cfg(feature = "otlp")]
+use opentelemetry_otlp::{
+ ExporterBuildError, LogExporter, MetricExporter, SpanExporter, WithExportConfig,
+ WithHttpConfig, WithTonicConfig,
+};
+
+#[cfg(feature = "otlp")]
+mod otlp;
+
+pub enum Error {
+ InvalidUtf8 {
+ env: &'static str,
+ value: OsString,
+ },
+ EnvParseError {
+ env: &'static str,
+ value: String,
+ error: &'static str,
+ },
+ EnvParseIntError {
+ env: &'static str,
+ value: String,
+ error: ParseIntError,
+ },
+}
+impl From<(&'static str, &'static str, String)> for Error {
+ fn from((env, error, value): (&'static str, &'static str, String)) -> Self {
+ Self::EnvParseError { env, value, error }
+ }
+}
+impl From<(&'static str, ParseIntError, String)> for Error {
+ fn from((env, error, value): (&'static str, ParseIntError, String)) -> Self {
+ Self::EnvParseIntError { env, value, error }
+ }
+}
+impl From<(&'static str, Infallible, String)> for Error {
+ fn from(_v: (&'static str, Infallible, String)) -> Self {
+ unreachable!()
+ }
+}
+
+fn load_env<T>(env: &'static str) -> Result<Option<T>, Error>
+where
+ T: FromStr,
+ Error: From<(&'static str, <T as FromStr>::Err, String)>,
+{
+ match env::var(env) {
+ Ok(v) => Ok(Some(T::from_str(&v).map_err(|err| (env, err, v))?)),
+ Err(VarError::NotPresent) => Ok(None),
+ Err(VarError::NotUnicode(value)) => Err(Error::InvalidUtf8 { env, value }),
+ }
+}
+
+macro_rules! impl_settings {
+ (
+ #[name($env_prefix:literal, $long_prefix:literal)]
+ struct $id:ident {
+ $(
+ $(#[doc = $doc:literal])*
+ #[name($env:literal, $long:literal)]
+ $(#[arg($($tt:tt)*)])?
+ $name:ident: $ty:ty,
+ )*
+ }) => {
+ #[derive(Parser)]
+ pub struct $id {
+ $(
+ $(#[doc = $doc])*
+ #[arg(long = concat!("otel-exporter-otlp-", $long_prefix, $long), env = concat!("OTEL_EXPORTER_OTLP_", $env_prefix, $env), $($($tt)*)?)]
+ pub $name: Option<$ty>,
+ )*
+ }
+ impl $id {
+ pub fn from_env() -> Result<Self, Error> {
+ Ok(Self {
+ $(
+ $name: load_env(concat!("OTEL_EXPORTER_OTLP_", $env_prefix, $env))?,
+ )*
+ })
+ }
+ }
+ }
+}
+macro_rules! impl_enum {
+ (enum $id:ident {
+ $(
+ #[name = $value:literal]
+ $var:ident,
+ )*
+ }) => {
+ #[derive(Clone, Copy)]
+ #[cfg_attr(feature = "clap", derive(clap::ValueEnum))]
+ pub enum $id {
+ $(
+ #[cfg_attr(feature = "clap", value(name = $value))]
+ $var,
+ )*
+ }
+ impl FromStr for $id {
+ type Err = &'static str;
+
+ fn from_str(s: &str) -> Result<Self, Self::Err> {
+ Ok(match s {
+ $(
+ $value => Self::$var,
+ )*
+ _ => return Err("unsupported value, supported are")
+ })
+ }
+ }
+ };
+}
+
+impl_enum! {
+ enum Compression {
+ #[name = "gzip"]
+ Gzip,
+ #[name = "zstd"]
+ Zstd,
+ }
+}
+#[cfg(feature = "otlp")]
+impl From<Compression> for opentelemetry_otlp::Compression {
+ fn from(value: Compression) -> Self {
+ match value {
+ Compression::Gzip => opentelemetry_otlp::Compression::Gzip,
+ Compression::Zstd => opentelemetry_otlp::Compression::Zstd,
+ }
+ }
+}
+
+impl_enum! {
+ enum OtlpProtocol {
+ #[name = "grpc"]
+ Grpc,
+ #[name = "http/protobuf"]
+ HttpProtobuf,
+ #[name = "http/json"]
+ HttpJson,
+ }
+}
+#[cfg(feature = "otlp")]
+impl From<OtlpProtocol> for opentelemetry_otlp::Protocol {
+ fn from(value: OtlpProtocol) -> Self {
+ match value {
+ OtlpProtocol::Grpc => opentelemetry_otlp::Protocol::Grpc,
+ OtlpProtocol::HttpProtobuf => opentelemetry_otlp::Protocol::HttpBinary,
+ OtlpProtocol::HttpJson => opentelemetry_otlp::Protocol::HttpJson,
+ }
+ }
+}
+
+impl_settings! {
+ #[name("", "")]
+ struct OtlpBaseSettings {
+ /// Specifies the OTLP transport compression to be used for all telemetry data.
+ #[name("COMPRESSION", "compression")]
+ #[arg(value_enum)]
+ compression: Compression,
+ /// A base endpoint URL for any signal type, with an optionally-specified port number. Helpful for when you’re sending more than one signal to the same endpoint and want one environment variable to control the endpoint.
+ #[name("ENDPOINT", "endpoint")]
+ endpoint: String,
+ /// A list of headers to apply to all outgoing data (traces, metrics, and logs).
+ #[name("HEADERS", "headers")]
+ headers: String,
+ /// Specifies the OTLP transport protocol to be used for all telemetry data.
+ #[name("PROTOCOL", "protocol")]
+ #[arg(value_enum)]
+ protocol: OtlpProtocol,
+ /// The timeout value for all outgoing data (traces, metrics, and logs) in milliseconds.
+ #[name("TIMEOUT", "timeout")]
+ timeout: u64,
+ }
+}
+impl_settings! {
+ #[name("LOGS_", "logs-")]
+ struct OtlpLogsSettings {
+ /// Specifies the OTLP transport compression to be used for log data.
+ #[name("COMPRESSION", "compression")]
+ #[arg(value_enum)]
+ compression: Compression,
+ /// Endpoint URL for log data only, with an optionally-specified port number. Typically ends with `v1/logs` when using OTLP/HTTP.
+ #[name("ENDPOINT", "endpoint")]
+ endpoint: String,
+ /// A list of headers to apply to all outgoing logs.
+ #[name("HEADERS", "headers")]
+ headers: String,
+ /// Specifies the OTLP transport protocol to be used for log data.
+ #[name("PROTOCOL", "protocol")]
+ #[arg(value_enum)]
+ protocol: OtlpProtocol,
+ /// The timeout value for all outgoing logs in milliseconds.
+ #[name("TIMEOUT", "timeout")]
+ timeout: u64,
+ }
+}
+impl_settings! {
+ #[name("METRICS_", "metrics-")]
+ struct OtlpMetricsSettings {
+ /// Specifies the OTLP transport compression to be used for metrics data.
+ #[name("COMPRESSION", "compression")]
+ #[arg(value_enum)]
+ compression: Compression,
+ /// Endpoint URL for metric data only, with an optionally-specified port number. Typically ends with `v1/metrics` when using OTLP/HTTP.
+ #[name("ENDPOINT", "endpoint")]
+ endpoint: String,
+ /// A list of headers to apply to all outgoing metrics.
+ #[name("HEADERS", "headers")]
+ headers: String,
+ /// Specifies the OTLP transport protocol to be used for metrics data.
+ #[name("PROTOCOL", "protocol")]
+ #[arg(value_enum)]
+ protocol: OtlpProtocol,
+ /// The timeout value for all outgoing metrics in milliseconds.
+ #[name("TIMEOUT", "timeout")]
+ timeout: u64,
+ }
+}
+
+impl_settings! {
+ #[name("TRACES_", "traces-")]
+ struct OtlpTracesSettings {
+ /// Specifies the OTLP transport compression to be used for trace data.
+ #[name("COMPRESSION", "compression")]
+ #[arg(value_enum)]
+ compression: Compression,
+ /// Endpoint URL for trace data only, with an optionally-specified port number. Typically ends with `v1/traces` when using OTLP/HTTP.
+ #[name("ENDPOINT", "endpoint")]
+ endpoint: String,
+ /// A list of headers to apply to all outgoing traces.
+ #[name("HEADERS", "headers")]
+ headers: String,
+ /// Specifies the OTLP transport protocol to be used for trace data.
+ #[name("PROTOCOL", "protocol")]
+ #[arg(value_enum)]
+ protocol: OtlpProtocol,
+ /// The timeout value for all outgoing traces in milliseconds.
+ #[name("TIMEOUT", "timeout")]
+ timeout: u64,
+ }
+}
+
+#[derive(thiserror::Error, Debug)]
+enum ProviderError {
+ #[error("protocol is not set")]
+ UnsetProtocol,
+ #[error("endpoint is not set")]
+ EndpointUnset,
+ #[cfg(feature = "otlp")]
+ #[error("failed to build exporter: {0}")]
+ Exporter(#[from] ExporterBuildError),
+}
+type ProviderResult<T, E = ProviderError> = Result<T, E>;
crates/opentelemetry-exporter-env/src/otlp.rsdiffbeforeafterboth--- /dev/null
+++ b/crates/opentelemetry-exporter-env/src/otlp.rs
@@ -0,0 +1,175 @@
+use std::collections::HashMap;
+use std::time::Duration;
+
+use opentelemetry_otlp::tonic_types::metadata::MetadataMap;
+use opentelemetry_otlp::{
+ LogExporter, MetricExporter, SpanExporter, WithExportConfig as _, WithHttpConfig as _,
+ WithTonicConfig as _,
+};
+
+use crate::{
+ OtlpBaseSettings, OtlpLogsSettings, OtlpMetricsSettings, OtlpProtocol, ProviderError,
+ ProviderResult,
+};
+
+fn parse_headers<'a>(
+ headers: &'a str,
+) -> std::iter::Map<std::str::Split<'a, char>, impl FnMut(&'a str) -> (&'a str, &'a str)> {
+ headers.split(',').map(|header| {
+ let mut parts = header.splitn(2, '=');
+ let key = parts.next().unwrap();
+ let value = parts.next().unwrap_or("");
+ (key, value)
+ })
+}
+
+fn parse_headers_metadata_map(headers: Option<&str>) -> MetadataMap {
+ headers
+ .map(|headers| {
+ MetadataMap::from_headers(
+ parse_headers(headers)
+ .map(|(key, value)| (key.parse().unwrap(), value.parse().unwrap()))
+ .collect(),
+ )
+ })
+ .unwrap_or_default()
+}
+fn parse_headers_hashmap(headers: Option<&str>) -> HashMap<String, String> {
+ headers
+ .map(|headers| {
+ parse_headers(headers)
+ .map(|(key, value)| (key.into(), value.into()))
+ .collect()
+ })
+ .unwrap_or_default()
+}
+
+fn logger_exporter(base: &OtlpBaseSettings, log: &OtlpLogsSettings) -> ProviderResult<LogExporter> {
+ let endpoint = log
+ .endpoint
+ .clone()
+ .or_else(|| Some(format!("{}/v1/logs", base.endpoint.as_ref()?)))
+ .ok_or(ProviderError::EndpointUnset)?;
+ let headers = log.headers.as_deref().or(base.headers.as_deref());
+ let timeout = Duration::from_millis(log.timeout.or(base.timeout).unwrap_or(10000));
+
+ let protocol = log
+ .protocol
+ .or(base.protocol)
+ .ok_or(ProviderError::UnsetProtocol)?;
+
+ match protocol {
+ OtlpProtocol::Grpc => {
+ let mut builder = LogExporter::builder()
+ .with_tonic()
+ .with_endpoint(endpoint)
+ .with_metadata(parse_headers_metadata_map(headers))
+ .with_protocol(protocol.into())
+ .with_timeout(timeout);
+ let compression = log.compression.or(base.compression);
+ if let Some(compression) = compression {
+ builder = builder.with_compression(compression.into());
+ }
+
+ Ok(builder.build()?)
+ }
+ OtlpProtocol::HttpProtobuf | OtlpProtocol::HttpJson => {
+ let builder = LogExporter::builder()
+ .with_http()
+ .with_endpoint(endpoint)
+ .with_headers(parse_headers_hashmap(headers))
+ .with_protocol(protocol.into())
+ .with_timeout(timeout);
+
+ Ok(builder.build()?)
+ }
+ }
+}
+fn metric_exporter(
+ base: &OtlpBaseSettings,
+ metric: &OtlpMetricsSettings,
+) -> ProviderResult<MetricExporter> {
+ let endpoint = metric
+ .endpoint
+ .clone()
+ .or_else(|| Some(format!("{}/v1/metrics", base.endpoint.as_ref()?)))
+ .ok_or(ProviderError::EndpointUnset)?;
+ let headers = metric.headers.as_deref().or(base.headers.as_deref());
+ let timeout = Duration::from_millis(metric.timeout.or(base.timeout).unwrap_or(10000));
+
+ let protocol = metric
+ .protocol
+ .or(base.protocol)
+ .ok_or(ProviderError::UnsetProtocol)?;
+
+ match protocol {
+ OtlpProtocol::Grpc => {
+ let mut builder = MetricExporter::builder()
+ .with_tonic()
+ .with_endpoint(endpoint)
+ .with_metadata(parse_headers_metadata_map(headers))
+ .with_protocol(protocol.into())
+ .with_timeout(timeout);
+ let compression = metric.compression.or(base.compression);
+ if let Some(compression) = compression {
+ builder = builder.with_compression(compression.into());
+ }
+
+ Ok(builder.build()?)
+ }
+ OtlpProtocol::HttpProtobuf | OtlpProtocol::HttpJson => {
+ let builder = MetricExporter::builder()
+ .with_http()
+ .with_endpoint(endpoint)
+ .with_headers(parse_headers_hashmap(headers))
+ .with_protocol(protocol.into())
+ .with_timeout(timeout);
+
+ Ok(builder.build()?)
+ }
+ }
+}
+fn span_exporter(
+ base: &OtlpBaseSettings,
+ trace: &OtlpMetricsSettings,
+) -> ProviderResult<SpanExporter> {
+ let endpoint = trace
+ .endpoint
+ .clone()
+ .or_else(|| Some(format!("{}/v1/traces", base.endpoint.as_ref()?)))
+ .ok_or(ProviderError::EndpointUnset)?;
+ let headers = trace.headers.as_deref().or(base.headers.as_deref());
+ let timeout = Duration::from_millis(trace.timeout.or(base.timeout).unwrap_or(10000));
+
+ let protocol = trace
+ .protocol
+ .or(base.protocol)
+ .ok_or(ProviderError::UnsetProtocol)?;
+
+ match protocol {
+ OtlpProtocol::Grpc => {
+ let mut builder = SpanExporter::builder()
+ .with_tonic()
+ .with_endpoint(endpoint)
+ .with_metadata(parse_headers_metadata_map(headers))
+ .with_protocol(protocol.into())
+ .with_timeout(timeout);
+ let compression = trace.compression.or(base.compression);
+ if let Some(compression) = compression {
+ builder = builder.with_compression(compression.into());
+ }
+
+ Ok(builder.build()?)
+ }
+ OtlpProtocol::HttpProtobuf | OtlpProtocol::HttpJson => {
+ let builder = SpanExporter::builder()
+ .with_http()
+ .with_endpoint(endpoint)
+ .with_headers(parse_headers_hashmap(headers))
+ .with_protocol(protocol.into())
+ .with_timeout(timeout);
+
+ Ok(builder.build()?)
+ }
+ }
+}