mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
test(clickhouse): trace ingest requests are not logged as spend
This commit is contained in:
parent
af40ccd7c3
commit
2e4fbd4656
1 changed files with 11 additions and 0 deletions
|
|
@ -187,6 +187,17 @@ async def test_missing_payload_and_bad_payload_never_raise():
|
|||
assert logger.log_queue == []
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_trace_ingest_requests_are_not_logged_as_spend():
|
||||
# OTLP exports hit POST /v1/traces; they are not LLM calls and must not create spend rows
|
||||
logger = ClickHouseSpendLogger(client=MagicMock())
|
||||
payload = _payload(call_type="/v1/traces", status="failure")
|
||||
|
||||
await logger.async_log_failure_event({"standard_logging_object": payload}, None, None, None)
|
||||
|
||||
assert logger.log_queue == []
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_clickhouse_callback_resolves_via_factory(monkeypatch):
|
||||
monkeypatch.setenv("CLICKHOUSE_URL", "http://localhost:8123")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue