From 9a7589dafa705a7b5a0cce7aa84c01d4e3802010 Mon Sep 17 00:00:00 2001 From: Thanh Le Date: Tue, 26 Nov 2024 14:59:43 +0100 Subject: [PATCH 1/2] Remove kanela agent --- app/src/main/scala/KamonInitiator.scala | 2 +- build.sbt | 3 +-- deploy.sh | 2 +- project/Dependencies.scala | 2 -- project/plugins.sbt | 2 -- 5 files changed, 3 insertions(+), 8 deletions(-) diff --git a/app/src/main/scala/KamonInitiator.scala b/app/src/main/scala/KamonInitiator.scala index e05c6bb..a7bae99 100644 --- a/app/src/main/scala/KamonInitiator.scala +++ b/app/src/main/scala/KamonInitiator.scala @@ -9,4 +9,4 @@ trait KamonInitiator: object KamonInitiator: def apply(): KamonInitiator = new: def init(config: KamonConfig): IO[Unit] = - IO.blocking(kamon.Kamon.init()).whenA(config.enabled) + IO.blocking(kamon.Kamon.initWithoutAttaching()).whenA(config.enabled) diff --git a/build.sbt b/build.sbt index c76e1ef..6614720 100644 --- a/build.sbt +++ b/build.sbt @@ -55,12 +55,11 @@ lazy val app = project http4sClient, catsEffectTestKit ), - javaAgents += kamonAgent, Docker / packageName := "lichess-org/lila-fishnet", Docker / maintainer := "lichess.org", Docker / dockerRepository := Some("ghcr.io") ) - .enablePlugins(JavaAppPackaging, JavaAgent, DockerPlugin) + .enablePlugins(JavaAppPackaging, DockerPlugin) lazy val root = project .in(file(".")) diff --git a/deploy.sh b/deploy.sh index 8515c9d..e81e399 100755 --- a/deploy.sh +++ b/deploy.sh @@ -25,7 +25,7 @@ RSYNC_OPTIONS=" \ --exclude '.git/'" stage="app/target/universal/stage" -include="$stage/bin $stage/kanela-agent $stage/lib" +include="$stage/bin $stage/lib" rsync_command="rsync $RSYNC_OPTIONS $include $REMOTE:$REMOTE_DIR" echo "$rsync_command" $rsync_command diff --git a/project/Dependencies.scala b/project/Dependencies.scala index efa3d1c..deee0ce 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -9,7 +9,6 @@ object Dependencies { val http4s = "0.23.29" val ciris = "3.6.0" val kamon = "2.5.11" - val kamonAgent = "1.0.18" val chess = "16.3.3" val catsEffect = "3.5.6" } @@ -36,7 +35,6 @@ object Dependencies { val kamonCore = "io.kamon" %% "kamon-core" % V.kamon val kamonInflux = "io.kamon" %% "kamon-influxdb" % V.kamon val kamonSystemMetrics = "io.kamon" %% "kamon-system-metrics" % V.kamon - val kamonAgent = "io.kamon" % "kanela-agent" % V.kamonAgent val http4sDsl = http4s("dsl") val http4sServer = http4s("ember-server") diff --git a/project/plugins.sbt b/project/plugins.sbt index f07c449..4f4f935 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,4 @@ addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.10.4") -addSbtPlugin("com.github.sbt" % "sbt-javaagent" % "0.1.8") -addSbtPlugin("io.kamon" % "sbt-kanela-runner" % "2.1.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.13.0") From f08b5737a4ec95a375f86586f3c6fbc72833d9d4 Mon Sep 17 00:00:00 2001 From: Thanh Le Date: Tue, 26 Nov 2024 14:59:59 +0100 Subject: [PATCH 2/2] Bump kamon to 2.7.5 --- project/Dependencies.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/Dependencies.scala b/project/Dependencies.scala index deee0ce..a69535b 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -8,7 +8,7 @@ object Dependencies { val circe = "0.14.10" val http4s = "0.23.29" val ciris = "3.6.0" - val kamon = "2.5.11" + val kamon = "2.7.5" val chess = "16.3.3" val catsEffect = "3.5.6" }