Closed chris-ramon closed 8 years ago
Who emits an empty TimespanEvent
in the first place? It could be confusing if someone emits a span that does not have a timespan, and then it does not show up in the frontend UI.
Instead, we should probably catch this at the moment of intent. I.e. if someone emits a TimespanEvent
with empty times we log an error / ignore it there (they could insert a panic to track down the bug, but panic is not good in production).
Details
event.Start()
&event.End()
values, so no emptytimes
are added and later returned to the frontend where it's being use to draw d3 timeline chart, which would crash when trying to use an empty value fromtimes
.Notes:
examples/cmd/webapp/main.go
:MemoryStore
- won't save_schema:HTTPClient
Event
for root spans._schema:HTTPClient
) are present & contains values.examples/cmd/webapp-influxdb/main.go
:InfluxDBStore
- won't save_schema:HTTPClient
Event
for root spans._schema:HTTPClient
& it's associated times are present & it's values are empty, not because we did saved but becauseInfluxDB
will include in the query result all thefields
from themeasurement
- and the field_schema:HTTPClient
was created for other spans._schema:HTTPClient
as field so obviously it is not created on spansmeasurement
- later a child span is saved to DB which does have_schema:HTTPClient
as field, so this new field is created and for the existing spans the value of this new field is set to empty - said that, when doing queries likeSELECT * FROM SPANS WHERE trace_id=ABC
- will include all fields for measurementspans
all those used when insertingtrace_id=ABC
and the ones that weren't, those last one with empty values.