Skip to content

Commit

Permalink
Check return value of FlushLightStepTracer
Browse files Browse the repository at this point in the history
* Currently this is always nil, so it's not actually meaningful
  • Loading branch information
ChimeraCoder committed Jul 24, 2017
1 parent 0531d2a commit 805883b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion flusher.go
Original file line number Diff line number Diff line change
Expand Up @@ -786,7 +786,12 @@ func flushSpansLightstep(ctx context.Context, s *Server, tracerThunk func() open
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 805883b

Please sign in to comment.