See full description here.
The following kind of BuiltStatement (without bound variables) will cause an NPE if the log level permits query parameters to be printed (that is, TRACE):
What's even worse, the NPE bubbles up and the connection hangs. I suggest that we also catch errors thrown from com.datastax.driver.core.LatencyTracker#update.