aboutsummaryrefslogtreecommitdiff
path: root/hosts/sagittarius
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/sagittarius')
-rw-r--r--hosts/sagittarius/web/observability.nix18
1 files changed, 17 insertions, 1 deletions
diff --git a/hosts/sagittarius/web/observability.nix b/hosts/sagittarius/web/observability.nix
index 956245c..6a2e58a 100644
--- a/hosts/sagittarius/web/observability.nix
+++ b/hosts/sagittarius/web/observability.nix
@@ -1,4 +1,7 @@
{ ... }:
+let
+ otel-prometheus-exporter-port = 4316;
+in
{
services.opentelemetry-collector = {
enable = true;
@@ -28,11 +31,20 @@
limit_mib = 2500;
spike_limit_mib = 500;
};
+ batch = {
+ timeout = "10s";
+ send_batch_size = 100;
+ };
};
exporters = {
debug = {
verbosity = "detailed";
};
+ prometheus = {
+ endpoint = "localhost:${toString otel-prometheus-exporter-port}";
+ send_timestamps = true;
+ enable_open_metrics = true;
+ };
};
service = {
extensions = [ ];
@@ -46,7 +58,10 @@
"otlp"
"hostmetrics"
];
- exporters = [ "debug" ];
+ exporters = [
+ "debug"
+ "prometheus"
+ ];
};
logs = {
receivers = [ "otlp" ];
@@ -56,4 +71,5 @@
};
};
};
+
}