Skip to content

Add ability to add timeout duration to shutdown #2574

@cijothomas

Description

@cijothomas

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.

Metadata

Metadata

Labels

A-commonArea:common issues that not related to specific pillarhelp wantedGood for taking. Extra help will be provided by maintainers/approvers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions