Skip to content

Commit

Permalink
Merge pull request #879 from iRevive/oteljava/context-storage
Browse files Browse the repository at this point in the history
oteljava: move `IOLocalContextStorage` to the `context` package
  • Loading branch information
iRevive authored Jan 1, 2025
2 parents cee2953 + 59bba0f commit 363d595
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion docs/oteljava/tracing-context-propagation.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ import cats.effect.IO
import cats.effect.IOApp
import io.opentelemetry.api.trace.{Span => JSpan}
import org.typelevel.otel4s.context.LocalProvider
import org.typelevel.otel4s.oteljava.IOLocalContextStorage
import org.typelevel.otel4s.oteljava.OtelJava
import org.typelevel.otel4s.oteljava.context.Context
import org.typelevel.otel4s.oteljava.context.IOLocalContextStorage
import org.typelevel.otel4s.trace.Tracer

object Main extends IOApp.Simple {
Expand Down
2 changes: 1 addition & 1 deletion examples/src/main/scala/ContextStorageExample.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import cats.effect.IO
import cats.effect.IOApp
import io.opentelemetry.api.trace.{Span => JSpan}
import org.typelevel.otel4s.context.LocalProvider
import org.typelevel.otel4s.oteljava.IOLocalContextStorage
import org.typelevel.otel4s.oteljava.OtelJava
import org.typelevel.otel4s.oteljava.context.Context
import org.typelevel.otel4s.oteljava.context.IOLocalContextStorage

object ContextStorageExample extends IOApp.Simple {

Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
org.typelevel.otel4s.oteljava.IOLocalContextStorageProvider
org.typelevel.otel4s.oteljava.context.IOLocalContextStorageProvider
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.typelevel.otel4s.oteljava
package org.typelevel.otel4s.oteljava.context

import cats.effect.IOLocal
import cats.effect.LiftIO
Expand All @@ -25,8 +25,6 @@ import io.opentelemetry.context.{Context => JContext}
import io.opentelemetry.context.ContextStorage
import io.opentelemetry.context.Scope
import org.typelevel.otel4s.context.LocalProvider
import org.typelevel.otel4s.oteljava.context.Context
import org.typelevel.otel4s.oteljava.context.LocalContext

/** A `ContextStorage` backed by an [[cats.effect.IOLocal `IOLocal`]] of a
* [[org.typelevel.otel4s.oteljava.context.Context `Context`]] that also provides [[cats.mtl.Local `Local`]] instances
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
* limitations under the License.
*/

package org.typelevel.otel4s.oteljava
package org.typelevel.otel4s.oteljava.context

import cats.effect.IOLocal
import cats.effect.SyncIO
import cats.syntax.all._
import io.opentelemetry.context.ContextStorage
import io.opentelemetry.context.ContextStorageProvider
import org.typelevel.otel4s.oteljava.context.Context

object IOLocalContextStorageProvider {
private lazy val localContext: IOLocal[Context] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package org.typelevel.otel4s.oteljava
package org.typelevel.otel4s.oteljava.context

import cats.effect.IO
import cats.effect.SyncIO
Expand All @@ -23,8 +23,6 @@ import io.opentelemetry.context.ContextStorage
import munit.CatsEffectSuite
import munit.Location
import org.typelevel.otel4s.context.Key
import org.typelevel.otel4s.oteljava.context.Context
import org.typelevel.otel4s.oteljava.context.LocalContext

import scala.util.Using

Expand Down

0 comments on commit 363d595

Please sign in to comment.