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

chore: update dependencies #2173

Merged
merged 8 commits into from Aug 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions .scala-steward.conf
@@ -0,0 +1,8 @@
# ignore the following dependencies:

# jodd -> hard to update and only used in DateUtilV1
# swagger-akka-http -> should be removed in separate PR
updates.ignore = [
{ groupId = "org.jodd", artifactId="jodd", version = "3.2.7" },
{ groupId = "com.github.swagger-akka-http", artifactId="swagger-akka-http", version = "1.6.0" }
]
2 changes: 1 addition & 1 deletion .scalafmt.conf
@@ -1,4 +1,4 @@
version = "3.5.8"
version = "3.5.9"
runner.dialect = scala213
maxColumn = 120
align.preset = most
Expand Down
18 changes: 10 additions & 8 deletions project/Dependencies.scala
Expand Up @@ -22,10 +22,10 @@ object Dependencies {
val scalaVersion = "2.13.8"
val ZioVersion = "2.0.0"
val ZioHttpVersion = "2.0.0-RC4"
val ZioJsonVersion = "0.3.0-RC10"
val ZioJsonVersion = "0.3.0-RC11"
val ZioConfigVersion = "3.0.2"
val ZioSchemaVersion = "0.2.0"
val ZioLoggingVersion = "2.0.1"
val ZioLoggingVersion = "2.1.0"
val ZioZmxVersion = "2.0.0-RC4"
val ZioPreludeVersion = "1.0.0-RC15"

Expand All @@ -40,8 +40,8 @@ object Dependencies {
val zioConfig = "dev.zio" %% "zio-config" % ZioConfigVersion
val zioConfigMagnolia = "dev.zio" %% "zio-config-magnolia" % ZioConfigVersion
val zioConfigTypesafe = "dev.zio" %% "zio-config-typesafe" % ZioConfigVersion
val zioTest = "dev.zio" %% "zio-test" % "2.0.0"
val zioTestSbt = "dev.zio" %% "zio-test-sbt" % "2.0.0"
val zioTest = "dev.zio" %% "zio-test" % "2.0.1"
val zioTestSbt = "dev.zio" %% "zio-test-sbt" % "2.0.1"

// akka
val akkaActor = "com.typesafe.akka" %% "akka-actor" % akkaVersion // Scala 3 compatible
Expand All @@ -57,12 +57,12 @@ object Dependencies {
// logging
val logbackClassic = "ch.qos.logback" % "logback-classic" % "1.2.11"
val scalaLogging = "com.typesafe.scala-logging" %% "scala-logging" % "3.9.5" // Scala 3 compatible
val slf4j = "org.slf4j" % "slf4j-simple" % "1.7.36"
val slf4j = "org.slf4j" % "slf4j-simple" % "2.0.0"

// Metrics
val aspectjweaver = "org.aspectj" % "aspectjweaver" % "1.9.9.1"
val kamonCore = "io.kamon" %% "kamon-core" % "2.5.6" // Scala 3 compatible
val kamonScalaFuture = "io.kamon" %% "kamon-scala-future" % "2.1.21" // Scala 3 incompatible
val kamonCore = "io.kamon" %% "kamon-core" % "2.5.6" // Scala 3 compatible
val kamonScalaFuture = "io.kamon" %% "kamon-scala-future" % "2.5.6" // Scala 3 incompatible

// input validation
val commonsValidator =
Expand All @@ -72,7 +72,7 @@ object Dependencies {
val jwtSprayJson = "com.github.jwt-scala" %% "jwt-spray-json" % "9.0.2"
// jwtSprayJson -> 9.0.2 is the latest version that's compatible with spray-json; if it wasn't for spray, this would be Scala 3 compatible
val springSecurityCore =
"org.springframework.security" % "spring-security-core" % "5.7.2" exclude ("commons-logging", "commons-logging") exclude ("org.springframework", "spring-aop")
"org.springframework.security" % "spring-security-core" % "5.7.3" exclude ("commons-logging", "commons-logging") exclude ("org.springframework", "spring-aop")
val bouncyCastle = "org.bouncycastle" % "bcprov-jdk15to18" % "1.71"

// caching
Expand All @@ -96,6 +96,7 @@ object Dependencies {
val swaggerAkkaHttp = "com.github.swagger-akka-http" %% "swagger-akka-http" % "1.6.0" // Scala 3 incompatible
val titaniumJSONLD = "com.apicatalog" % "titanium-json-ld" % "1.3.1"
val xmlunitCore = "org.xmlunit" % "xmlunit-core" % "2.9.0"
val jacksonDatabind = "com.fasterxml.jackson.core" % "jackson-databind" % "2.13.3"

// test
val akkaHttpTestkit = "com.typesafe.akka" %% "akka-http-testkit" % akkaHttpVersion // Scala 3 incompatible
Expand Down Expand Up @@ -127,6 +128,7 @@ object Dependencies {
gatlingTestFramework % Test,
gwtServlet,
icu4j,
jacksonDatabind,
jakartaJSON,
jedis,
jenaText,
Expand Down
Expand Up @@ -6,12 +6,12 @@
package org.knora.webapi.instrumentation

import com.typesafe.scalalogging.Logger
import kamon.instrumentation.futures.scala.ScalaFutureInstrumentation.trace
import org.slf4j.LoggerFactory

import scala.concurrent.ExecutionContext
import scala.concurrent.Future
import scala.util.Success
import kamon.Kamon

/**
* A set of methods used for measuring stuff that is happening.
Expand Down Expand Up @@ -47,10 +47,11 @@ trait InstrumentationSupport {
* have at least something.
*/
val start = System.currentTimeMillis()
trace(name)(future.andThen { case Success(_) =>
metricsLogger.info(s"$name: {} ms", System.currentTimeMillis() - start)
})
// .andThen(case completed => logger.info(s"$name: " + (System.currentTimeMillis() - start) + "ms"))
Kamon.span(name) {
future.andThen { case Success(_) =>
metricsLogger.info(s"$name: {} ms", System.currentTimeMillis() - start)
}
}
}

// def counter(name: String) = Kamon.metrics.counter(name)
Expand Down