Configuration

Environment variables, retention, sampling, and how to enable or disable the GENIE.AI observability stack.

The observability stack is disabled by default. Enabling it is a single environment variable, but a handful of related variables control access, retention, and sampling.

Enabling

VariableDefaultNotes
ENABLE_OBSERVABILITY0Must be 0 or 1 (not true/false). Swarm mode reads this to place the stack.
OTEL_EXPORTER_OTLP_ENDPOINThttp://otel-collector:4318OTLP base URL all instrumented services export to. Override only for an external collector.

How it is enabled per deployment mode:

  • Docker Composedocker compose --profile observability up -d
  • Docker SwarmENABLE_OBSERVABILITY=1 in .env
  • Ansibleenable_observability: "1" in group_vars/all.yml

Sampling

VariableDefaultNotes
OTEL_TRACES_SAMPLER_RATE100.0Trace sampling percentage. Lower for high-volume prod; raise when diagnosing. Metrics and logs are not sampled.
KONG_TRACING_SAMPLING_RATE1.0Kong trace sampling rate (0–1), aligned with OTEL_TRACES_SAMPLER_RATE.
KONG_TRACING_INSTRUMENTATIONSrequestKong tracing instrumentations. Negligible overhead when the OTel plugin is disabled.

Retention

Each Victoria store keeps data for a configurable window; lower it to save disk, raise it for longer historical analysis.

VariableDefault
VICTORIAMETRICS_RETENTION30d
VICTORIALOGS_RETENTION30d
VICTORIATRACES_RETENTION30d

Grafana access

Grafana is served behind the Kong gateway at /grafana/ (no direct host port) with Keycloak OIDC SSO.

VariableDefaultNotes
GRAFANA_PORT3002Host port (avoids a backend port conflict).
GRAFANA_ADMIN_USERadminLocal admin username.
GRAFANA_ADMIN_PASSWORD(required when enabled)Local admin password.
KC_GRAFANA_CLIENT_IDgrafanaKeycloak OIDC client id for Grafana SSO.
KC_GRAFANA_CLIENT_SECRET(required when enabled)Keycloak OIDC client secret.

SSO is the intended access path. The local admin is a break-glass account; day-to-day access goes through Keycloak, so access is governed by the same identity provider as the rest of the platform.

Collector placement

The collector runs in Docker Swarm mode: global with no node placement constraint, so one collector runs on every node (gateway, genieai, gpu). This guarantees all container logs are collected regardless of where a service lands. The collector’s fluent_forward receiver (port 24224) is bound to localhost only.

Disabling

Set ENABLE_OBSERVABILITY=0 (Swarm) or omit the observability profile (Compose). Application services continue to run; they simply attempt to export to a collector that is not there, which OTel handles gracefully (telemetry is dropped, not buffered indefinitely).

Config file locations

ArtifactPath
Collector configconfigs/otel/otel-collector-config.yaml
Grafana datasourcesconfigs/grafana/provisioning/datasources/
Grafana dashboardsconfigs/grafana/provisioning/dashboards/
Grafana alertingconfigs/grafana/provisioning/alerting/
OTel integration guideconfigs/otel/README.md