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

No way to fully shut down Kamon 1.0 #502

Closed
ruippeixotog opened this issue Jan 22, 2018 · 2 comments
Closed

No way to fully shut down Kamon 1.0 #502

ruippeixotog opened this issue Jan 22, 2018 · 2 comments

Comments

@ruippeixotog
Copy link

There should be a way to completely shut down Kamon programatically, making the JVM terminate normally without recurring to explicit System.exit calls. With Kamon 1.0, unfortunately, I can't seem to do this:

object Main extends App {
  Kamon.loadReportersFromConfig() // this may even be an empty list of reporters
  Kamon.stopAllReporters()
  // the JVM should terminate after this
}

It seems that due to the registryExecutionContext inside ReporterRegistry, the JVM keeps active threads that prevent the JVM shutdown. We should be able to shut down the registryExecutionContext either by a Kamon.stop() method like before or by stopAllReporters().

@ivantopo
Copy link
Contributor

hello @ruippeixotog, thanks for reporting this! We will take a look it asap :)

@n1ko-w1ll
Copy link

oh yes, that's a show stopper for us. Since adding the Kamon dependency, there are more and more situations in which our application is not able to shutdown correctly. This is even more a problem because this is our way to reload the application if the configuration in Consul changes... application exits and is restarted by docker. Now the application tries to stop but keeps hanging in an undefined state.

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

No branches or pull requests

4 participants