open-telemetry / opentelemetry-collector-contrib

Contrib repository for the OpenTelemetry Collector
https://opentelemetry.io
Apache License 2.0
2.89k stars 2.27k forks source link

New component: Concurrent Batch Processor #33422

Open moh-osman3 opened 3 months ago

moh-osman3 commented 3 months ago

The purpose and use-cases of the new component

This component is an experimental processor, forked from the core OpenTelemetry Collector batchprocessor component.

This component enhances the batchprocessor with

  1. Synchronous pipeline support: this component blocks each producer until the request returns with success or an error status code.
  2. Maximum in-flight-bytes setting. This component measures the in-memory size of each request it admits to the pipeline and otherwise stalls requests until they timeout.
  3. Unlimited concurrency: this component will start as many goroutines as needed to send batches through the pipeline.

This processor should be used to

Example configuration for the component

    processors:
      concurrentbatch:
        send_batch_max_size: 1500
        send_batch_size: 1000
        timeout: 1s
        max_in_flight_size_mib: 128

Telemetry data types supported

Traces, metrics, and logs supported.

Is this a vendor-specific component?

Code Owner(s)

@jmacd, @moh-osman3

Sponsor (optional)

No response

Additional context

This component currently lives in the otel-arrow repository https://github.com/open-telemetry/otel-arrow/tree/main/collector/processor/concurrentbatchprocessor. Migrating this component to contrib might be helpful for other collector users who are experiencing issues with exporterhelper's lack of backpressure, error propagation, and high memory usage. This has been used in production for the past 6 months now and used in our arrow collector pipelines with the Otel Arrow receiver and exporter. This has helped us improve issues faced when using exporterhelper with queueing enabled.

github-actions[bot] commented 1 month ago

This issue has been inactive for 60 days. It will be closed in 60 days if there is no activity. To ping code owners by adding a component label, see Adding Labels via Comments, or if you are unsure of which component this issue relates to, please ping @open-telemetry/collector-contrib-triagers. If this issue is still relevant, please ping the code owners or leave a comment explaining why it is still relevant. Otherwise, please close it.