The telemetry integration tests were failing in server mode because the OTEL
collector configuration was being set up after the server had already started.
This meant the server never received telemetry configuration and couldn't
export spans to the collector, resulting in empty span collections.
Changes:
- Set OTEL environment variables in integration-tests.sh before starting server
- Use LLAMA_STACK_TEST_COLLECTOR_PORT to ensure collector and server use same port
- Simplify conftest.py to not override env vars in server mode since server is already running
- Add verification that collector endpoint matches expected endpoint
This ensures telemetry spans are properly collected during server mode tests.
# What does this PR do?
Clean up telemetry code since the telemetry API has been remove.
- moved telemetry files out of providers to core
- removed from Api
## Test Plan
❯ OTEL_SERVICE_NAME=llama_stack
OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318 uv run llama stack run
starter
❯ curl http://localhost:8321/v1/chat/completions \
-H "Content-Type: application/json" \
-d '{
"model": "openai/gpt-4o-mini",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}'
-> verify traces in Grafana
CI
# What does this PR do?
Adds a test and a standardized way to build future tests out for
telemetry in llama stack.
Contributes to https://github.com/llamastack/llama-stack/issues/3806
## Test Plan
This is the test plan 😎