Skip to content

Commit f0e6533

Browse files
committed
MB-43617: kv_slow_ops_2_gtrace: Ignore spurious empty spans
MB-43617: Ignore any spans which have zero time and duration; they are spurious due to missing copy-elision when recording Spans. Change-Id: I70223d6294bb8d0ba487d9cff32f5543187d05bd Reviewed-on: http://review.couchbase.org/c/kv_engine/+/155603 Tested-by: Dave Rigby <[email protected]> Reviewed-by: Jim Walker <[email protected]>
1 parent 2461741 commit f0e6533

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

engines/ep/management/kv_slow_ops_2_gtrace

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,16 @@ for line in fileinput.input():
4242
# Build a trace event from each span in the slow op.
4343
for span in slow_op['trace'].split():
4444
(name, value) = span.split('=')
45-
(start_us, dur) = value.split(':')
45+
(start_us, dur) = map(int, value.split(':'))
46+
# MB-43617: Ignore any spans which have zero time and duration;
47+
# they are spurious due to missing copy-elision when recording
48+
# Spans.
49+
if not (start_us or dur):
50+
continue
4651
event = dict()
4752
event.update(common)
4853
event['name'] = name
49-
event['ts'] = int(start_us) / 1000
54+
event['ts'] = start_us / 1000
5055
event['dur'] = dur
5156
# For the top-level 'request' event, include additional request
5257
# details (redundant to repeat for every event).

0 commit comments

Comments
 (0)