mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-03-05 05:00:20 +00:00
Add kamon.io metrics reporting (#395)
* Add kamon.io metrics reporting * Line length + whitespace
This commit is contained in:
parent
4e5bb3a252
commit
eabb952683
6 changed files with 36 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
)
|
||||
)
|
||||
|
||||
|
|
|
|||
4
pslogin/src/main/scala/application.conf
Normal file
4
pslogin/src/main/scala/application.conf
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
kamon {
|
||||
environment.service = "PSForever"
|
||||
apm.api-key = ""
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue