1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2025-06-25 00:16:49 +02:00

Fixes race, moved into global

This commit is contained in:
Aaron Clawson
2021-11-24 20:06:39 +00:00
committed by GitHub
parent 8901b22c4f
commit d467ac529a
5 changed files with 63 additions and 14 deletions

View File

@ -22,7 +22,7 @@ import (
"time"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/internal/debug"
"go.opentelemetry.io/otel/internal/global"
"go.opentelemetry.io/otel/trace"
)
@ -238,7 +238,7 @@ func (bsp *batchSpanProcessor) exportSpans(ctx context.Context) error {
}
if l := len(bsp.batch); l > 0 {
debug.Info("exporting spans", "count", len(bsp.batch))
global.Info("exporting spans", "count", len(bsp.batch))
err := bsp.e.ExportSpans(ctx, bsp.batch)
// A new batch is always created after exporting, even if the batch failed to be exported.