Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oteljava: move IOLocalContextStorage to the context package #879

Merged
merged 1 commit into from
Jan 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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