Ryan Whitten
11/14/2024, 3:10 PMdatadog_hook = h_ddog.DDOGTracer(root_name="hamilton_dag_trace")
builder = (
AsyncBuilder()
.with_config(config)
.with_modules(*self.included_modules)
.allow_module_overrides()
.with_adapters(self.result_builder, datadog_hook)
)
driver = await builder.build()
I see the traces ok in DataDog but trying to figure out what's happening during long idle times in the graph. I have 5 Hamilton functions that fetch from Postgres, each of which uses extract_columns to extract total of ~300 nodes.
The odd thing is I see all the nodes execute really fast at the beginning of the graph, and then the postgres queries fire after, with no node execution after that.
Is this something in the way the AsyncDriver works by creating a bunch of asyncio tasks at once and awaiting asyncio.gather for them to complete, and the datadog spans are only running over task creation, not the function body running?Ryan Whitten
11/14/2024, 3:11 PMElijah Ben Izzy
11/14/2024, 3:42 PMRyan Whitten
11/14/2024, 3:47 PMRyan Whitten
11/14/2024, 4:01 PMStefan Krawczyk
11/14/2024, 5:17 PMRyan Whitten
11/14/2024, 6:16 PMddtrace-run uvicorn ... to auto patch modules like FastAPI. I believe they auto wire in middleware that creates a span around the requestRyan Whitten
11/14/2024, 6:21 PMElijah Ben Izzy
11/14/2024, 6:22 PMElijah Ben Izzy
11/14/2024, 6:22 PMRyan Whitten
11/14/2024, 6:30 PMStefan Krawczyk
11/14/2024, 6:39 PMRyan Whitten
11/21/2024, 9:26 PMElijah Ben Izzy
11/21/2024, 9:30 PMElijah Ben Izzy
11/21/2024, 9:39 PMRyan Whitten
11/21/2024, 9:42 PMElijah Ben Izzy
11/21/2024, 9:44 PMElijah Ben Izzy
11/21/2024, 9:44 PM