From a80ebf18e36fe57d61bfccee27a1a652ededb1cb Mon Sep 17 00:00:00 2001 From: Derek Higgins Date: Thu, 30 Oct 2025 23:08:11 +0000 Subject: [PATCH] fix: Fix missing telemetry env vars in server mode LLAMA_STACK_TEST_COLLECTOR_PORT and OTEL_EXPORTER_OTLP_ENDPOINT were only set in docker mode, causing the telemetry tests to fail in "server" record mode. Closes: #3993 Signed-off-by: Derek Higgins --- scripts/integration-tests.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/integration-tests.sh b/scripts/integration-tests.sh index a09dc8621..5873f59ca 100755 --- a/scripts/integration-tests.sh +++ b/scripts/integration-tests.sh @@ -159,6 +159,11 @@ if [[ "$COLLECT_ONLY" == false ]]; then if [[ "$STACK_CONFIG" == server:* ]] || [[ "$STACK_CONFIG" == docker:* ]]; then export LLAMA_STACK_TEST_STACK_CONFIG_TYPE="server" echo "Setting stack config type: server" + + # Configure telemetry collector port for both server and docker modes + COLLECTOR_PORT=4317 + export LLAMA_STACK_TEST_COLLECTOR_PORT="${COLLECTOR_PORT}" + export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:${COLLECTOR_PORT}" else export LLAMA_STACK_TEST_STACK_CONFIG_TYPE="library_client" echo "Setting stack config type: library_client" @@ -284,10 +289,6 @@ if [[ "$STACK_CONFIG" == *"docker:"* && "$COLLECT_ONLY" == false ]]; then docker stop "$container_name" 2>/dev/null || true docker rm "$container_name" 2>/dev/null || true - # Configure telemetry collector port shared between host and container - COLLECTOR_PORT=4317 - export LLAMA_STACK_TEST_COLLECTOR_PORT="${COLLECTOR_PORT}" - # Build environment variables for docker run DOCKER_ENV_VARS="" DOCKER_ENV_VARS="$DOCKER_ENV_VARS -e LLAMA_STACK_TEST_INFERENCE_MODE=$INFERENCE_MODE"