Function: createBatchExporter()

function createBatchExporter(innerExporter, options?): OTelExporter;

Defined in: tracing/otel.ts:217

Create a batch exporter that buffers spans and exports in batches

Parameters

Parameter Type Description
innerExporter OTelExporter The actual exporter to use
options { flushIntervalMs?: number; maxBatchSize?: number; } Batch options
options.flushIntervalMs? number -
options.maxBatchSize? number -

Returns

OTelExporter

OTelExporter instance

Example

const otelExporter = await createOTelExporter();
const batchExporter = createBatchExporter(otelExporter, {
  maxBatchSize: 100,
  flushIntervalMs: 5000,
});