diff options
author | Simon Hauser <simon.hauser@helsinki-systems.de> | 2024-06-27T08·27+0200 |
---|---|---|
committer | Simon Hauser <simon.hauser@helsinki-systems.de> | 2024-07-02T13·43+0000 |
commit | 618aacaa61972c3e25b8c996abfa1d4dc475154e (patch) | |
tree | 7fc41bff9ed6e21b36d6768ffd457590f89dba6e /tvix/Cargo.lock | |
parent | 7f8da5e6a9926170be2fefc1db847166e5631f16 (diff) |
feat(tvix/tracing): http trace propagation r/8339
Introduces a helper function within tvix-tracing that returns a reqwest tracing middleware that will ingest the traceparent if otlp is enabled. It is feature flagged in tvix-tracing so not every consumer of that library automatically has reqwest in its dependencies. Tested using netcat to verify that the `traceparent` header is there if otlp is enabled and missing if otlp feature is disabled. Change-Id: I5abccae777b725f5ff7382e3686165383c477a39 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11886 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/Cargo.lock')
-rw-r--r-- | tvix/Cargo.lock | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/tvix/Cargo.lock b/tvix/Cargo.lock index e758b359760d..731731e72a1b 100644 --- a/tvix/Cargo.lock +++ b/tvix/Cargo.lock @@ -1432,8 +1432,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi", + "wasm-bindgen", ] [[package]] @@ -2033,6 +2035,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] +name = "mime_guess" +version = "2.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +dependencies = [ + "mime", + "unicase", +] + +[[package]] name = "minimal-lexical" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2961,6 +2973,7 @@ dependencies = [ "js-sys", "log", "mime", + "mime_guess", "once_cell", "percent-encoding", "pin-project-lite", @@ -2984,6 +2997,39 @@ dependencies = [ ] [[package]] +name = "reqwest-middleware" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a735987236a8e238bf0296c7e351b999c188ccc11477f311b82b55c93984216" +dependencies = [ + "anyhow", + "async-trait", + "http", + "reqwest", + "serde", + "task-local-extensions", + "thiserror", +] + +[[package]] +name = "reqwest-tracing" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190838e54153d7a7e2ea98851304b3ce92daeabf14c54d32b01b84a3e636f683" +dependencies = [ + "anyhow", + "async-trait", + "getrandom", + "matchit", + "opentelemetry", + "reqwest", + "reqwest-middleware", + "task-local-extensions", + "tracing", + "tracing-opentelemetry", +] + +[[package]] name = "ring" version = "0.17.7" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -3643,6 +3689,15 @@ dependencies = [ ] [[package]] +name = "task-local-extensions" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba323866e5d033818e3240feeb9f7db2c4296674e4d9e16b97b7bf8f490434e8" +dependencies = [ + "pin-utils", +] + +[[package]] name = "tempfile" version = "3.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -4450,6 +4505,7 @@ dependencies = [ "prost", "prost-build", "reqwest", + "reqwest-middleware", "rstest", "rstest_reuse", "serde", @@ -4489,6 +4545,7 @@ dependencies = [ "opentelemetry-http", "opentelemetry-otlp", "opentelemetry_sdk", + "reqwest-tracing", "thiserror", "tokio", "tonic", |