From 8739b670e6970c275307f45315fb00e38c3d4c45 Mon Sep 17 00:00:00 2001 From: cthomas Date: Wed, 6 Aug 2025 12:06:23 -0700 Subject: [PATCH] feat: add signoz integration for otel export (#3772) --- Dockerfile | 1 + letta/server/startup.sh | 3 ++ otel/otel-collector-config-signoz.yaml | 51 ++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100644 otel/otel-collector-config-signoz.yaml diff --git a/Dockerfile b/Dockerfile index ccb0bd86..26a1838b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -64,6 +64,7 @@ RUN apt-get update && \ # Add OpenTelemetry Collector configs COPY otel/otel-collector-config-file.yaml /etc/otel/config-file.yaml COPY otel/otel-collector-config-clickhouse.yaml /etc/otel/config-clickhouse.yaml +COPY otel/otel-collector-config-signoz.yaml /etc/otel/config-signoz.yaml ARG LETTA_ENVIRONMENT=DEV ENV LETTA_ENVIRONMENT=${LETTA_ENVIRONMENT} \ diff --git a/letta/server/startup.sh b/letta/server/startup.sh index ce212080..5d8d736a 100755 --- a/letta/server/startup.sh +++ b/letta/server/startup.sh @@ -57,6 +57,9 @@ fi if [ -n "$CLICKHOUSE_ENDPOINT" ] && [ -n "$CLICKHOUSE_PASSWORD" ]; then echo "Starting OpenTelemetry Collector with Clickhouse export..." CONFIG_FILE="/etc/otel/config-clickhouse.yaml" +elif [ -n "$SIGNOZ_ENDPOINT" ] && [ -n "$SIGNOZ_INGESTION_KEY" ]; then + echo "Starting OpenTelemetry Collector with Signoz export..." + CONFIG_FILE="/etc/otel/config-signoz.yaml" else echo "Starting OpenTelemetry Collector with file export only..." CONFIG_FILE="/etc/otel/config-file.yaml" diff --git a/otel/otel-collector-config-signoz.yaml b/otel/otel-collector-config-signoz.yaml new file mode 100644 index 00000000..a6579d41 --- /dev/null +++ b/otel/otel-collector-config-signoz.yaml @@ -0,0 +1,51 @@ +receivers: + otlp: + protocols: + grpc: + endpoint: 0.0.0.0:4317 + http: + endpoint: 0.0.0.0:4318 + +processors: + memory_limiter: + check_interval: 1s + limit_mib: 500 + spike_limit_mib: 128 + batch: + timeout: 10s + send_batch_size: 8192 + max_queue_size: 4096 + max_batch_size: 1024 + throttle: true + +exporters: + otlp: + endpoint: ${SIGNOZ_ENDPOINT} + headers: + "signoz-ingestion-key": "${SIGNOZ_INGESTION_KEY}" + +extensions: + health_check: + pprof: + zpages: + +service: + telemetry: + logs: + level: error + metrics: + address: 0.0.0.0:8888 + extensions: [health_check, pprof, zpages] + pipelines: + traces: + receivers: [otlp] + processors: [memory_limiter, batch] + exporters: [otlp] + logs: + receivers: [otlp] + processors: [memory_limiter, batch] + exporters: [otlp] + metrics: + receivers: [otlp] + processors: [memory_limiter, batch] + exporters: [otlp]