Skip to content

Commit

Permalink
Upgrade zio-opentelemetry to 3.0.0 (#2445)
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostdogpr authored Oct 21, 2024
1 parent bf4fb99 commit ad30eda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ val zioConfigVersion = "4.0.2"
val zqueryVersion = "0.7.6"
val zioJsonVersion = "0.7.3"
val zioHttpVersion = "3.0.1"
val zioOpenTelemetryVersion = "3.0.0-RC21"
val zioOpenTelemetryVersion = "3.0.0"

Global / onChangedBuildSource := ReloadOnSourceChanges

Expand Down
5 changes: 3 additions & 2 deletions tracing/src/test/scala/caliban/tracing/MockTracer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import io.opentelemetry.sdk.testing.exporter.InMemorySpanExporter
import io.opentelemetry.sdk.trace.SdkTracerProvider
import io.opentelemetry.sdk.trace.`export`.SimpleSpanProcessor
import zio._
import zio.telemetry.opentelemetry.OpenTelemetry
import zio.telemetry.opentelemetry.context.ContextStorage
import zio.telemetry.opentelemetry.tracing.Tracing

Expand All @@ -22,10 +23,10 @@ object TracingMock {
val inMemoryTracerLayer: ULayer[InMemorySpanExporter with Tracer with ContextStorage] =
ZLayer.fromZIOEnvironment(inMemoryTracer.map { case (inMemorySpanExporter, tracer) =>
ZEnvironment(inMemorySpanExporter).add(tracer)
}) ++ ContextStorage.fiberRef
}) ++ OpenTelemetry.contextZIO

val layer: ULayer[Tracing with InMemorySpanExporter with Tracer] =
inMemoryTracerLayer >>> (Tracing.live ++ inMemoryTracerLayer)
inMemoryTracerLayer >>> (Tracing.live() ++ inMemoryTracerLayer)

def getFinishedSpans =
ZIO
Expand Down

0 comments on commit ad30eda

Please sign in to comment.