Skip to content

OTLP gRPC example sets unreasonably low batch interval #1564

@Aneurysm9

Description

@Aneurysm9

The OTLP gRPC examples set a batch timeout of 5ns. This should probably be 5s.

	tp := sdktrace.NewTracerProvider(
		sdktrace.WithConfig(sdktrace.Config{DefaultSampler: sdktrace.AlwaysSample()}),
		sdktrace.WithBatcher(
			exp,
			// add following two options to ensure flush
			sdktrace.WithBatchTimeout(5),
			sdktrace.WithMaxExportBatchSize(10),
		),
	)

Please update all examples to use sdktrace.WithBatchTimeout(5 * time.Second).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions