Skip to content
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
10 changes: 7 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import _root_.io.getkyo.compat.CompatBackendAxis
import sbt.VirtualAxis

val scaladocTag = Tags.Tag("scaladoc")

val scala3Version = "3.3.8"
val scala3NextVersion = "3.8.4" // Kyo requires Scala 3.8.x (Next)
val scala3NextSuffix = scala3NextVersion.replace('.', '_') // Kyo cells embed the Next Scala version in their project id
Expand Down Expand Up @@ -37,7 +39,8 @@ inThisBuild(
scmInfo := Some(ScmInfo(url("https://github.com/ghostdogpr/sage/"), "scm:git:[email protected]:ghostdogpr/sage.git")),
developers := List(Developer("ghostdogpr", "Pierre Ricadat", "[email protected]", url("https://github.com/ghostdogpr"))),
resolvers += Resolver.sonatypeCentralSnapshots,
compatKyoVersion := kyoVersion
compatKyoVersion := kyoVersion,
concurrentRestrictions += Tags.limit(scaladocTag, 1)
)
)

Expand Down Expand Up @@ -72,7 +75,7 @@ addCommandAlias("exampleKyo", s"examplesKyo$scala3NextSuffix/run")

addCommandAlias(
"docAll",
s"all core/doc clientZio/doc clientCe/doc clientOx/doc clientPekko/doc clientKyo$scala3NextSuffix/doc"
s"all core/doc opentelemetry/doc clientZio/doc clientCe/doc clientOx/doc clientPekko/doc clientKyo$scala3NextSuffix/doc"
)

lazy val root = project
Expand Down Expand Up @@ -248,7 +251,8 @@ lazy val commonSettings = Def.settings(
else base ++ Seq("-Xfatal-warnings", "-Ykind-projector", "-Yfuture-lazy-vals")
},
libraryDependencies += "org.scalameta" %% "munit" % munitVersion % Test,
Test / fork := true
Test / fork := true,
Compile / doc := (Compile / doc).tag(scaladocTag).value
)

// only for container-free cells: integration suites each boot their own container, so running them in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ object OpenTelemetryCommandTracer {
private val ServerPort = AttributeKey.longKey("server.port")

/**
* Builds a tracer from an explicit [[OpenTelemetry]] (the testable form: inject an in-memory SDK), reading the thread-local current context
* Builds a tracer from an explicit `OpenTelemetry` (the testable form: inject an in-memory SDK), reading the thread-local current context
* as each command's parent. `peerService` is the name every Redis node reports as, so a cluster shows as a single dependency; default `redis`.
*/
def apply(openTelemetry: OpenTelemetry, peerService: String = "redis"): CommandTracer =
new OpenTelemetryCommandTracer(openTelemetry.getTracer("sage"), peerService, () => Context.current())

/**
* Builds a tracer from the globally-registered [[OpenTelemetry]] — the zero-configuration form for an APM agent (e.g. the Datadog Java agent
* Builds a tracer from the globally-registered `OpenTelemetry` — the zero-configuration form for an APM agent (e.g. the Datadog Java agent
* with `dd.trace.otel.enabled=true`) that installs itself as the global instance.
*/
def global(peerService: String = "redis"): CommandTracer =
Expand Down