mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-03 09:53:45 +00:00
fix(scripts): add metrics interval to env variables
This commit is contained in:
parent
661bd28e86
commit
e8d20b9c50
2 changed files with 10 additions and 10 deletions
|
|
@ -227,14 +227,15 @@ if [[ "$STACK_CONFIG" == *"server:"* && "$COLLECT_ONLY" == false ]]; then
|
|||
echo "=== Starting Llama Stack Server ==="
|
||||
export LLAMA_STACK_LOG_WIDTH=120
|
||||
|
||||
# Configure telemetry collector for server mode
|
||||
# Use a fixed port for the OTEL collector so the server can connect to it
|
||||
COLLECTOR_PORT=4317
|
||||
export LLAMA_STACK_TEST_COLLECTOR_PORT="${COLLECTOR_PORT}"
|
||||
export OTEL_EXPORTER_OTLP_ENDPOINT="http://127.0.0.1:${COLLECTOR_PORT}"
|
||||
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
|
||||
export OTEL_BSP_SCHEDULE_DELAY="200"
|
||||
export OTEL_BSP_EXPORT_TIMEOUT="2000"
|
||||
# Configure telemetry collector for server mode
|
||||
# Use a fixed port for the OTEL collector so the server can connect to it
|
||||
COLLECTOR_PORT=4317
|
||||
export LLAMA_STACK_TEST_COLLECTOR_PORT="${COLLECTOR_PORT}"
|
||||
export OTEL_EXPORTER_OTLP_ENDPOINT="http://127.0.0.1:${COLLECTOR_PORT}"
|
||||
export OTEL_EXPORTER_OTLP_PROTOCOL="http/protobuf"
|
||||
export OTEL_BSP_SCHEDULE_DELAY="200"
|
||||
export OTEL_BSP_EXPORT_TIMEOUT="2000"
|
||||
export OTEL_METRIC_EXPORT_INTERVAL="200"
|
||||
|
||||
# remove "server:" from STACK_CONFIG
|
||||
stack_config=$(echo "$STACK_CONFIG" | sed 's/^server://')
|
||||
|
|
|
|||
|
|
@ -113,8 +113,7 @@ def test_telemetry_format_completeness(mock_otlp_collector, llama_stack_client,
|
|||
assert len(metrics) > 0, "No metrics found within timeout"
|
||||
|
||||
# Filter metrics to only those from the specific model used in the request
|
||||
# This prevents issues when multiple metrics with the same name exist from different models
|
||||
# (e.g., when safety models like llama-guard are also called)
|
||||
# Multiple metrics with the same name can exist (e.g., from safety models)
|
||||
inference_model_metrics = {}
|
||||
all_model_ids = set()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue