From aa5016eb72fdc6904f35847fd40379b34b66a256 Mon Sep 17 00:00:00 2001 From: Dieter Plaetinck Date: Sat, 9 Sep 2017 00:43:51 +0200 Subject: [PATCH] Log span name when span cannot be reported (#198) --- reporter.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/reporter.go b/reporter.go index 0bff9197..a5b27436 100644 --- a/reporter.go +++ b/reporter.go @@ -21,6 +21,7 @@ package jaeger import ( + "fmt" "sync" "sync/atomic" "time" @@ -234,7 +235,7 @@ func (r *remoteReporter) processQueue() { atomic.AddInt64(&r.queueLength, -1) if flushed, err := r.sender.Append(span); err != nil { r.metrics.ReporterFailure.Inc(int64(flushed)) - r.logger.Error(err.Error()) + r.logger.Error(fmt.Sprintf("error reporting span %q: %s", span.OperationName(), err.Error())) } else if flushed > 0 { r.metrics.ReporterSuccess.Inc(int64(flushed)) // to reduce the number of gauge stats, we only emit queue length on flush