diff --git a/app/com/github/stijndehaes/playprometheusfilters/filters/StatusAndRouteLatencyFilter.scala b/app/com/github/stijndehaes/playprometheusfilters/filters/StatusAndRouteLatencyFilter.scala index fc227e1..8aec5c6 100644 --- a/app/com/github/stijndehaes/playprometheusfilters/filters/StatusAndRouteLatencyFilter.scala +++ b/app/com/github/stijndehaes/playprometheusfilters/filters/StatusAndRouteLatencyFilter.scala @@ -24,7 +24,7 @@ class StatusAndRouteLatencyFilter @Inject()(registry: CollectorRegistry) (implic nextFilter(requestHeader).map { result => val endTime = System.nanoTime - val requestTime = endTime - startTime / Collector.NANOSECONDS_PER_SECOND + val requestTime = (endTime - startTime) / Collector.NANOSECONDS_PER_SECOND val routeLabel = requestHeader.attrs .get(Router.Attrs.HandlerDef) .map(_.method) @@ -39,4 +39,4 @@ class StatusAndRouteLatencyFilter @Inject()(registry: CollectorRegistry) (implic object StatusAndRouteLatencyFilter { val unmatchedRoute: String = "unmatchedRoute" -} \ No newline at end of file +}