Only set end time if unset
@@ -99,8 +99,10 @@ type Trace struct {
// Set the end timestamp and finalize Span state
func (t *Trace) finish() {
+ if t.End.IsZero() {
t.End = time.Now()
}
+}
// (Experimental)
// Enabled sets tracing to enabled.
