From 5f0cc71f2a7e2248debfa98ee77dd264042f02e4 Mon Sep 17 00:00:00 2001 From: Raitis Veinbahs Date: Thu, 4 Jul 2024 12:41:59 +0200 Subject: [PATCH] fix: Fix query tracking tags (== is faulty), set previous bucket sizes (DEV-3776) --- .../store/triplestore/impl/TriplestoreServiceLive.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/webapi/src/main/scala/org/knora/webapi/store/triplestore/impl/TriplestoreServiceLive.scala b/webapi/src/main/scala/org/knora/webapi/store/triplestore/impl/TriplestoreServiceLive.scala index 91e170e812..0215a2c357 100644 --- a/webapi/src/main/scala/org/knora/webapi/store/triplestore/impl/TriplestoreServiceLive.scala +++ b/webapi/src/main/scala/org/knora/webapi/store/triplestore/impl/TriplestoreServiceLive.scala @@ -75,8 +75,8 @@ case class TriplestoreServiceLive( Metric.timer( "fuseki_request_duration", ChronoUnit.MILLIS, - // 7 buckets for upper bounds: 2 ms, 4 ms, 8 ms, 16 ms, 32 ms, 64 ms, inf - Chunk.iterate(2.0, 6)(_ * 2), + // 7 buckets for upper bounds: 10 ms, 100 ms, 1s, 10s, 100s, 1000s + Chunk.iterate(10.0, 6)(_ * 10), ) private def processError(sparql: String, response: String): IO[TriplestoreException, Nothing] = @@ -403,8 +403,8 @@ case class TriplestoreServiceLive( for { result <- reqTask @@ requestTimer .tagged("type", query.getClass.getSimpleName) - .tagged("isGravsearch", s"${query == SparqlTimeout.Gravsearch}") - .tagged("isMaintenance", s"${query == SparqlTimeout.Maintenance}") + .tagged("isGravsearch", s"${query.timeout == SparqlTimeout.Gravsearch}") + .tagged("isMaintenance", s"${query.timeout == SparqlTimeout.Maintenance}") .trackDuration _ <- { val endTime = java.lang.System.nanoTime()