Skip to content

Commit

Permalink
Merge 5acbe4b into 1a75356
Browse files Browse the repository at this point in the history
  • Loading branch information
jcchavezs committed May 14, 2019
2 parents 1a75356 + 5acbe4b commit 267294f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions span_implementation.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,15 @@ func (s *spanImpl) Finish() {
}
}

func (s *spanImpl) FinishedWithDuration(d time.Duration) {
if atomic.CompareAndSwapInt32(&s.mustCollect, 1, 0) {
s.Duration = d
if s.flushOnFinish {
s.tracer.reporter.Send(s.SpanModel)
}
}
}

func (s *spanImpl) Flush() {
if s.SpanModel.Debug || (s.SpanModel.Sampled != nil && *s.SpanModel.Sampled) {
s.tracer.reporter.Send(s.SpanModel)
Expand Down

0 comments on commit 267294f

Please sign in to comment.