about summary refs log tree commit diff
path: root/tvix/tracing/Cargo.toml
diff options
context:
space:
mode:
authorSimon Hauser <simon.hauser@helsinki-systems.de>2024-06-27T08·27+0200
committerSimon Hauser <simon.hauser@helsinki-systems.de>2024-07-02T13·43+0000
commit618aacaa61972c3e25b8c996abfa1d4dc475154e (patch)
tree7fc41bff9ed6e21b36d6768ffd457590f89dba6e /tvix/tracing/Cargo.toml
parent7f8da5e6a9926170be2fefc1db847166e5631f16 (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/tracing/Cargo.toml')
-rw-r--r--tvix/tracing/Cargo.toml8
1 files changed, 7 insertions, 1 deletions
diff --git a/tvix/tracing/Cargo.toml b/tvix/tracing/Cargo.toml
index bc9a8c3c7792..80892bf7a09f 100644
--- a/tvix/tracing/Cargo.toml
+++ b/tvix/tracing/Cargo.toml
@@ -22,6 +22,8 @@ opentelemetry-http = { version = "0.11.0", optional = true }
 tonic = { version = "0.11.0", optional = true }
 http  = { version = "0.2.11", optional = true }
 
+reqwest-tracing = { version = "0.4.8", default-features = false, optional = true }
+
 [features]
 default = []
 otlp = [
@@ -29,7 +31,8 @@ otlp = [
   "dep:opentelemetry",
   "dep:opentelemetry-otlp",
   "dep:opentelemetry_sdk",
-  "dep:opentelemetry-http"
+  "dep:opentelemetry-http",
+  "reqwest-tracing?/opentelemetry_0_22",
 ]
 tracy = [
   "dep:tracing-tracy"
@@ -38,6 +41,9 @@ tonic = [
   "dep:tonic",
   "dep:http",
 ]
+reqwest = [
+  "dep:reqwest-tracing",
+]
 
 [lints]
 workspace = true