diff --git a/CHANGELOG.unreleased.md b/CHANGELOG.unreleased.md index 049bd6986f2..c49bc0afed5 100644 --- a/CHANGELOG.unreleased.md +++ b/CHANGELOG.unreleased.md @@ -49,6 +49,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released - Fixed small styling error with NML drag and drop uploading. [#7641](https://github.com/scalableminds/webknossos/pull/7641) - Fixed a bug where the annotation list would show teams the annotation is shared with multiple times. [#7659](https://github.com/scalableminds/webknossos/pull/7659) - Fixed incorrect menu position that could occur sometimes when clicking the ... button next to a segment. [#7680](https://github.com/scalableminds/webknossos/pull/7680) +- Fixed an error in the Loki integration to support Loki 2.9+. [#7684](https://github.com/scalableminds/webknossos/pull/7684) ### Removed diff --git a/app/models/voxelytics/LokiClient.scala b/app/models/voxelytics/LokiClient.scala index 1ea3a7f3d9c..2d5ff691057 100644 --- a/app/models/voxelytics/LokiClient.scala +++ b/app/models/voxelytics/LokiClient.scala @@ -1,7 +1,5 @@ package models.voxelytics -import org.apache.pekko.actor.ActorSystem -import org.apache.pekko.pattern.after import com.scalableminds.util.mvc.MimeTypes import com.scalableminds.util.time.Instant import com.scalableminds.util.tools.Fox @@ -11,6 +9,8 @@ import com.typesafe.scalalogging.LazyLogging import models.voxelytics.VoxelyticsLogLevel.VoxelyticsLogLevel import net.liftweb.common.Box.tryo import net.liftweb.common.Full +import org.apache.pekko.actor.ActorSystem +import org.apache.pekko.pattern.after import play.api.http.{HeaderNames, Status} import play.api.libs.json.{JsArray, JsObject, JsValue, Json} import utils.{ObjectId, WkConf} @@ -195,7 +195,7 @@ class LokiClient @Inject()(wkConf: WkConf, rpc: RPC, val system: ActorSystem)(im entry => ((entry \ "vx" \ "workflow_hash").as[String], (entry \ "vx" \ "run_name").as[String], - (entry \ "pid").as[Long]) + (entry \ "pid").as[Long].toString) ) .toList).toFox streams <- Fox.serialCombined(logEntryGroups)( @@ -212,7 +212,7 @@ class LokiClient @Inject()(wkConf: WkConf, rpc: RPC, val system: ActorSystem)(im Json.stringify( Json.obj( "level" -> (entry \ "level").as[String], - "pid" -> (entry \ "pid").as[Long], + "pid" -> (entry \ "pid").as[Long].toString, "logger_name" -> (entry \ "vx" \ "logger_name").as[String], "vx_workflow_hash" -> (entry \ "vx" \ "workflow_hash").as[String], "vx_run_name" -> (entry \ "vx" \ "run_name").as[String], @@ -221,13 +221,13 @@ class LokiClient @Inject()(wkConf: WkConf, rpc: RPC, val system: ActorSystem)(im "host" -> (entry \ "host").as[String], "program" -> (entry \ "program").as[String], "func_name" -> (entry \ "vx" \ "func_name").as[String], - "line" -> (entry \ "vx" \ "line").as[Long], + "line" -> (entry \ "vx" \ "line").as[Long].toString, "path" -> (entry \ "vx" \ "path").as[String], "process_name" -> (entry \ "vx" \ "process_name").as[String], "thread_name" -> (entry \ "vx" \ "thread_name").as[String], "vx_version" -> (entry \ "vx" \ "version").as[String], "user" -> (entry \ "vx" \ "user").as[String], - "pgid" -> (entry \ "vx" \ "process_group_id").as[Long] + "pgid" -> (entry \ "vx" \ "process_group_id").as[Long].toString )) ).toFox } yield