Add kamon.io metrics reporting (#395)

* Add kamon.io metrics reporting

* Line length + whitespace
This commit is contained in:
Mazo 2020-04-29 19:59:12 +01:00 committed by GitHub
parent 4e5bb3a252
commit eabb952683
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 1 deletions

View file

@ -28,6 +28,8 @@ import scala.collection.JavaConverters._
import scala.concurrent.Await
import scala.concurrent.duration._
import kamon.Kamon
object PsLogin {
private val logger = org.log4s.getLogger
@ -221,6 +223,15 @@ object PsLogin {
"akka.logging-filter" -> "akka.event.slf4j.Slf4jLoggingFilter"
).asJava
WorldConfig.Get[Boolean]("kamon.Active") match {
case true =>
logger.info("Starting Kamon")
Kamon.init()
case _ => ;
}
logger.info("Starting actor subsystems")
/** Start up the main actor system. This "system" is the home for all actors running on this server */

View file

@ -37,6 +37,9 @@ object WorldConfig extends ConfigParser {
ConfigEntryTime ("NetSim.Delay", 150 milliseconds, Constraints.min(0 seconds), Constraints.max(2 seconds)),
ConfigEntryFloat("NetSim.ReorderChance", 0.005f, Constraints.min(0.0f), Constraints.max(1.0f)),
ConfigEntryTime ("NetSim.ReorderTime", 150 milliseconds, Constraints.min(0 seconds), Constraints.max(2 seconds))
),
ConfigSection("kamon",
ConfigEntryBool("Active", false)
)
)

View file

@ -0,0 +1,4 @@
kamon {
environment.service = "PSForever"
apm.api-key = ""
}