Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Autoconfigure should cleanup if configuration fails #5090

Closed
jack-berg opened this issue Jan 5, 2023 · 0 comments · Fixed by #5117
Closed

Autoconfigure should cleanup if configuration fails #5090

jack-berg opened this issue Jan 5, 2023 · 0 comments · Fixed by #5117
Labels
Feature Request Suggest an idea for this project

Comments

@jack-berg
Copy link
Member

Autoconfigure can fail and throw ConfigurationException after having setup various components. For example:

  • SdkMeterProvider can be initialized followed by a failure to initialize SdkTracerProvider (code)
  • An exporter can be initialized followed by a failure initializing the processor (or periodic metric reader) that it is associated with (code)

In cases like this, resources like thread pools are started and never closed.

Autoconfigure should have a mechanism to cleanup its partially configured Closeable components when exceptions occur which short circuit full configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Suggest an idea for this project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant