From f5ccae4d5df9b40d41db4499909707b36b12992d Mon Sep 17 00:00:00 2001 From: Vamshi Maskuri <117595548+varshith257@users.noreply.github.com> Date: Wed, 11 Dec 2024 15:43:52 +0530 Subject: [PATCH] Update Metric.scala --- .../core/src/main/scala/sttp/tapir/server/metrics/Metric.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/core/src/main/scala/sttp/tapir/server/metrics/Metric.scala b/server/core/src/main/scala/sttp/tapir/server/metrics/Metric.scala index 8c90e9fb3b..f1535b1c43 100644 --- a/server/core/src/main/scala/sttp/tapir/server/metrics/Metric.scala +++ b/server/core/src/main/scala/sttp/tapir/server/metrics/Metric.scala @@ -29,7 +29,7 @@ case class EndpointMetric[F[_]]( case class ResponsePhaseLabel(name: String, headersValue: String, bodyValue: String) case class MetricLabels( forRequest: List[(String, (AnyEndpoint, ServerRequest) => String)], - forResponse: List[(String, Either[Throwable, ServerResponse[_]] => String)], + forResponse: List[(String, Either[Throwable, ServerResponse[_]] => Option[String])], forResponsePhase: ResponsePhaseLabel = ResponsePhaseLabel("phase", "headers", "body") ) { def namesForRequest: List[String] = forRequest.map { case (name, _) => name }