Skip to content

Commit

Permalink
Make testing registry work with exemplars
Browse files Browse the repository at this point in the history
  • Loading branch information
janstenpickle committed Jul 26, 2023
1 parent 97476e9 commit 45ee5e5
Show file tree
Hide file tree
Showing 3 changed files with 201 additions and 45 deletions.
2 changes: 1 addition & 1 deletion core/src/main/scala/prometheus4cats/Counter.scala
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ object Counter {
override def inc(n: A): F[Unit] = Applicative[F].unit
}

sealed abstract class Exemplar[F[_], -A] { self =>
sealed abstract class Exemplar[F[_], -A] extends Metric[A] { self =>
def inc: F[Unit]
def incWithExemplar: F[Unit]
def inc(n: A): F[Unit]
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/scala/prometheus4cats/MetricRegistry.scala
Original file line number Diff line number Diff line change
Expand Up @@ -1166,7 +1166,7 @@ object MetricRegistry {
}
}

def noop[F[_]: Applicative]: WithExemplars[F] = WithExemplars.noop[F]
def noop[F[_]: Applicative]: MetricRegistry[F] = WithExemplars.noop[F]

private[prometheus4cats] def mapK[F[_], G[_]](
self: MetricRegistry[F],
Expand Down
Loading

0 comments on commit 45ee5e5

Please sign in to comment.