From bc6d6a516da8155de9306b3fc5408dd14c887904 Mon Sep 17 00:00:00 2001 From: yucheng Date: Wed, 23 Sep 2026 08:33:52 +0000 Subject: [PATCH] test(langfuse_otel): drain wire batches per poll instead of accumulating Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- .../integration/observability/test_langfuse_otel_metadata.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/integration/observability/test_langfuse_otel_metadata.py b/tests/integration/observability/test_langfuse_otel_metadata.py index fb07b672f7e..bc22f187528 100644 --- a/tests/integration/observability/test_langfuse_otel_metadata.py +++ b/tests/integration/observability/test_langfuse_otel_metadata.py @@ -79,13 +79,10 @@ def _langfuse_rig( def _observation_span(collector: Wire, response_id: str) -> dict[str, object]: - batches: Final[list[Request]] = [] # mutable-ok: drain() consumes the queue, so accumulating needs a mutable list - def spans() -> tuple[dict[str, object], ...]: - batches.extend(collector.drain()) return tuple( attributes - for batch in batches + for batch in collector.drain() for attributes in _span_attributes(batch.body) if attributes.get("llm.response.id") == response_id )