aboutsummaryrefslogtreecommitdiff
path: root/src/encoding
diff options
context:
space:
mode:
authorHana Kim <hakim@google.com>2018-04-12 17:06:33 -0400
committerHyang-Ah Hana Kim <hyangah@gmail.com>2018-04-13 16:18:30 +0000
commit1d8fc211f99ea813e3c6517c12d7758691bf0529 (patch)
tree478f50e73566a5af5a2f048a8f98e4855ae32624 /src/encoding
parent4d59b14400aff02ded4ccf62a7518266ea8fd767 (diff)
downloadgo-1d8fc211f99ea813e3c6517c12d7758691bf0529.tar.xz
cmd/trace: change span id computation for trace view use
golang.org/cl/102697 attempted to fix the span presentation by utilizing the position of the span in the span slices of a task. But it is not complete either. First, id=0 is omitted in json encoding and the trace viewer silently drops entries with the missing id field, so we must avoid zero-value id. Second, it is possible that a goroutine handles multiple tasks. Then, id collisions will happen. This takes a simpler approach - have a counter that increments for every emitSpan call, and use the value as the id value. Change-Id: Idaa9505634acf6d327c6f00af32d8260955b85e1 Reviewed-on: https://go-review.googlesource.com/106755 Reviewed-by: Heschi Kreinick <heschi@google.com> Run-TryBot: Hyang-Ah Hana Kim <hyangah@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/encoding')
0 files changed, 0 insertions, 0 deletions