From faca9dc0f580fe3c630ac48c693c947b832bce7f Mon Sep 17 00:00:00 2001 From: Jonathan Amsterdam Date: Tue, 13 Oct 2020 17:05:05 -0400 Subject: [PATCH] internal/dcensus: downgrade stackdriver API errors to log warnings Change-Id: I0e1e9e8bfb6e0d1bca59a0d598ee3e6efa096c1f Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/261820 Trust: Jonathan Amsterdam Run-TryBot: Jonathan Amsterdam Reviewed-by: Julie Qiu TryBot-Result: kokoro --- internal/dcensus/dcensus.go | 2 +- internal/dcensus/debug.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/dcensus/dcensus.go b/internal/dcensus/dcensus.go index 8de6fbd9..749c0397 100644 --- a/internal/dcensus/dcensus.go +++ b/internal/dcensus/dcensus.go @@ -178,7 +178,7 @@ func NewViewExporter(cfg *config.Config) (_ *stackdriver.Exporter, err error) { MonitoredResource: mr, DefaultMonitoringLabels: stackdriverLabels(cfg), OnError: func(err error) { - log.Errorf(context.Background(), "Stackdriver view exporter: %v", err) + log.Warningf(context.Background(), "Stackdriver view exporter: %v", err) }, }) } diff --git a/internal/dcensus/debug.go b/internal/dcensus/debug.go index 8bac6f16..fd6134a2 100644 --- a/internal/dcensus/debug.go +++ b/internal/dcensus/debug.go @@ -35,7 +35,7 @@ func (d *debugTraceExporter) ExportSpan(s *trace.SpanData) { d.err = nil d.mu.Unlock() if err != nil { - log.Errorf(ctx, "trace exporter: %v", err) + log.Warningf(ctx, "trace exporter: %v", err) log.Debugf(ctx, "trace exporter SpanData:\n%s", dumpSpanData(s)) } }