You've already forked opentelemetry-go
mirror of
https://github.com/open-telemetry/opentelemetry-go.git
synced 2025-11-29 23:07:45 +02:00
Creates a internal facing logging interface
This is a simple loggin interface to be used interally for the sdk. Included is an exmaple in `namedtracer` run: ``` cd example/namedtracer go run . >/dev/null ```
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"time"
|
||||
|
||||
"go.opentelemetry.io/otel"
|
||||
"go.opentelemetry.io/otel/internal/debug"
|
||||
"go.opentelemetry.io/otel/trace"
|
||||
)
|
||||
|
||||
@@ -224,6 +225,7 @@ func WithBlocking() BatchSpanProcessorOption {
|
||||
|
||||
// exportSpans is a subroutine of processing and draining the queue.
|
||||
func (bsp *batchSpanProcessor) exportSpans(ctx context.Context) error {
|
||||
|
||||
bsp.timer.Reset(bsp.o.BatchTimeout)
|
||||
|
||||
bsp.batchMutex.Lock()
|
||||
@@ -236,6 +238,7 @@ func (bsp *batchSpanProcessor) exportSpans(ctx context.Context) error {
|
||||
}
|
||||
|
||||
if l := len(bsp.batch); l > 0 {
|
||||
debug.Log.V(5).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.
|
||||
|
||||
Reference in New Issue
Block a user