opentelemetry-rust icon indicating copy to clipboard operation
opentelemetry-rust copied to clipboard

opentelemetry_otlp: Allow simple configuration of `BatchConfig` for install_batch

Open MidasLamb opened this issue 3 years ago • 2 comments

Currently, you can quite easily install a batch processor by using install_batch, however, if you want to have any sort of restrictions/needs to change how the batching runs, you can't just simply pass the BatchConfig that is used under the hood.

A user has provided a solution on stack overflow: https://stackoverflow.com/questions/74264248/opentelemetry-rust-increasing-the-channel-size-of-batched-otlptracepipeline.

I think it would be nice for users to easily configure the batch installation as with the implementation above, by simply having a BatchConfig object to pass along.

MidasLamb avatar Nov 09 '22 19:11 MidasLamb

I could be wrong but my understanding is that you can (and should) use environment variables to configure the batch configuration. At least that's what the spec implies and it's what's implemented in the Default implementation for BatchConfig.

wperron avatar Dec 19 '22 13:12 wperron

opentelemetry-jaeger::CollectorPipeline already has this function with_batch_processor_config to config install_batch, maybe I can add a implementation to opentelemetry_otlp.

zengxilong avatar Feb 28 '23 09:02 zengxilong