Merge pull request #266 from datastax/PYTHON-235
PYTHON-235 - QueryTrace client info
This commit is contained in:
@@ -761,6 +761,13 @@ class QueryTrace(object):
|
|||||||
A :class:`datetime.timedelta` measure of the duration of the query.
|
A :class:`datetime.timedelta` measure of the duration of the query.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
client = None
|
||||||
|
"""
|
||||||
|
The IP address of the client that issued this request
|
||||||
|
|
||||||
|
This is only available when using Cassandra 3.0+
|
||||||
|
"""
|
||||||
|
|
||||||
coordinator = None
|
coordinator = None
|
||||||
"""
|
"""
|
||||||
The IP address of the host that acted as coordinator for this request.
|
The IP address of the host that acted as coordinator for this request.
|
||||||
@@ -829,6 +836,8 @@ class QueryTrace(object):
|
|||||||
self.started_at = session_row.started_at
|
self.started_at = session_row.started_at
|
||||||
self.coordinator = session_row.coordinator
|
self.coordinator = session_row.coordinator
|
||||||
self.parameters = session_row.parameters
|
self.parameters = session_row.parameters
|
||||||
|
# since C* 3.0
|
||||||
|
self.client = getattr(session_row, 'client', None)
|
||||||
|
|
||||||
log.debug("Attempting to fetch trace events for trace ID: %s", self.trace_id)
|
log.debug("Attempting to fetch trace events for trace ID: %s", self.trace_id)
|
||||||
time_spent = time.time() - start
|
time_spent = time.time() - start
|
||||||
|
|||||||
Reference in New Issue
Block a user