diff options
author | Simon Hauser <simon.hauser@helsinki-systems.de> | 2024-07-02T10·50+0200 |
---|---|---|
committer | Simon Hauser <simon.hauser@helsinki-systems.de> | 2024-07-21T05·45+0000 |
commit | 1515a970bedbb6d7b5e8f966dddd0d8fff9bb03c (patch) | |
tree | f5ef8111a7a13e213fa0963bb689fd331b2d209d /tvix/Cargo.nix | |
parent | fdc0cf0c94827fc4940c9f8ac4d310d57aec9f35 (diff) |
feat(tvix/tracing): http propagation for axum r/8384
It introduces a new accept_trace function for axum0.7 which can be used to accept a header trace from a received request. This function can be used for tonic 0.12 once that version is released, and the specific `accept_trace` function within `tvix_tracing::propagate::tonic` can then be removed. This also integrates http propagation into the nar_bridge crate. Change-Id: I46dcc797d494bb3977c2633753e7060d88d29129 Reviewed-on: https://cl.tvl.fyi/c/depot/+/11925 Reviewed-by: Brian Olsen <me@griff.name> Tested-by: BuildkiteCI Reviewed-by: Simon Hauser <simon.hauser@helsinki-systems.de> Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/Cargo.nix')
-rw-r--r-- | tvix/Cargo.nix | 116 |
1 files changed, 112 insertions, 4 deletions
diff --git a/tvix/Cargo.nix b/tvix/Cargo.nix index 104c3dc825e1..58c60b0cd1b0 100644 --- a/tvix/Cargo.nix +++ b/tvix/Cargo.nix @@ -6942,6 +6942,15 @@ rec { features = [ "tls" "tls-roots" ]; } { + name = "tower"; + packageId = "tower"; + } + { + name = "tower-http"; + packageId = "tower-http 0.5.2"; + features = [ "trace" ]; + } + { name = "tracing"; packageId = "tracing"; } @@ -6960,7 +6969,7 @@ rec { { name = "tvix-tracing"; packageId = "tvix-tracing"; - features = [ "tonic" ]; + features = [ "tonic" "axum" ]; } { name = "url"; @@ -13669,7 +13678,7 @@ rec { }; resolvedDefaultFeatures = [ "__common" "balance" "buffer" "default" "discover" "futures-core" "futures-util" "indexmap" "limit" "load" "log" "make" "pin-project" "pin-project-lite" "rand" "ready-cache" "slab" "timeout" "tokio" "tokio-util" "tracing" "util" ]; }; - "tower-http" = rec { + "tower-http 0.4.4" = rec { crateName = "tower-http"; version = "0.4.4"; edition = "2018"; @@ -13769,6 +13778,99 @@ rec { }; resolvedDefaultFeatures = [ "default" "trace" "tracing" ]; }; + "tower-http 0.5.2" = rec { + crateName = "tower-http"; + version = "0.5.2"; + edition = "2018"; + sha256 = "1xakj3x0anp55gjqibiwvzma5iz0w9pcjsr7qk97sx4qm4sd970y"; + authors = [ + "Tower Maintainers <team@tower-rs.com>" + ]; + dependencies = [ + { + name = "bitflags"; + packageId = "bitflags 2.4.2"; + } + { + name = "bytes"; + packageId = "bytes"; + } + { + name = "http"; + packageId = "http 1.1.0"; + } + { + name = "http-body"; + packageId = "http-body 1.0.0"; + } + { + name = "http-body-util"; + packageId = "http-body-util"; + } + { + name = "pin-project-lite"; + packageId = "pin-project-lite"; + } + { + name = "tower-layer"; + packageId = "tower-layer"; + } + { + name = "tower-service"; + packageId = "tower-service"; + } + { + name = "tracing"; + packageId = "tracing"; + optional = true; + usesDefaultFeatures = false; + } + ]; + devDependencies = [ + { + name = "bytes"; + packageId = "bytes"; + } + ]; + features = { + "async-compression" = [ "dep:async-compression" ]; + "auth" = [ "base64" "validate-request" ]; + "base64" = [ "dep:base64" ]; + "catch-panic" = [ "tracing" "futures-util/std" ]; + "compression-br" = [ "async-compression/brotli" "futures-core" "tokio-util" "tokio" ]; + "compression-deflate" = [ "async-compression/zlib" "futures-core" "tokio-util" "tokio" ]; + "compression-full" = [ "compression-br" "compression-deflate" "compression-gzip" "compression-zstd" ]; + "compression-gzip" = [ "async-compression/gzip" "futures-core" "tokio-util" "tokio" ]; + "compression-zstd" = [ "async-compression/zstd" "futures-core" "tokio-util" "tokio" ]; + "decompression-br" = [ "async-compression/brotli" "futures-core" "tokio-util" "tokio" ]; + "decompression-deflate" = [ "async-compression/zlib" "futures-core" "tokio-util" "tokio" ]; + "decompression-full" = [ "decompression-br" "decompression-deflate" "decompression-gzip" "decompression-zstd" ]; + "decompression-gzip" = [ "async-compression/gzip" "futures-core" "tokio-util" "tokio" ]; + "decompression-zstd" = [ "async-compression/zstd" "futures-core" "tokio-util" "tokio" ]; + "follow-redirect" = [ "futures-util" "iri-string" "tower/util" ]; + "fs" = [ "futures-util" "tokio/fs" "tokio-util/io" "tokio/io-util" "dep:http-range-header" "mime_guess" "mime" "percent-encoding" "httpdate" "set-status" "futures-util/alloc" "tracing" ]; + "full" = [ "add-extension" "auth" "catch-panic" "compression-full" "cors" "decompression-full" "follow-redirect" "fs" "limit" "map-request-body" "map-response-body" "metrics" "normalize-path" "propagate-header" "redirect" "request-id" "sensitive-headers" "set-header" "set-status" "timeout" "trace" "util" "validate-request" ]; + "futures-core" = [ "dep:futures-core" ]; + "futures-util" = [ "dep:futures-util" ]; + "httpdate" = [ "dep:httpdate" ]; + "iri-string" = [ "dep:iri-string" ]; + "metrics" = [ "tokio/time" ]; + "mime" = [ "dep:mime" ]; + "mime_guess" = [ "dep:mime_guess" ]; + "percent-encoding" = [ "dep:percent-encoding" ]; + "request-id" = [ "uuid" ]; + "timeout" = [ "tokio/time" ]; + "tokio" = [ "dep:tokio" ]; + "tokio-util" = [ "dep:tokio-util" ]; + "tower" = [ "dep:tower" ]; + "trace" = [ "tracing" ]; + "tracing" = [ "dep:tracing" ]; + "util" = [ "tower" ]; + "uuid" = [ "dep:uuid" ]; + "validate-request" = [ "mime" ]; + }; + resolvedDefaultFeatures = [ "default" "trace" "tracing" ]; + }; "tower-layer" = rec { crateName = "tower-layer"; version = "0.3.2"; @@ -15335,7 +15437,7 @@ rec { } { name = "tower-http"; - packageId = "tower-http"; + packageId = "tower-http 0.4.4"; features = [ "trace" ]; } { @@ -15414,6 +15516,11 @@ rec { src = lib.cleanSourceWith { filter = sourceFilter; src = ./tracing; }; dependencies = [ { + name = "axum"; + packageId = "axum 0.7.5"; + optional = true; + } + { name = "http"; packageId = "http 0.2.11"; optional = true; @@ -15494,12 +15601,13 @@ rec { } ]; features = { + "axum" = [ "dep:axum" ]; "otlp" = [ "dep:tracing-opentelemetry" "dep:opentelemetry" "dep:opentelemetry-otlp" "dep:opentelemetry_sdk" "dep:opentelemetry-http" "reqwest-tracing?/opentelemetry_0_22" ]; "reqwest" = [ "dep:reqwest-tracing" ]; "tonic" = [ "dep:tonic" "dep:http" ]; "tracy" = [ "dep:tracing-tracy" ]; }; - resolvedDefaultFeatures = [ "default" "otlp" "reqwest" "tonic" "tracy" ]; + resolvedDefaultFeatures = [ "axum" "default" "otlp" "reqwest" "tonic" "tracy" ]; }; "typeid" = rec { crateName = "typeid"; |