зеркало из https://github.com/golang/pkgsite.git
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 <jba@google.com> Run-TryBot: Jonathan Amsterdam <jba@google.com> Reviewed-by: Julie Qiu <julie@golang.org> TryBot-Result: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Родитель
40c2f64cf3
Коммит
faca9dc0f5
|
@ -178,7 +178,7 @@ func NewViewExporter(cfg *config.Config) (_ *stackdriver.Exporter, err error) {
|
||||||
MonitoredResource: mr,
|
MonitoredResource: mr,
|
||||||
DefaultMonitoringLabels: stackdriverLabels(cfg),
|
DefaultMonitoringLabels: stackdriverLabels(cfg),
|
||||||
OnError: func(err error) {
|
OnError: func(err error) {
|
||||||
log.Errorf(context.Background(), "Stackdriver view exporter: %v", err)
|
log.Warningf(context.Background(), "Stackdriver view exporter: %v", err)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@ func (d *debugTraceExporter) ExportSpan(s *trace.SpanData) {
|
||||||
d.err = nil
|
d.err = nil
|
||||||
d.mu.Unlock()
|
d.mu.Unlock()
|
||||||
if err != nil {
|
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))
|
log.Debugf(ctx, "trace exporter SpanData:\n%s", dumpSpanData(s))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче