From 5eb02adedc3059bf7da4ba3300926a7a6168c5cf Mon Sep 17 00:00:00 2001 From: "David H. Irving" Date: Tue, 19 Nov 2024 16:01:04 -0700 Subject: [PATCH] Remove unneeded span This would create an excessive number of spans for larger queries. The FastAPI telemetry is already tracking the time spent in sending the results to the client, so we can see it without adding an additional span. --- .../butler/remote_butler/server/handlers/_query_streaming.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/python/lsst/daf/butler/remote_butler/server/handlers/_query_streaming.py b/python/lsst/daf/butler/remote_butler/server/handlers/_query_streaming.py index 446a9d10eb..9b6b830eff 100644 --- a/python/lsst/daf/butler/remote_butler/server/handlers/_query_streaming.py +++ b/python/lsst/daf/butler/remote_butler/server/handlers/_query_streaming.py @@ -180,8 +180,7 @@ async def _enqueue_query_pages( async with contextmanager_in_threadpool(query.setup()) as ctx: with telemetry.span("Read from DB and send results"): async for page in iterate_in_threadpool(query.execute(ctx)): - with telemetry.span("Wait for caller to read results"): - await queue.put(page) + await queue.put(page) except ButlerUserError as e: # If a user-facing error occurs, serialize it and send it to the # client.