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

Have a setting to enable/disable instrumentation #105

Open
ivantopo opened this issue Mar 2, 2020 · 3 comments
Open

Have a setting to enable/disable instrumentation #105

ivantopo opened this issue Mar 2, 2020 · 3 comments
Assignees

Comments

@ivantopo
Copy link
Contributor

ivantopo commented Mar 2, 2020

One thing that keeps coming up again and again is the need to enable/disable instrumentation via configuration alone, without fiddling with SBT plugins or selectively calling Kamon.init(). Something as simple as having a kanela.enabled setting should be enough.

@JR-Utily
Copy link

If the Kamon.init() is guarded by a variable from application.conf, would this work ?
Or would the call to read application.conf be already too much regarding Kamon.init() to be the real first instruction of the application ?

@JR-Utily
Copy link

Something like:

object Start extends App {
  val config = ConfigFactory.load()
  if (config.getBoolean("kanela.enabled") {  Kamon.init() }

  // Your application code goes here
}

@ivantopo
Copy link
Contributor Author

This is now being solved with these two PRs:

@ivantopo ivantopo self-assigned this Jan 11, 2023
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

2 participants