aboutsummaryrefslogtreecommitdiff
path: root/hosts/sagittarius/web/observability.nix
diff options
context:
space:
mode:
authorIsabella Bastaja <isabella@sorre.xyz>2025-12-26 23:39:08 +0100
committerIsabella Bastaja <isabella@sorre.xyz>2025-12-26 23:45:25 +0100
commitb34f7b7e297595251cf6019941a32b8acc4d1574 (patch)
tree5891cc5d09c6a388a0d1fd7d5e710fa800b859b3 /hosts/sagittarius/web/observability.nix
parent21c138b995098d4b63d70741ca112467d5cb61c0 (diff)
sagittarius: add prometheus otel exporter
Diffstat (limited to 'hosts/sagittarius/web/observability.nix')
-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 @@
};
};
};
+
}