sourcegraph / appdash

Application tracing system for Go, based on Google's Dapper.
https://sourcegraph.com
Other
1.72k stars 137 forks source link

`apptrace serve --sample-data` is broken #6

Closed slimsag closed 9 years ago

slimsag commented 9 years ago

I'm trying to get a tackle on what the timeline UI looks like when there are a lot of cascading spans and sub-spans; it seems that running:

apptrace serve --sample-data

does not work (the timeline doesn't show at all). Chrome's console outputs:

Uncaught TypeError: Cannot read property 'forEach' of null    d3-timeline.js:82
(anonymous function)                                                               d3-timeline.js:73
(anonymous function)                                                               d3.js:884
(anonymous function)                                                               d3.js:890
d3_selection_each                                                                   d3.js:883
d3_selectionPrototype.each                                                     d3-timeline.js:72
timeline                                                                                     d3.js:897
d3_selectionPrototype.call                                                       00b74083bb122981:119
timelineHover                                                                           00b74083bb122981:122 (anonymous function)

I will report back here with more info as I find it.

slimsag commented 9 years ago

d3-timeline.js:82 is an attempt to iterate over each time in the times array of a Go timelineItem. For some reason in this case times is null.

slimsag commented 9 years ago

Ok, it looks like --sample-data does not actually generate any time-span events. I guess there are two separate issues here:

slimsag commented 9 years ago

Hm, we might have to fake non-zero duration's as zero-durations cause d3 to divide by zero, it looks like:

image