forked from phoenix/litellm-mirror
fix otel test
This commit is contained in:
parent
7dac0e0001
commit
35ecf3c06b
1 changed files with 4 additions and 2 deletions
|
@ -97,6 +97,8 @@ async def test_chat_completion_check_otel_spans():
|
||||||
key = key_gen["key"]
|
key = key_gen["key"]
|
||||||
await chat_completion(session=session, key=key, model="fake-openai-endpoint")
|
await chat_completion(session=session, key=key, model="fake-openai-endpoint")
|
||||||
|
|
||||||
|
await asyncio.sleep(3)
|
||||||
|
|
||||||
otel_spans = await get_otel_spans(session=session, key=key)
|
otel_spans = await get_otel_spans(session=session, key=key)
|
||||||
print("otel_spans: ", otel_spans)
|
print("otel_spans: ", otel_spans)
|
||||||
|
|
||||||
|
@ -108,8 +110,8 @@ async def test_chat_completion_check_otel_spans():
|
||||||
|
|
||||||
print("Parent trace spans: ", parent_trace_spans)
|
print("Parent trace spans: ", parent_trace_spans)
|
||||||
|
|
||||||
# either 4 or 5 traces depending on how many redis calls were made
|
# either 5 or 6 traces depending on how many redis calls were made
|
||||||
assert len(parent_trace_spans) == 5 or len(parent_trace_spans) == 4
|
assert len(parent_trace_spans) == 6 or len(parent_trace_spans) == 5
|
||||||
|
|
||||||
# 'postgres', 'redis', 'raw_gen_ai_request', 'litellm_request', 'Received Proxy Server Request' in the span
|
# 'postgres', 'redis', 'raw_gen_ai_request', 'litellm_request', 'Received Proxy Server Request' in the span
|
||||||
assert "postgres" in parent_trace_spans
|
assert "postgres" in parent_trace_spans
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue