test(langfuse): remove remaining v2 SDK usage

This commit is contained in:
Devin AI 2026-07-15 15:16:11 +00:00
parent a3803463e5
commit 5ac705968c
3 changed files with 9 additions and 3 deletions

View file

@ -83,7 +83,7 @@ def search_logs(log_file_path, num_good_logs=1):
print(line.strip())
print("\n\n")
match = re.search(
r'"POST /api/public/ingestion HTTP/1.1" (\d+) (\d+)',
r'"POST /api/public/otel/v1/traces HTTP/1.1" (\d+) (\d+)',
line,
)
if match:

View file

@ -7,7 +7,8 @@ langfuse = Langfuse(
)
print("sending langfuse trace request")
trace = langfuse.trace(name="test-trace-litellm-proxy-passthrough")
with langfuse.start_as_current_observation(name="test-trace-litellm-proxy-passthrough"):
pass
print("flushing langfuse request")
langfuse.flush()

View file

@ -110,7 +110,12 @@ async def test_team_logging():
print(f"searching for trace_id={_trace_id} on langfuse")
generations = langfuse_client.get_generations(trace_id=_trace_id).data
trace_id = langfuse_client.create_trace_id(seed=_trace_id)
generations = langfuse_client.api.observations.get_many(
trace_id=trace_id,
type="GENERATION",
parse_io_as_json=True,
).data
# 1 generation with this trace id
assert len(generations) == 1