Needed to pass a time.Duration in for WithExportTimeout and WithBatchTimeout

This commit is contained in:
jonny rhea 2026-01-14 17:27:00 -06:00 committed by Felix Lange
parent a1caed3938
commit fa4e707927

View file

@ -81,9 +81,9 @@ func Setup(ctx context.Context, endpoint string, sampleRatio float64) (*Telemetr
// The maximum number of spans to export in a single batch // The maximum number of spans to export in a single batch
sdktrace.WithMaxExportBatchSize(sdktrace.DefaultMaxExportBatchSize), sdktrace.WithMaxExportBatchSize(sdktrace.DefaultMaxExportBatchSize),
// How long an export operation can take before timing out // How long an export operation can take before timing out
sdktrace.WithExportTimeout(sdktrace.DefaultExportTimeout), sdktrace.WithExportTimeout(time.Duration(sdktrace.DefaultExportTimeout) * time.Millisecond),
// How often to export, even if the batch isn't full // How often to export, even if the batch isn't full
sdktrace.WithBatchTimeout(5 * time.Second), // SDK default is 5s sdktrace.WithBatchTimeout(time.Duration(sdktrace.DefaultScheduleDelay) * time.Millisecond),
} }
// Define resource with service and client information // Define resource with service and client information