Skip to content

Commit

Permalink
chore: Remove kamon (DEV-3261) (#3030)
Browse files Browse the repository at this point in the history
  • Loading branch information
siers committed Feb 8, 2024
1 parent cafbc16 commit f27f118
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 78 deletions.
6 changes: 1 addition & 5 deletions project/Dependencies.scala
Expand Up @@ -68,9 +68,7 @@ object Dependencies {
val slf4jApi = "org.slf4j" % "slf4j-api" % "2.0.11" // the logging interface

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

// input validation
val commonsValidator =
Expand Down Expand Up @@ -164,8 +162,6 @@ object Dependencies {
jakartaJSON,
jenaText,
jwtSprayJson,
kamonCore,
kamonScalaFuture,
rdf4jShacl,
saxonHE,
scalaGraph,
Expand Down

This file was deleted.

Expand Up @@ -17,7 +17,6 @@ import org.knora.webapi.*
import org.knora.webapi.config.AppConfig
import org.knora.webapi.core.MessageHandler
import org.knora.webapi.core.MessageRelay
import org.knora.webapi.instrumentation.InstrumentationSupport
import org.knora.webapi.messages.IriConversions.*
import org.knora.webapi.messages.*
import org.knora.webapi.messages.admin.responder.permissionsmessages.*
Expand Down Expand Up @@ -186,8 +185,7 @@ final case class ProjectsResponderADMLive(
implicit private val stringFormatter: StringFormatter
) extends ProjectsResponderADM
with MessageHandler
with LazyLogging
with InstrumentationSupport {
with LazyLogging {

// Global lock IRI used for project creation and update
private val PROJECTS_GLOBAL_LOCK_IRI = "http://rdfh.ch/projects"
Expand Down
Expand Up @@ -5,20 +5,22 @@

package org.knora.webapi.routing

import com.typesafe.scalalogging.Logger
import org.apache.pekko
import org.apache.pekko.http.scaladsl.model.HttpResponse
import org.apache.pekko.http.scaladsl.model.StatusCodes.MethodNotAllowed
import org.apache.pekko.http.scaladsl.model.StatusCodes.NotFound

import org.knora.webapi.instrumentation.InstrumentationSupport
import org.slf4j.LoggerFactory

import pekko.http.scaladsl.server.Directive0
import pekko.http.scaladsl.server.Directives.*

/**
* Pekko HTTP directives which can be wrapped around a [[pekko.http.scaladsl.server.Route]]].
*/
trait AroundDirectives extends InstrumentationSupport {
trait AroundDirectives {
protected lazy val metricsLogger: Logger =
Logger(LoggerFactory.getLogger(s"M-this.getClass.getSimpleName"))

/**
* When wrapped around a [[pekko.http.scaladsl.server.Route]], logs the time it took for the route to run.
Expand Down

0 comments on commit f27f118

Please sign in to comment.