opentelemetry-collector/processor/batchprocessor
Bogdan Drutu 004dd4da35
Move everything from processorhelper to component. (#4889)
Updates https://github.com/open-telemetry/opentelemetry-collector/issues/4681

Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
2022-02-22 14:23:40 -08:00
..
testdata Add new clean nop components and use them in config tests (#2655) 2021-03-10 10:45:18 -08:00
README.md Make the batch processor limit data points rather than metrics. (#3141) 2021-06-02 10:52:24 -04:00
batch_processor.go Adds vanity import check (#4180) 2021-10-12 13:47:36 -07:00
batch_processor_test.go Remove usage of LogRecord.Name field (#4804) 2022-02-08 08:56:16 -08:00
config.go Adds vanity import check (#4180) 2021-10-12 13:47:36 -07:00
config_test.go Otel-4633 Replace path.Join method with filepath.Join method (#4638) 2022-01-05 11:08:42 -08:00
factory.go Move everything from processorhelper to component. (#4889) 2022-02-22 14:23:40 -08:00
factory_test.go Move ValidateConfig from configcheck to configtest (#3956) 2021-09-16 03:44:59 -07:00
metrics.go Adds vanity import check (#4180) 2021-10-12 13:47:36 -07:00
metrics_test.go Remove level from all the MetricViews calls (#2149) 2020-11-16 23:11:27 -05:00
splitlogs.go Update to OTLP proto 0.12.0 (#4724) 2022-01-26 10:35:15 -08:00
splitlogs_test.go Remove usage of LogRecord.Name field (#4804) 2022-02-08 08:56:16 -08:00
splitmetrics.go Update batch processor to handle ExponentialHistogram (#4405) 2021-11-12 09:25:31 -08:00
splitmetrics_test.go Update batch processor to handle ExponentialHistogram (#4405) 2021-11-12 09:25:31 -08:00
splittraces.go Fix small nits in the batchprocessor split logic (#4340) 2021-11-02 12:09:47 -07:00
splittraces_test.go Small cleanup for batchprocessor split logic (#4284) 2021-10-28 08:49:51 -07:00

README.md

Batch Processor

Supported pipeline types: metric, traces, logs

The batch processor accepts spans, metrics, or logs and places them into batches. Batching helps better compress the data and reduce the number of outgoing connections required to transmit the data. This processor supports both size and time based batching.

It is highly recommended to configure the batch processor on every collector. The batch processor should be defined in the pipeline after the memory_limiter as well as any sampling processors. This is because batching should happen after any data drops such as sampling.

Please refer to config.go for the config spec.

The following configuration options can be modified:

  • send_batch_size (default = 8192): Number of spans, metric data points, or log records after which a batch will be sent regardless of the timeout.
  • timeout (default = 200ms): Time duration after which a batch will be sent regardless of size.
  • send_batch_max_size (default = 0): The upper limit of the batch size. 0 means no upper limit of the batch size. This property ensures that larger batches are split into smaller units. It must be greater or equal to send_batch_size.

Examples:

processors:
  batch:
  batch/2:
    send_batch_size: 10000
    timeout: 10s

Refer to config.yaml for detailed examples on using the processor.