fs2-queues

Otel4s

The otel4s provides an integration with the otel4s library implementing the semantic conventions for messaging systems.

libraryDependencies += "com.commercetools" %% "fs2-queues-otel4s" % "0.8.0"

It allows you to wrap an existing QueueClient into a MeasuringQueueClient, which adds tracing and metrics on every call to the underlying queue system.

You can opt-in for either one of them or both.

import cats.effect.IO

import com.commercetools.queue.QueueClient
import com.commercetools.queue.otel4s._

import org.typelevel.otel4s.metrics.Meter
import org.typelevel.otel4s.trace.Tracer

val rawClient: QueueClient[IO] = ???

implicit val meter: Meter[IO] = ???
implicit val tracer: Tracer[IO] = ???

val withMetrics = rawClient.withMetrics

val withTracing = rawClient.withTraces

val withBoth = rawClient.withMetricsAndTraces