Skip to content

Commit

Permalink
Remove unneeded span
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
dhirving committed Dec 5, 2024
1 parent e9fe2a7 commit 5eb02ad
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 5eb02ad

Please sign in to comment.