opentelemetry-rust
opentelemetry-rust copied to clipboard
opentelemetry_otlp: Allow simple configuration of `BatchConfig` for install_batch
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.
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.
opentelemetry-jaeger::CollectorPipeline already has this function with_batch_processor_config to config install_batch, maybe I can add a implementation to opentelemetry_otlp.