The documentation for ResponseFuture.get_query_trace states
Thus, the following code
should return a trace or raise TraceUnavailable. Instead, it is returning None even though trace was set to True in the call to execute_async.
If I step into the driver code with ipdb, it is happening at this check:
This is because the future has not returned yet, and calling future.result() first will solve the issue. This is not clear in the documentation. The use of max_wait implies (at least to me, and potentially to other users) it would wait for a trace to become available, including waiting for the future to return. Since I assume changing the function is architecturally difficult, it would be nice if the docs mentioned that future.result() must be called before calling get_query_trace()