From 60049936e30867bb47892eb89aae4ccb8d091aac Mon Sep 17 00:00:00 2001 From: Anish Sarkar <104695310+AnishSarkar22@users.noreply.github.com> Date: Thu, 21 May 2026 23:00:56 +0530 Subject: [PATCH] chore(dev): add local OpenTelemetry backend configuration --- docker/docker-compose.dev.yml | 9 +++++++++ surfsense_backend/.env.example | 11 ++++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/docker/docker-compose.dev.yml b/docker/docker-compose.dev.yml index 53b8ea1a9..58cb7b42f 100644 --- a/docker/docker-compose.dev.yml +++ b/docker/docker-compose.dev.yml @@ -78,6 +78,15 @@ services: timeout: 5s retries: 5 + otel-lgtm: + image: grafana/otel-lgtm:latest + ports: + - "${OTEL_GRPC_PORT:-4317}:4317" + - "${OTEL_HTTP_PORT:-4318}:4318" + - "${OTEL_GRAFANA_PORT:-3001}:3000" + - "${OTEL_TEMPO_PORT:-3200}:3200" + restart: unless-stopped + searxng: image: searxng/searxng:2026.3.13-3c1f68c59 ports: diff --git a/surfsense_backend/.env.example b/surfsense_backend/.env.example index 3d442973c..908f4645d 100644 --- a/surfsense_backend/.env.example +++ b/surfsense_backend/.env.example @@ -303,8 +303,17 @@ LANGSMITH_PROJECT=surfsense # SURFSENSE_ENABLE_BUSY_MUTEX=false # SURFSENSE_ENABLE_LLM_TOOL_SELECTOR=false # adds a per-turn LLM call -# Observability — OTel (also requires OTEL_EXPORTER_OTLP_ENDPOINT) +# Observability - OTel # SURFSENSE_ENABLE_OTEL=false +# OpenTelemetry - endpoint enables export; absent = no-op. +# Production should point at an OTel Collector. For local docker-compose.dev.yml, +# use http://otel-lgtm:4317 instead. +# OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317 +# OTEL_EXPORTER_OTLP_PROTOCOL=grpc # or http/protobuf +# OTEL_SERVICE_NAME=surfsense-backend +# OTEL_RESOURCE_ATTRIBUTES=deployment.environment=production +# OTEL_METRIC_EXPORT_INTERVAL=60000 # ms +# OTEL_SDK_DISABLED=false # spec kill-switch # Skills + subagents # SURFSENSE_ENABLE_SKILLS=false