All Providers have shutdown() method now, and it internally uses a hardcoded 5sec timeout to perform shutdown. (usually passed on to reader/processor/exporter).
Opening an issue to let user provide their own timeout.
Option1
fn shutdown(&self, timeout: Option<Duration>)
Option2
fn shutdown(&self)
{
self.shutdown_with_timeout(5secs)
}
fn shutdown_with_timeout(&self, timeout: Duration);
I am inclined to do 2, as it keeps backward compatibility, and we can add this anytime, not necessarily before 1.0. But given https://github.com/open-telemetry/opentelemetry-rust/pull/2573/files and changes in this area, it'd be better to club them in together.
All Providers have shutdown() method now, and it internally uses a hardcoded 5sec timeout to perform shutdown. (usually passed on to reader/processor/exporter).
Opening an issue to let user provide their own timeout.
Option1
Option2
I am inclined to do 2, as it keeps backward compatibility, and we can add this anytime, not necessarily before 1.0. But given https://github.com/open-telemetry/opentelemetry-rust/pull/2573/files and changes in this area, it'd be better to club them in together.