Skip to content

Commit 03da5f2

Browse files
authored
update apiLatencySummary label keys (take out argument) (#49)
1 parent 01ff748 commit 03da5f2

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

acdc-ws/app/services/Metric.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class PrometheusMetric @Inject() (implicit ec: ExecutionContext) extends Metric
7070
private val apiLatency: Summary = Summary
7171
.build()
7272
.name("apiLatencySummary")
73-
.labelNames("path", "arguments", "method")
73+
.labelNames("path", "method")
7474
.help("Profile API response time summary")
7575
.quantile(0.5d, 0.001d)
7676
.quantile(0.95d, 0.001d)

acdc-ws/app/utils/MetricFilter.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,13 @@ class MetricFilter @Inject() (
2121
nextFilter: RequestHeader => Future[Result]
2222
)(requestHeader: RequestHeader): Future[Result] = {
2323
metric.parseRequest(requestHeader) match {
24-
case Some((staticPath, argument)) =>
24+
case Some((staticPath, _)) =>
2525
// simplify path to control prometheus summary metric label cardinality
2626
val simplePath = staticPath match {
2727
case patt(prefix) => prefix
2828
case _ => ""
2929
}
30-
// hardcode argument to "" so as to control the number of time series
31-
val stopTimerCallback = metric.startApiTimer(simplePath, "", requestHeader.method)
30+
val stopTimerCallback = metric.startApiTimer(simplePath, requestHeader.method)
3231

3332
nextFilter(requestHeader)
3433
.transform(

version.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
ThisBuild / version := "0.8.9"
1+
ThisBuild / version := "0.8.10"

0 commit comments

Comments
 (0)