aboutsummaryrefslogtreecommitdiff
path: root/src/api/Cargo.toml
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2022-09-04 00:43:48 +0200
committerJakub Jirutka <jakub@jirutka.cz>2022-09-06 01:15:09 +0200
commitea36b9ff904a8300afb8fb1601cde88c915a810f (patch)
tree73dd84bba384a79cacdbd4bdec01c5c9485d2c6b /src/api/Cargo.toml
parente7af006c1c8211bf83b5d8abb7490ef270dd8345 (diff)
downloadgarage-ea36b9ff904a8300afb8fb1601cde88c915a810f.tar.gz
garage-ea36b9ff904a8300afb8fb1601cde88c915a810f.zip
Allow building without Prometheus exporter (/metrics endpoint)
prometheus and opentelemetry-prometheus add 7 extra dependencies in total and increases the size of the garage binary by ~7 % (with fat LTO).
Diffstat (limited to 'src/api/Cargo.toml')
-rw-r--r--src/api/Cargo.toml5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/api/Cargo.toml b/src/api/Cargo.toml
index 782054bd..ce2d11c0 100644
--- a/src/api/Cargo.toml
+++ b/src/api/Cargo.toml
@@ -54,10 +54,11 @@ quick-xml = { version = "0.21", features = [ "serialize" ] }
url = "2.1"
opentelemetry = "0.17"
-opentelemetry-prometheus = "0.10"
+opentelemetry-prometheus = { version = "0.10", optional = true }
opentelemetry-otlp = { version = "0.10", optional = true }
-prometheus = "0.13"
+prometheus = { version = "0.13", optional = true }
[features]
k2v = [ "garage_util/k2v", "garage_model/k2v" ]
+metrics = [ "opentelemetry-prometheus", "prometheus" ]
telemetry-otlp = ["opentelemetry-otlp"]