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).
This commit is contained in:
Jakub Jirutka
2022-09-04 00:43:48 +02:00
parent e7af006c1c
commit ea36b9ff90
3 changed files with 38 additions and 24 deletions
+3 -2
View File
@@ -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"]