Closed ChristopherDavenport closed 4 months ago
https://github.com/typelevel/otel4s/blob/main/core/trace/src/main/scala/org/typelevel/otel4s/trace/SpanFinalizer.scala#L95
The backends can build up strategies, but because the cases are private, and run is private there is no way to expose them to a different backend.
Workaround
package org.typelevel.otel4s.backdoor import cats.Applicative import org.typelevel.otel4s.trace.{Span,SpanFinalizer} object StrategyRunBackend { def run[F[_]: Applicative]( backend: Span.Backend[F], finalizer: SpanFinalizer ) = SpanFinalizer.run(backend, finalizer) }
The new otel4s-sdk-trace module provides a simple way to implement a customized exporter while taking care of the span's lifecycle.
otel4s-sdk-trace
https://github.com/typelevel/otel4s/blob/main/core/trace/src/main/scala/org/typelevel/otel4s/trace/SpanFinalizer.scala#L95
The backends can build up strategies, but because the cases are private, and run is private there is no way to expose them to a different backend.
Workaround