You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-07-31 09:24:31 +03:00
WIP: bump OTEL
This commit is contained in:
346
Cargo.lock
generated
346
Cargo.lock
generated
@ -493,6 +493,35 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum"
|
||||
version = "0.5.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c9e3356844c4d6a6d6467b8da2cffb4a2820be256f50a3a386c9d152bab31043"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"axum-core 0.2.8",
|
||||
"bitflags",
|
||||
"bytes 1.2.1",
|
||||
"futures-util",
|
||||
"http",
|
||||
"http-body",
|
||||
"hyper",
|
||||
"itoa 1.0.3",
|
||||
"matchit 0.5.0",
|
||||
"memchr",
|
||||
"mime",
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"serde",
|
||||
"sync_wrapper",
|
||||
"tokio",
|
||||
"tower",
|
||||
"tower-http",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum"
|
||||
version = "0.6.0-rc.2"
|
||||
@ -500,7 +529,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d2628a243073c55aef15a1c1fe45c87f21b84f9e89ca9e7b262a180d3d03543d"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"axum-core",
|
||||
"axum-core 0.3.0-rc.2",
|
||||
"bitflags",
|
||||
"bytes 1.2.1",
|
||||
"futures-util",
|
||||
@ -509,7 +538,7 @@ dependencies = [
|
||||
"http-body",
|
||||
"hyper",
|
||||
"itoa 1.0.3",
|
||||
"matchit",
|
||||
"matchit 0.6.0",
|
||||
"memchr",
|
||||
"mime",
|
||||
"percent-encoding",
|
||||
@ -525,6 +554,22 @@ dependencies = [
|
||||
"tower-service",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum-core"
|
||||
version = "0.2.8"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d9f0c0a60006f2a293d82d571f635042a72edf927539b7685bd62d361963839b"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes 1.2.1",
|
||||
"futures-util",
|
||||
"http",
|
||||
"http-body",
|
||||
"mime",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "axum-core"
|
||||
version = "0.3.0-rc.2"
|
||||
@ -547,7 +592,7 @@ version = "0.4.0-rc.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "090ae29ae83a40882fb99bce421d8dce4a819325a013bb301dad4cc4b74ab40c"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"axum 0.6.0-rc.2",
|
||||
"bytes 1.2.1",
|
||||
"cookie",
|
||||
"futures-util",
|
||||
@ -567,7 +612,7 @@ version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6293dae2ec708e679da6736e857cf8532886ef258e92930f38279c12641628b8"
|
||||
dependencies = [
|
||||
"heck 0.4.0",
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
@ -836,7 +881,7 @@ version = "3.2.18"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ea0c8bce528c4be4da13ea6fead8965e95b6073585a2f05204bd8f4119f82a65"
|
||||
dependencies = [
|
||||
"heck 0.4.0",
|
||||
"heck",
|
||||
"proc-macro-error",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@ -1193,12 +1238,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "dashmap"
|
||||
version = "4.0.2"
|
||||
version = "5.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c"
|
||||
checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"num_cpus",
|
||||
"hashbrown",
|
||||
"lock_api",
|
||||
"once_cell",
|
||||
"parking_lot_core 0.9.3",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@ -1762,15 +1810,6 @@ dependencies = [
|
||||
"http",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.3.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c"
|
||||
dependencies = [
|
||||
"unicode-segmentation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.4.0"
|
||||
@ -2271,7 +2310,7 @@ name = "mas-axum-utils"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"axum",
|
||||
"axum 0.6.0-rc.2",
|
||||
"axum-extra",
|
||||
"bincode",
|
||||
"chrono",
|
||||
@ -2324,11 +2363,11 @@ dependencies = [
|
||||
"mas-tasks",
|
||||
"mas-templates",
|
||||
"opentelemetry",
|
||||
"opentelemetry-http",
|
||||
"opentelemetry-jaeger",
|
||||
"opentelemetry-otlp",
|
||||
"opentelemetry-semantic-conventions",
|
||||
"opentelemetry-zipkin",
|
||||
"reqwest",
|
||||
"schemars",
|
||||
"serde_json",
|
||||
"serde_yaml",
|
||||
@ -2336,7 +2375,6 @@ dependencies = [
|
||||
"tower",
|
||||
"tracing",
|
||||
"tracing-appender",
|
||||
"tracing-opentelemetry",
|
||||
"tracing-subscriber",
|
||||
"url",
|
||||
"watchman_client",
|
||||
@ -2405,7 +2443,7 @@ version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"argon2",
|
||||
"axum",
|
||||
"axum 0.6.0-rc.2",
|
||||
"axum-extra",
|
||||
"axum-macros",
|
||||
"chrono",
|
||||
@ -2445,7 +2483,7 @@ name = "mas-http"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"axum",
|
||||
"axum 0.6.0-rc.2",
|
||||
"bytes 1.2.1",
|
||||
"futures-util",
|
||||
"headers",
|
||||
@ -2576,7 +2614,7 @@ dependencies = [
|
||||
name = "mas-router"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"axum 0.6.0-rc.2",
|
||||
"serde",
|
||||
"serde_urlencoded",
|
||||
"serde_with",
|
||||
@ -2587,7 +2625,7 @@ dependencies = [
|
||||
name = "mas-static-files"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"axum",
|
||||
"axum 0.6.0-rc.2",
|
||||
"headers",
|
||||
"http",
|
||||
"http-body",
|
||||
@ -2673,6 +2711,12 @@ version = "0.1.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f"
|
||||
|
||||
[[package]]
|
||||
name = "matchit"
|
||||
version = "0.5.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb"
|
||||
|
||||
[[package]]
|
||||
name = "matchit"
|
||||
version = "0.6.0"
|
||||
@ -2919,9 +2963,127 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "69d6c3d7288a106c0a363e4b0e8d308058d56902adefb16f4936f417ffef086e"
|
||||
dependencies = [
|
||||
"opentelemetry_api",
|
||||
"opentelemetry_sdk",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-http"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1edc79add46364183ece1a4542592ca593e6421c60807232f5b8f7a31703825d"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes 1.2.1",
|
||||
"http",
|
||||
"hyper",
|
||||
"opentelemetry_api",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-jaeger"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8"
|
||||
checksum = "1e785d273968748578931e4dc3b4f5ec86b26e09d9e0d66b55adda7fce742f7a"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"futures 0.3.24",
|
||||
"futures-executor",
|
||||
"once_cell",
|
||||
"opentelemetry",
|
||||
"opentelemetry-semantic-conventions",
|
||||
"thiserror",
|
||||
"thrift",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-otlp"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d1c928609d087790fc936a1067bdc310ae702bdf3b090c3f281b713622c8bbde"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"futures 0.3.24",
|
||||
"futures-util",
|
||||
"http",
|
||||
"opentelemetry",
|
||||
"opentelemetry-http",
|
||||
"opentelemetry-proto",
|
||||
"prost",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tonic",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-proto"
|
||||
version = "0.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d61a2f56df5574508dd86aaca016c917489e589ece4141df1b5e349af8d66c28"
|
||||
dependencies = [
|
||||
"futures 0.3.24",
|
||||
"futures-util",
|
||||
"opentelemetry",
|
||||
"prost",
|
||||
"tonic",
|
||||
"tonic-build",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-semantic-conventions"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b02e0230abb0ab6636d18e2ba8fa02903ea63772281340ccac18e0af3ec9eeb"
|
||||
dependencies = [
|
||||
"opentelemetry",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-zipkin"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9bd6a5d672fe50f682d801f6737a54a633834cf8c91be419c0c9cae8ac85bf4d"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"futures-core",
|
||||
"http",
|
||||
"once_cell",
|
||||
"opentelemetry",
|
||||
"opentelemetry-http",
|
||||
"opentelemetry-semantic-conventions",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
"typed-builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry_api"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c24f96e21e7acc813c7a8394ee94978929db2bcc46cf6b5014fc612bf7760c22"
|
||||
dependencies = [
|
||||
"fnv",
|
||||
"futures-channel",
|
||||
"futures-util",
|
||||
"indexmap",
|
||||
"js-sys",
|
||||
"once_cell",
|
||||
"pin-project-lite",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry_sdk"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ca41c4933371b61c2a2f214bf16931499af4ec90543604ec828f7a625c09113"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"crossbeam-channel",
|
||||
@ -2930,94 +3092,15 @@ dependencies = [
|
||||
"futures-channel",
|
||||
"futures-executor",
|
||||
"futures-util",
|
||||
"js-sys",
|
||||
"lazy_static",
|
||||
"once_cell",
|
||||
"opentelemetry_api",
|
||||
"percent-encoding",
|
||||
"pin-project",
|
||||
"rand",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-http"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "449048140ee61e28f57abe6e9975eedc1f3a29855c7407bd6c12b18578863379"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes 1.2.1",
|
||||
"http",
|
||||
"opentelemetry",
|
||||
"reqwest",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-jaeger"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f8c0b12cd9e3f9b35b52f6e0dac66866c519b26f424f4bbf96e3fe8bfbdc5229"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"headers",
|
||||
"http",
|
||||
"lazy_static",
|
||||
"opentelemetry",
|
||||
"opentelemetry-http",
|
||||
"opentelemetry-semantic-conventions",
|
||||
"reqwest",
|
||||
"thiserror",
|
||||
"thrift",
|
||||
"tokio",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-otlp"
|
||||
version = "0.10.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9d1a6ca9de4c8b00aa7f1a153bd76cb263287155cec642680d79d98706f3d28a"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"futures 0.3.24",
|
||||
"futures-util",
|
||||
"http",
|
||||
"opentelemetry",
|
||||
"prost",
|
||||
"thiserror",
|
||||
"tokio",
|
||||
"tonic",
|
||||
"tonic-build",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-semantic-conventions"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "985cc35d832d412224b2cffe2f9194b1b89b6aa5d0bef76d080dce09d90e62bd"
|
||||
dependencies = [
|
||||
"opentelemetry",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "opentelemetry-zipkin"
|
||||
version = "0.15.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fb86c6e02de97a3a7ffa5d267e1ff3f0c930ccf8a31e286277a209af6ed6cfc1"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"http",
|
||||
"lazy_static",
|
||||
"opentelemetry",
|
||||
"opentelemetry-http",
|
||||
"opentelemetry-semantic-conventions",
|
||||
"reqwest",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"thiserror",
|
||||
"typed-builder",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ordered-float"
|
||||
version = "1.1.1"
|
||||
@ -3401,6 +3484,16 @@ version = "0.2.16"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872"
|
||||
|
||||
[[package]]
|
||||
name = "prettyplease"
|
||||
version = "0.1.19"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a49e86d2c26a24059894a3afa13fd17d063419b05dfb83f06d9c3566060c3f5a"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "proc-macro-error"
|
||||
version = "1.0.4"
|
||||
@ -3449,9 +3542,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "prost"
|
||||
version = "0.9.0"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001"
|
||||
checksum = "399c3c31cdec40583bb68f0b18403400d01ec4289c383aa047560439952c4dd7"
|
||||
dependencies = [
|
||||
"bytes 1.2.1",
|
||||
"prost-derive",
|
||||
@ -3459,12 +3552,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "prost-build"
|
||||
version = "0.9.0"
|
||||
version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5"
|
||||
checksum = "7f835c582e6bd972ba8347313300219fed5bfa52caf175298d860b61ff6069bb"
|
||||
dependencies = [
|
||||
"bytes 1.2.1",
|
||||
"heck 0.3.3",
|
||||
"heck",
|
||||
"itertools",
|
||||
"lazy_static",
|
||||
"log",
|
||||
@ -3479,9 +3572,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "prost-derive"
|
||||
version = "0.9.0"
|
||||
version = "0.11.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe"
|
||||
checksum = "7345d5f0e08c0536d7ac7229952590239e77abf0a0100a1b1d890add6ea96364"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"itertools",
|
||||
@ -3492,9 +3585,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "prost-types"
|
||||
version = "0.9.0"
|
||||
version = "0.11.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a"
|
||||
checksum = "4dfaa718ad76a44b3415e6c4d53b17c8f99160dcb3a99b10470fce8ad43f6e3e"
|
||||
dependencies = [
|
||||
"bytes 1.2.1",
|
||||
"prost",
|
||||
@ -3669,7 +3762,6 @@ dependencies = [
|
||||
"percent-encoding",
|
||||
"pin-project-lite",
|
||||
"rustls 0.20.6",
|
||||
"rustls-native-certs 0.6.2",
|
||||
"rustls-pemfile",
|
||||
"serde",
|
||||
"serde_json",
|
||||
@ -4315,7 +4407,7 @@ checksum = "b850fa514dc11f2ee85be9d055c512aa866746adfacd1cb42d867d68e6a5b0d9"
|
||||
dependencies = [
|
||||
"dotenvy",
|
||||
"either",
|
||||
"heck 0.4.0",
|
||||
"heck",
|
||||
"hex",
|
||||
"once_cell",
|
||||
"proc-macro2",
|
||||
@ -4505,9 +4597,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "thrift"
|
||||
version = "0.15.0"
|
||||
version = "0.16.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "b82ca8f46f95b3ce96081fe3dd89160fdea970c254bb72925255d1b62aae692e"
|
||||
checksum = "09678c4cdbb4eed72e18b7c2af1329c69825ed16fcbac62d083fc3e2b0590ff0"
|
||||
dependencies = [
|
||||
"byteorder",
|
||||
"integer-encoding",
|
||||
@ -4677,12 +4769,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tonic"
|
||||
version = "0.6.2"
|
||||
version = "0.8.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ff08f4649d10a70ffa3522ca559031285d8e421d727ac85c60825761818f5d0a"
|
||||
checksum = "11cd56bdb54ef93935a6a79dbd1d91f1ebd4c64150fd61654031fd6b8b775c91"
|
||||
dependencies = [
|
||||
"async-stream",
|
||||
"async-trait",
|
||||
"axum 0.5.16",
|
||||
"base64",
|
||||
"bytes 1.2.1",
|
||||
"futures-core",
|
||||
@ -4698,7 +4791,7 @@ dependencies = [
|
||||
"prost-derive",
|
||||
"tokio",
|
||||
"tokio-stream",
|
||||
"tokio-util 0.6.10",
|
||||
"tokio-util 0.7.4",
|
||||
"tower",
|
||||
"tower-layer",
|
||||
"tower-service",
|
||||
@ -4708,10 +4801,11 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tonic-build"
|
||||
version = "0.6.2"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9403f1bafde247186684b230dc6f38b5cd514584e8bec1dd32514be4745fa757"
|
||||
checksum = "2fbcd2800e34e743b9ae795867d5f77b535d3a3be69fd731e39145719752df8c"
|
||||
dependencies = [
|
||||
"prettyplease",
|
||||
"proc-macro2",
|
||||
"prost-build",
|
||||
"quote",
|
||||
@ -4846,9 +4940,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tracing-opentelemetry"
|
||||
version = "0.17.4"
|
||||
version = "0.18.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f"
|
||||
checksum = "21ebb87a95ea13271332df069020513ab70bdb5637ca42d6e492dc3bbbad48de"
|
||||
dependencies = [
|
||||
"once_cell",
|
||||
"opentelemetry",
|
||||
|
@ -18,24 +18,24 @@ serde_yaml = "0.9.13"
|
||||
serde_json = "1.0.85"
|
||||
url = "2.3.1"
|
||||
argon2 = { version = "0.4.1", features = ["password-hash"] }
|
||||
reqwest = { version = "0.11.12", features = ["rustls-tls"], default-features = false, optional = true }
|
||||
watchman_client = "0.8.0"
|
||||
atty = "0.2.14"
|
||||
|
||||
tracing = "0.1.36"
|
||||
tracing-appender = "0.2.2"
|
||||
tracing-subscriber = { version = "0.3.15", features = ["env-filter"] }
|
||||
tracing-opentelemetry = "0.17.4"
|
||||
opentelemetry = { version = "0.17.0", features = ["trace", "metrics", "rt-tokio"] }
|
||||
opentelemetry-semantic-conventions = "0.9.0"
|
||||
opentelemetry-jaeger = { version = "0.16.0", features = ["rt-tokio", "reqwest_collector_client"], optional = true }
|
||||
opentelemetry-otlp = { version = "0.10.0", features = ["trace", "metrics"], optional = true }
|
||||
opentelemetry-zipkin = { version = "0.15.0", features = ["reqwest-client", "reqwest-rustls"], default-features = false, optional = true }
|
||||
#tracing-opentelemetry = "0.17.4"
|
||||
opentelemetry = { version = "0.18.0", features = ["trace", "metrics", "rt-tokio"] }
|
||||
opentelemetry-semantic-conventions = "0.10.0"
|
||||
opentelemetry-jaeger = { version = "0.17.0", features = ["rt-tokio"], optional = true }
|
||||
opentelemetry-otlp = { version = "0.11.0", features = ["trace", "metrics", "http-proto"], optional = true }
|
||||
opentelemetry-zipkin = { version = "0.16.0", features = ["opentelemetry-http"], default-features = false, optional = true }
|
||||
opentelemetry-http = { version = "0.7.0", features = ["tokio", "hyper"], optional = true }
|
||||
|
||||
mas-config = { path = "../config" }
|
||||
mas-email = { path = "../email" }
|
||||
mas-handlers = { path = "../handlers", default-features = false }
|
||||
mas-http = { path = "../http", features = ["axum"] }
|
||||
mas-http = { path = "../http", features = ["axum", "client", "native-roots"] }
|
||||
mas-policy = { path = "../policy" }
|
||||
mas-router = { path = "../router" }
|
||||
mas-static-files = { path = "../static-files" }
|
||||
@ -58,8 +58,8 @@ webpki-roots = ["mas-http/webpki-roots", "mas-handlers/webpki-roots"]
|
||||
dev = ["mas-templates/dev", "mas-static-files/dev"]
|
||||
|
||||
# Enable OpenTelemetry OTLP exporter. Requires "protoc"
|
||||
otlp = ["opentelemetry-otlp"]
|
||||
otlp = ["dep:opentelemetry-otlp", "dep:opentelemetry-http"]
|
||||
# Enable OpenTelemetry Jaeger exporter and propagator.
|
||||
jaeger = ["opentelemetry-jaeger", "reqwest"]
|
||||
jaeger = ["dep:opentelemetry-jaeger"]
|
||||
# Enable OpenTelemetry Zipkin exporter and B3 propagator.
|
||||
zipkin = ["opentelemetry-zipkin", "reqwest"]
|
||||
zipkin = ["dep:opentelemetry-zipkin", "dep:opentelemetry-http"]
|
||||
|
@ -20,7 +20,7 @@ use std::{
|
||||
|
||||
use anyhow::Context;
|
||||
use clap::Parser;
|
||||
use futures::stream::{StreamExt, TryStreamExt};
|
||||
use futures_util::stream::{StreamExt, TryStreamExt};
|
||||
use hyper::Server;
|
||||
use mas_config::RootConfig;
|
||||
use mas_email::Mailer;
|
||||
@ -100,7 +100,7 @@ async fn watch_templates(
|
||||
.await?;
|
||||
|
||||
// Create a stream out of that subscription
|
||||
let stream = futures::stream::try_unfold(subscription, |mut sub| async move {
|
||||
let stream = futures_util::stream::try_unfold(subscription, |mut sub| async move {
|
||||
let next = sub.next().await?;
|
||||
anyhow::Ok(Some((next, sub)))
|
||||
});
|
||||
@ -109,7 +109,7 @@ async fn watch_templates(
|
||||
}
|
||||
|
||||
let files_changed_stream =
|
||||
futures::stream::select_all(streams).try_filter_map(|event| async move {
|
||||
futures_util::stream::select_all(streams).try_filter_map(|event| async move {
|
||||
match event {
|
||||
SubscriptionData::FilesChanged(QueryResult {
|
||||
files: Some(files), ..
|
||||
|
@ -58,14 +58,16 @@ async fn try_main() -> anyhow::Result<()> {
|
||||
.or_else(|_| EnvFilter::try_new("info"))
|
||||
.context("could not setup logging filter")?;
|
||||
|
||||
/*
|
||||
// Don't fill the telemetry layer for now, we want to configure it based on the
|
||||
// app config, so we need to delay that a bit
|
||||
let (telemetry_layer, handle) = reload::Layer::new(None);
|
||||
// We only want "INFO" level spans to go through OpenTelemetry
|
||||
let telemetry_layer = telemetry_layer.with_filter(LevelFilter::INFO);
|
||||
*/
|
||||
|
||||
let subscriber = Registry::default()
|
||||
.with(telemetry_layer)
|
||||
//.with(telemetry_layer)
|
||||
.with(filter_layer)
|
||||
.with(fmt_layer);
|
||||
subscriber
|
||||
@ -89,7 +91,10 @@ async fn try_main() -> anyhow::Result<()> {
|
||||
let telemetry_config: TelemetryConfig = opts.load_config().unwrap_or_default();
|
||||
|
||||
// Setup OpenTelemtry tracing and metrics
|
||||
let tracer = telemetry::setup(&telemetry_config).context("failed to setup opentelemetry")?;
|
||||
let tracer = telemetry::setup(&telemetry_config)
|
||||
.await
|
||||
.context("failed to setup opentelemetry")?;
|
||||
/*
|
||||
if let Some(tracer) = tracer {
|
||||
// Now we can swap out the actual opentelemetry tracing layer
|
||||
handle.reload(
|
||||
@ -98,6 +103,7 @@ async fn try_main() -> anyhow::Result<()> {
|
||||
.with_tracked_inactivity(false),
|
||||
)?;
|
||||
}
|
||||
*/
|
||||
|
||||
// And run the command
|
||||
tracing::trace!(?opts, "Running command");
|
||||
|
@ -15,7 +15,6 @@
|
||||
use std::{net::SocketAddr, time::Duration};
|
||||
|
||||
use anyhow::bail;
|
||||
use futures::stream::{Stream, StreamExt};
|
||||
use mas_config::{MetricsExporterConfig, Propagator, TelemetryConfig, TracingExporterConfig};
|
||||
use opentelemetry::{
|
||||
global,
|
||||
@ -34,7 +33,7 @@ use opentelemetry_semantic_conventions as semcov;
|
||||
use opentelemetry_zipkin::{B3Encoding, Propagator as ZipkinPropagator};
|
||||
use url::Url;
|
||||
|
||||
pub fn setup(config: &TelemetryConfig) -> anyhow::Result<Option<Tracer>> {
|
||||
pub async fn setup(config: &TelemetryConfig) -> anyhow::Result<Option<Tracer>> {
|
||||
global::set_error_handler(|e| tracing::error!("{}", e))?;
|
||||
let propagator = propagator(&config.tracing.propagators)?;
|
||||
|
||||
@ -43,7 +42,7 @@ pub fn setup(config: &TelemetryConfig) -> anyhow::Result<Option<Tracer>> {
|
||||
mas_http::set_propagator(&propagator);
|
||||
global::set_text_map_propagator(propagator);
|
||||
|
||||
let tracer = tracer(&config.tracing.exporter)?;
|
||||
let tracer = tracer(&config.tracing.exporter).await?;
|
||||
meter(&config.metrics.exporter)?;
|
||||
Ok(tracer)
|
||||
}
|
||||
@ -86,6 +85,14 @@ fn propagator(propagators: &[Propagator]) -> anyhow::Result<impl TextMapPropagat
|
||||
Ok(TextMapCompositePropagator::new(propagators?))
|
||||
}
|
||||
|
||||
#[cfg(any(feature = "otlp", feature = "jaeger"))]
|
||||
async fn http_client() -> anyhow::Result<impl opentelemetry_http::HttpClient + 'static> {
|
||||
let client = mas_http::make_untraced_client().await?;
|
||||
let client =
|
||||
opentelemetry_http::hyper::HyperClient::new_with_timeout(client, Duration::from_secs(30));
|
||||
Ok(client)
|
||||
}
|
||||
|
||||
fn stdout_tracer() -> Tracer {
|
||||
sdk::export::trace::stdout::new_pipeline()
|
||||
.with_pretty_print(true)
|
||||
@ -124,12 +131,12 @@ fn jaeger_tracer(_agent_endpoint: &Option<SocketAddr>) -> anyhow::Result<Tracer>
|
||||
#[cfg(feature = "jaeger")]
|
||||
fn jaeger_tracer(agent_endpoint: &Option<SocketAddr>) -> anyhow::Result<Tracer> {
|
||||
// TODO: also support exporting to a Jaeger collector & skip the agent
|
||||
let mut pipeline = opentelemetry_jaeger::new_pipeline()
|
||||
let mut pipeline = opentelemetry_jaeger::new_agent_pipeline()
|
||||
.with_service_name(env!("CARGO_PKG_NAME"))
|
||||
.with_trace_config(trace_config());
|
||||
|
||||
if let Some(agent_endpoint) = agent_endpoint {
|
||||
pipeline = pipeline.with_agent_endpoint(agent_endpoint);
|
||||
pipeline = pipeline.with_endpoint(agent_endpoint);
|
||||
}
|
||||
|
||||
let tracer = pipeline.install_batch(opentelemetry::runtime::Tokio)?;
|
||||
@ -143,8 +150,8 @@ fn zipkin_tracer(_collector_endpoint: &Option<Url>) -> anyhow::Result<Tracer> {
|
||||
}
|
||||
|
||||
#[cfg(feature = "zipkin")]
|
||||
fn zipkin_tracer(collector_endpoint: &Option<Url>) -> anyhow::Result<Tracer> {
|
||||
let http_client = reqwest::Client::new();
|
||||
async fn zipkin_tracer(collector_endpoint: &Option<Url>) -> anyhow::Result<Tracer> {
|
||||
let http_client = http_client().await?;
|
||||
|
||||
let mut pipeline = opentelemetry_zipkin::new_pipeline()
|
||||
.with_http_client(http_client)
|
||||
@ -160,23 +167,20 @@ fn zipkin_tracer(collector_endpoint: &Option<Url>) -> anyhow::Result<Tracer> {
|
||||
Ok(tracer)
|
||||
}
|
||||
|
||||
fn tracer(config: &TracingExporterConfig) -> anyhow::Result<Option<Tracer>> {
|
||||
async fn tracer(config: &TracingExporterConfig) -> anyhow::Result<Option<Tracer>> {
|
||||
let tracer = match config {
|
||||
TracingExporterConfig::None => return Ok(None),
|
||||
TracingExporterConfig::Stdout => stdout_tracer(),
|
||||
TracingExporterConfig::Otlp { endpoint } => otlp_tracer(endpoint)?,
|
||||
TracingExporterConfig::Jaeger { agent_endpoint } => jaeger_tracer(agent_endpoint)?,
|
||||
TracingExporterConfig::Zipkin { collector_endpoint } => zipkin_tracer(collector_endpoint)?,
|
||||
TracingExporterConfig::Zipkin { collector_endpoint } => {
|
||||
zipkin_tracer(collector_endpoint).await?
|
||||
}
|
||||
};
|
||||
|
||||
Ok(Some(tracer))
|
||||
}
|
||||
|
||||
fn interval(duration: Duration) -> impl Stream<Item = tokio::time::Instant> {
|
||||
// Skip first immediate tick from tokio
|
||||
opentelemetry::util::tokio_interval_stream(duration).skip(1)
|
||||
}
|
||||
|
||||
#[cfg(feature = "otlp")]
|
||||
fn otlp_meter(endpoint: &Option<url::Url>) -> anyhow::Result<()> {
|
||||
use opentelemetry_otlp::WithExportConfig;
|
||||
@ -187,9 +191,12 @@ fn otlp_meter(endpoint: &Option<url::Url>) -> anyhow::Result<()> {
|
||||
}
|
||||
|
||||
opentelemetry_otlp::new_pipeline()
|
||||
.metrics(tokio::spawn, interval)
|
||||
.metrics(
|
||||
sdk::metrics::selectors::simple::histogram([0.1, 0.2, 0.5, 1.0, 5.0, 10.0]),
|
||||
sdk::export::metrics::aggregation::stateless_temporality_selector(),
|
||||
opentelemetry::runtime::Tokio,
|
||||
)
|
||||
.with_exporter(exporter)
|
||||
.with_aggregator_selector(sdk::metrics::selectors::simple::Selector::Exact)
|
||||
.build()?;
|
||||
|
||||
Ok(())
|
||||
@ -200,14 +207,25 @@ fn otlp_meter(_endpoint: &Option<url::Url>) -> anyhow::Result<()> {
|
||||
anyhow::bail!("The service was compiled without OTLP exporter support, but config exports metrics via OTLP.")
|
||||
}
|
||||
|
||||
fn stdout_meter() {
|
||||
sdk::export::metrics::stdout(tokio::spawn, interval).init();
|
||||
fn stdout_meter() -> anyhow::Result<()> {
|
||||
let exporter = sdk::export::metrics::stdout().build()?;
|
||||
let controller = sdk::metrics::controllers::basic(
|
||||
sdk::metrics::processors::factory(
|
||||
sdk::metrics::selectors::simple::histogram([0.1, 0.2, 0.5, 1.0, 5.0, 10.0]),
|
||||
exporter.temporality_selector(),
|
||||
)
|
||||
.with_memory(true),
|
||||
)
|
||||
.with_exporter(exporter)
|
||||
.build();
|
||||
global::set_meter_provider(controller);
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn meter(config: &MetricsExporterConfig) -> anyhow::Result<()> {
|
||||
match config {
|
||||
MetricsExporterConfig::None => {}
|
||||
MetricsExporterConfig::Stdout => stdout_meter(),
|
||||
MetricsExporterConfig::Stdout => stdout_meter()?,
|
||||
MetricsExporterConfig::Otlp { endpoint } => otlp_meter(endpoint)?,
|
||||
};
|
||||
|
||||
|
@ -15,9 +15,9 @@ http-body = "0.4.5"
|
||||
hyper = "0.14.20"
|
||||
hyper-rustls = { version = "0.23.0", features = ["http1", "http2"], default-features = false, optional = true }
|
||||
once_cell = "1.15.0"
|
||||
opentelemetry = "0.17.0"
|
||||
opentelemetry-http = "0.6.0"
|
||||
opentelemetry-semantic-conventions = "0.9.0"
|
||||
opentelemetry = "0.18.0"
|
||||
opentelemetry-http = "0.7.0"
|
||||
opentelemetry-semantic-conventions = "0.10.0"
|
||||
rustls = { version = "0.20.6", optional = true }
|
||||
rustls-native-certs = { version = "0.6.2", optional = true }
|
||||
serde = "1.0.145"
|
||||
@ -28,7 +28,7 @@ tokio = { version = "1.21.1", features = ["sync", "parking_lot"], optional = tru
|
||||
tower = { version = "0.4.13", features = ["timeout", "limit"] }
|
||||
tower-http = { version = "0.3.4", features = ["follow-redirect", "decompression-full", "set-header", "compression-full", "cors", "util"] }
|
||||
tracing = "0.1.36"
|
||||
tracing-opentelemetry = "0.17.4"
|
||||
tracing-opentelemetry = "0.18.0"
|
||||
webpki = { version = "0.22.0", optional = true }
|
||||
webpki-roots = { version = "0.22.4", optional = true }
|
||||
|
||||
|
Reference in New Issue
Block a user