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

Option to disable metrics collection in config #585

Open
Karasiq opened this issue May 15, 2019 · 3 comments
Open

Option to disable metrics collection in config #585

Karasiq opened this issue May 15, 2019 · 3 comments

Comments

@Karasiq
Copy link

Karasiq commented May 15, 2019

Hello,
please add option to disable Kamon metrics collection in config, e.g. kamon.enabled = false, to avoid additional work-arounds to disable metrics in the application.

@ivantopo
Copy link
Contributor

Hey @Karasiq, may I ask in which cases do you need to disable metric collection? and whether you actually need to disable metrics collection or just reporting those metrics?

@Karasiq
Copy link
Author

Karasiq commented May 15, 2019

In our application we use our own setting to disable metrics reporting: https://github.com/wavesplatform/Waves/blob/d746b38e6c8e62a9bb0bac1b9c791ae72c2773d6/node/src/main/scala/com/wavesplatform/Application.scala#L407-L412

But this only disables reports to InfluxDB, and Kamon still uses memory and disk space. We want to avoid that without rewriting all metric-related calls.

@ornicar
Copy link
Contributor

ornicar commented Oct 23, 2019

When working on the application on a local development machine, I don't want Kamon to report metrics and try to connect to an InfluxDB instance that doesn't exist on that machine.

[edit] Thanks for the workaround Karasiq, I'll use that in the meantime.

[edit] In my case, this was sufficient:

  if (config.get[String]("kamon.influxdb.hostname").nonEmpty) {
    println("Kamon is enabled")
    kamon.Kamon.loadModules()
  }

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

3 participants