-
Notifications
You must be signed in to change notification settings - Fork 167
Description
Is your feature request related to a problem? Please describe.
The current DDOGTracer with AsyncDriver creates a span for each Hamilton function/node when it creates a coroutine, but doesn't track when the function actually runs. It would be great to have it track timing of the actual function body execution for more accurate metrics.
Also when using Hamilton in a FastAPI app, the FastAPI middleware tracer is not correlating the Hamilton trace as a child, i.e. 2 separate traces appear in DataDog. Ideally the Hamilton trace uses the current FastAPI request trace as its parent.
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
Open to using the OTel adapter instead of DDog if it's any easier to implement these changes.
Additional context
Slack thread: https://hamilton-opensource.slack.com/archives/C03M33QB4M8/p1731597046007369