Skip to content

Commit

Permalink
Merge pull request #29 from commercetools/bump-otel4s
Browse files Browse the repository at this point in the history
Bump otel4s to latest
  • Loading branch information
satabin authored Sep 17, 2024
2 parents b9012fc + 3c3d996 commit ae7364b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ lazy val otel4s = crossProject(JVMPlatform)
name := "fs2-queues-otel4s",
description := "Support for metrics and tracing using otel4s",
libraryDependencies ++= List(
"org.typelevel" %%% "otel4s-core" % "0.7.0"
"org.typelevel" %%% "otel4s-core" % "0.9.0"
)
)
.dependsOn(core % "compile->compile;test->test")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,12 @@ import scala.collection.immutable

class NaiveCounter(val records: Ref[IO, Chain[(Long, List[Attribute[_]])]]) extends Counter[IO, Long] {

override val backend: Counter.Backend[IO, Long] = new Counter.LongBackend[IO] {

override val meta: InstrumentMeta[IO] = InstrumentMeta.enabled

override val backend: Counter.Backend[IO, Long] = new Counter.Backend[IO, Long] {
override def meta: InstrumentMeta[IO] = InstrumentMeta.enabled
override def add(value: Long, attributes: immutable.Iterable[Attribute[_]]): IO[Unit] =
records.update(_.append((value, attributes.toList)))

override def inc(attributes: immutable.Iterable[Attribute[_]]): IO[Unit] = add(1, attributes)
}

}

object NaiveCounter {
Expand Down

0 comments on commit ae7364b

Please sign in to comment.