Tolerate null source_elapsed in trace events
For PYTHON-48
This commit is contained in:
@@ -18,6 +18,8 @@ Bug Fixes
|
||||
* Handle data that is already utf8-encoded for UTF8Type values
|
||||
* Fix token-aware routing for tokens that fall before the first node token in
|
||||
the ring and tokens that exactly match a node's token
|
||||
* Tolerate null source_elapsed values for Trace events. These may not be
|
||||
set when events complete after the main operation has already completed.
|
||||
|
||||
Other
|
||||
-----
|
||||
|
@@ -489,7 +489,10 @@ class TraceEvent(object):
|
||||
self.description = description
|
||||
self.datetime = datetime.utcfromtimestamp(unix_time_from_uuid1(timeuuid))
|
||||
self.source = source
|
||||
self.source_elapsed = timedelta(microseconds=source_elapsed)
|
||||
if source_elapsed is not None:
|
||||
self.source_elapsed = timedelta(microseconds=source_elapsed)
|
||||
else:
|
||||
self.source_elapsed = None
|
||||
self.thread_name = thread_name
|
||||
|
||||
def __str__(self):
|
||||
|
Reference in New Issue
Block a user