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

Play 2.4 application.conf does not override kamon reference.conf values. #5

Open
ozgunatacan opened this issue Apr 13, 2016 · 1 comment

Comments

@ozgunatacan
Copy link

Play 2.4, kamon 0.6.0, aspectj-play-runner 0.1.3

When I start play application using aspectj-runner:play-run somehow the changes in appplication.conf file for kamon are disregarded.

It is fine if I start the app with sbt:run

@marklieberman
Copy link

marklieberman commented Jul 8, 2016

I am having a similar issue.

When running with aspectj-runner, some Kamon modules do not seem to get config from application.conf unless I manually specify the config file on the command line like so: activator aspectj-runner:run -Dconfig.file=conf/application.conf.

I'm doing the following in my application.conf

kamon {
  internal-config {
    akka {
      loggers = [ "akka.event.slf4j.Slf4jLogger" ]
      loglevel = "INFO"
    }
  }
}

When I run like so:

activator aspectj-runner:run
-->
...snip...
[info] Kamon at [Play] - Initializing Kamon...
[info] Kamon at [Play] - Trying to load kamon-autoweave...
[INFO] [07/08/2016 11:23:28.682] [ForkJoinPool-1-worker-1] [StatsDExtension(akka://kamon)] Starting the Kamon(StatsD) extension
[INFO] [07/08/2016 11:23:28.807] [ForkJoinPool-1-worker-1] [SystemMetricsExtension(akka://kamon)] Starting the Kamon(SystemMetrics) extension
[info] k.s.SigarProvisioner at [Play] - Sigar library provisioned: ...
...snip...

Why arent kamon-system-metrics and kamon-statsd using my configured logging interface? It not just logging - kamon-statsd didn't get my statsd hostname either, so no metrics are reported.

However, when I run like so:

activator aspectj-runner:run -Dconfig.file=conf/application.conf
-->
...snip...
[info] Kamon at [Play] - Initializing Kamon...
[info] Kamon at [Play] - Trying to load kamon-autoweave...
[info] k.s.StatsDExtension at [StatsDExtension(akka://kamon)] - Starting the Kamon(StatsD) extension
[info] k.s.SystemMetricsExtension at [SystemMetricsExtension(akka://kamon)] - Starting the Kamon(SystemMetrics) extension
[info] k.s.SigarProvisioner at [Play] - Sigar library provisioned: ...
...snip...

Look, they are using my logging interface now.

Adding the option in build.sbt appears to work too:

// Select the configuration file in DEV mode.
javaOptions += "-Dconfig.file=conf/application.conf"

I am using: kamon-play-24, kamon-akka, kamon-system-metrics, kamon-statsd.

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

No branches or pull requests

3 participants