nickstenning commented on PR #61897: URL: https://github.com/apache/airflow/pull/61897#issuecomment-3938943238
BTW @dstandish, if you _do_ want to generate spans for a full dag run or task execution, I don't think that should be too hard to do. The basic idea is that the parent span doesn't need to exist from the start. Only its span _context_ (i.e. its allocated trace ID and span ID) needs to be allocated from the beginning. So you'd generate the span context for the dag run (and then again I guess for each task within the dag), save it in the database, and then pull it out right at the end of the dag run (or at the end of the task execution) and emit a synthetic span that's "backdated" to start when the database says it started. I knocked up [a small example of how to do this](https://gist.github.com/nickstenning/74e8ba8f6ef8b0f68a39329acccfa993). <img width="1328" height="904" alt="image" src="https://github.com/user-attachments/assets/e9140784-327b-450c-96b1-709ddba1eaaf" /> -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
