feat(tvix/nar-bridge): wire up metrics layer

This provides some global HTTP statistics.

Change-Id: I8bd3e034123154a49d94720b0c8d0c3babde5ae3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12557
Reviewed-by: Jonas Chevalier <zimbatm@zimbatm.com>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
This commit is contained in:
Florian Klink 2024-09-29 23:34:43 +02:00 committed by flokli
parent 5f670a2f67
commit 02903133f4
7 changed files with 112 additions and 5 deletions

View file

@ -16,11 +16,13 @@ futures = { workspace = true }
itertools = { workspace = true }
prost = { workspace = true }
nix-compat = { path = "../nix-compat", features = ["async"] }
opentelemetry = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true }
tokio-listener = { workspace = true, features = ["axum07", "clap", "multi-listener", "sd_listen"] }
tokio-util = { workspace = true, features = ["io", "io-util", "compat"] }
tonic = { workspace = true, features = ["tls", "tls-roots"] }
tower-otel-http-metrics = { workspace = true, optional = true }
tvix-castore = { path = "../castore" }
tvix-store = { path = "../store" }
tvix-tracing = { path = "../tracing", features = ["tonic", "axum"] }
@ -38,7 +40,7 @@ tonic-build = { workspace = true }
[features]
default = ["otlp"]
otlp = ["tvix-tracing/otlp"]
otlp = ["tvix-tracing/otlp", "tower-otel-http-metrics"]
xp-store-composition-cli = ["tvix-store/xp-composition-cli"]
[dev-dependencies]