"tokio-io-timeout",
]
- [[package]]
- name = "iana-time-zone"
- version = "0.1.53"
- source = "registry+https://github.com/rust-lang/crates.io-index"
- checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765"
- dependencies = [
- "android_system_properties",
- "core-foundation-sys",
- "iana-time-zone-haiku",
- "js-sys",
- "wasm-bindgen",
- "winapi",
- ]
-
--[[package]]
- name = "iana-time-zone-haiku"
- version = "0.1.1"
-name = "hyper-tls"
-version = "0.5.0"
--source = "registry+https://github.com/rust-lang/crates.io-index"
- checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca"
-checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905"
--dependencies = [
- "cxx",
- "cxx-build",
- "bytes",
- "hyper",
- "native-tls",
- "tokio",
- "tokio-native-tls",
--]
-
- [[package]]
- name = "ident_case"
- version = "1.0.1"
- source = "registry+https://github.com/rust-lang/crates.io-index"
- checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39"
--
[[package]]
name = "idna"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf"
-[[package]]
-name = "openssl-sys"
-version = "0.9.80"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7"
-dependencies = [
- "autocfg",
- "cc",
- "libc",
- "pkg-config",
- "vcpkg",
-]
-
+ [[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",
+ "http",
+ "opentelemetry_api",
+ ]
+
+ [[package]]
+ name = "opentelemetry-otlp"
+ version = "0.11.0"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+ checksum = "d1c928609d087790fc936a1067bdc310ae702bdf3b090c3f281b713622c8bbde"
+ dependencies = [
+ "async-trait",
+ "futures",
+ "futures-util",
+ "http",
+ "opentelemetry",
+ "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",
+ "futures-util",
+ "opentelemetry",
+ "prost",
+ "tonic",
+ "tonic-build",
+ ]
+
+ [[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",
+ "dashmap",
+ "fnv",
+ "futures-channel",
+ "futures-executor",
+ "futures-util",
+ "once_cell",
+ "opentelemetry_api",
+ "percent-encoding",
+ "rand 0.8.5",
+ "thiserror",
+ "tokio",
+ "tokio-stream",
+ ]
+
[[package]]
name = "ordered-float"
version = "2.10.0"
"hashring",
"http",
"hyper",
- "hyper-tls",
+ "hyper-rustls",
+ "lazy_static",
"leash",
+ "opentelemetry",
+ "opentelemetry-http",
"proto",
"serde",
- "serde_json",
"shared",
"tokio",
- "tokio-scoped",
"tokio-stream",
"tonic",
"tracing",
+ "tracing-opentelemetry",
"twilight-http-ratelimiting 0.14.0 (git+https://github.com/MatthieuCoder/twilight.git)",
+ "xxhash-rust",
]
[[package]]
rest = { path = "../rest" }
webhook = { path = "../webhook" }
- tokio = { version = "1.23.1", features = ["full"] }
-tokio = { version = "1.23.0", features = ["rt"] }
++tokio = { version = "1.23.1", features = ["rt"] }
serde = "1.0.152"
serde_json = "1.0.91"
anyhow = "1.0.68"
proto = { path = "../../libs/proto" }
leash = { path = "../../libs/leash" }
- hyper = { version = "0.14", features = ["full"] }
- tokio = { version = "1", features = ["full"] }
+ hyper= "0.14"
+ http = "0.2.8"
+
+ tokio = { version = "1", features = ["rt"] }
serde = { version = "1.0.8", features = ["derive"] }
-
-hyper-tls = "0.5.0"
-
-# todo(MatthieuCoder): Move to the real twilight when patch is merged
+futures-util = "0.3.17"
+hyper-rustls = "0.23.2"
+lazy_static = "1.4.0"
+xxhash-rust = { version = "0.8.2", features = ["xxh32"] }
twilight-http-ratelimiting = { git = "https://github.com/MatthieuCoder/twilight.git" }
+
tracing = "0.1.37"
+ anyhow = "1.0.68"
hashring = "0.3.0"
- anyhow = "*"
tonic = "0.8.3"
- serde_json = { version = "1.0" }
- http = "0.2.8"
tokio-stream = "0.1.11"
dns-lookup = "1.0.8"
- tokio-scoped = "0.2.0"
+ opentelemetry = "0.18.0"
+ opentelemetry-http = "0.7.0"
+ tracing-opentelemetry = "0.18.0"
HeaderValue, Method as HttpMethod, Request, Response, Uri,
};
use hyper::{client::HttpConnector, Body, Client};
-use hyper_tls::HttpsConnector;
+use hyper_rustls::HttpsConnector;
- use shared::log::error;
+ use std::{
+ collections::hash_map::DefaultHasher,
+ convert::TryFrom,
+ hash::{Hash, Hasher},
+ str::FromStr,
+ };
+ use tracing::{debug_span, error, instrument, Instrument};
use twilight_http_ratelimiting::{Method, Path};
use crate::ratelimit_client::RemoteRatelimiter;
service::{make_service_fn, service_fn},
Body, Client, Request, Server,
};
-use hyper_tls::HttpsConnector;
use leash::{AnyhowResultFuture, Component};
+ use opentelemetry::{global, trace::{Tracer}};
+ use opentelemetry_http::HeaderExtractor;
use shared::config::Settings;
use std::{convert::Infallible, sync::Arc};
use tokio::sync::oneshot;
[dependencies]
shared = { path = "../shared" }
anyhow = "1.0.68"
- tokio = { version = "1.23.1", features = ["full"] }
- pretty_env_logger = "0.4"
- serde = "1.0.152"
-tokio = { version = "1.23.0", features = ["rt", "signal"] }
++tokio = { version = "1.23.1", features = ["rt", "signal"] }
+ serde = "1.0.152"
+ tracing-log = { version = "0.1.3", features = ["env_logger"] }
+ tracing-subscriber = { version = "0.3.16", features = ["env-filter"] }
+ tracing = "0.1.37"
+ env_logger = "0.10.0"
+ tracing-opentelemetry = "0.18.0"
+ opentelemetry = { version ="0.18.0", features = ["rt-tokio"] }
-opentelemetry-otlp = { version = "0.11.0" }
++opentelemetry-otlp = { version = "0.11.0" }
--- /dev/null
--- /dev/null
++max_payload: 100000000
++max_pending: 1000000000