llama-stack-mirror/tests/integration/telemetry/collectors
Emilio Garcia ba50790a28
feat(tests): metrics tests (#3966)
# What does this PR do?
1. Make telemetry tests as easy as possible for users by expanding the
`SpanStub` data class and creating the `MetricStub` dataclass as a way
to consistently marshal telemetry data in test fixtures and unmarshal
and handle it in tests.
2. Structure server and client tests to always follow the same standards
for consistent testing experience by using the `SpanStub` and
`MetricStub` data class objects.
3. Enable Metrics Testing for completions endpoint
4. Correct token metrics to use histograms instead of counts to capture
tokens per request rather than a cumulative count of tokens over the
lifecycle of the server.

## Test Plan
These are tests
2025-11-05 10:26:15 -08:00
..
__init__.py test: enable telemetry tests in server mode (#3927) 2025-10-28 16:33:48 -07:00
base.py feat(tests): metrics tests (#3966) 2025-11-05 10:26:15 -08:00
in_memory.py feat(tests): metrics tests (#3966) 2025-11-05 10:26:15 -08:00
otlp.py feat(tests): metrics tests (#3966) 2025-11-05 10:26:15 -08:00