dstandish commented on code in PR #62554:
URL: https://github.com/apache/airflow/pull/62554#discussion_r2896956832
##########
task-sdk/src/airflow/sdk/execution_time/task_runner.py:
##########
@@ -1796,6 +1816,17 @@ def finalize(
log.exception("error calling listener")
+@contextmanager
+def flush_spans():
+ try:
+ yield
+ finally:
+ provider = trace.get_tracer_provider()
+ if hasattr(provider, "force_flush"):
+ provider.force_flush(timeout_millis=30000)
Review Comment:
i'm much less resistant to adding config when i can do this
```
in task_runner.py we have this line
provider.force_flush(timeout_millis=30000)
can you make that driven by an airflow task sdk configuration
```
--
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]