Skip to content

Commit

Permalink
Merge pull request #209 from stripe/aditya-lightstep-flush-error
Browse files Browse the repository at this point in the history
Check return value of FlushLightStepTracer
  • Loading branch information
cory-stripe authored Aug 29, 2017
2 parents 9585d29 + 249396f commit 6b8b3d9
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions flusher.go
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,12 @@ func flushSpansLightstep(ctx context.Context, s *Server, lightstepTracer opentra
for _, ssfSpan := range ssfSpans {
flushSpanLightstep(lightstepTracer, ssfSpan)
}

lightstep.FlushLightStepTracer(lightstepTracer)
err := lightstep.FlushLightStepTracer(lightstepTracer)
if err != nil {
log.WithError(err).Error("Error flushing traces to Lightstep")
s.Statsd.Incr("worker.trace.sink.flush_errors", []string{"sink:lightstep"}, 1)
span.Error(err)
}

// Confusingly, this will still get called even if the Opentracing client fails to reach the collector
// because we don't get access to the error if that happens.
Expand Down

0 comments on commit 6b8b3d9

Please sign in to comment.