Skip to content

Commit

Permalink
Merge pull request #523 from typelevel/update/scala-library-2.13.13
Browse files Browse the repository at this point in the history
Update scala-library, scala-reflect to 2.13.13
  • Loading branch information
iRevive committed Mar 14, 2024
2 parents 8297433 + 64dcea4 commit 558763e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 21 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ lazy val scalaNativeSettings = Def.settings(
)

val Scala212 = "2.12.18"
val Scala213 = "2.13.12"
val Scala213 = "2.13.13"
ThisBuild / crossScalaVersions := Seq(Scala213, "3.3.3")
ThisBuild / scalaVersion := Scala213 // the default Scala

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,19 +139,19 @@ class SpansProtoEncoderSuite extends ScalaCheckSuite {
val attrs = Attributes(Attribute("key", "value"))

val ctx = SpanContext(
ByteVector.fromValidHex("aae6750d58ff8148fa33894599afaaf2"),
ByteVector.fromValidHex("f676d76b0b3d4324"),
TraceFlags.fromByte(1),
TraceState.empty.updated("k", "v").updated("k2", "v2"),
false
traceId = ByteVector.fromValidHex("aae6750d58ff8148fa33894599afaaf2"),
spanId = ByteVector.fromValidHex("f676d76b0b3d4324"),
traceFlags = TraceFlags.fromByte(1),
traceState = TraceState.empty.updated("k", "v").updated("k2", "v2"),
remote = false
)

val ctx2 = SpanContext(
ByteVector.fromValidHex("aae6750d58ff8148fa33894599afaaf2"),
ByteVector.fromValidHex("f676d76b0b3d4324"),
TraceFlags.Default,
TraceState.empty,
false
traceId = ByteVector.fromValidHex("aae6750d58ff8148fa33894599afaaf2"),
spanId = ByteVector.fromValidHex("f676d76b0b3d4324"),
traceFlags = TraceFlags.Default,
traceState = TraceState.empty,
remote = false
)

assertEquals(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,10 @@ class SdkTracerSuite extends BaseTracerSuite[Context, Context.Key] {

def expected(timestamp: FiniteDuration) =
EventData.fromException(
timestamp,
exception,
Attributes.empty,
false
timestamp = timestamp,
exception = exception,
attributes = Attributes.empty,
escaped = false
)

TestControl.executeEmbed {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import scodec.bits.ByteVector
* @see
* [[https://opentelemetry.io/docs/specs/otel/trace/sdk/#parentbased]]
*/
private final case class ParentBasedSampler private (
private[samplers] final case class ParentBasedSampler private (
root: Sampler,
remoteParentSampled: Sampler,
remoteParentNotSampled: Sampler,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,18 @@ object SamplingDecision {

/** The span is not recorded, and all events and attributes will be dropped.
*/
case object Drop extends SamplingDecision(false, false)
case object Drop
extends SamplingDecision(isSampled = false, isRecording = false)

/** The span is recorded, but the Sampled flag will not be set.
*/
case object RecordOnly extends SamplingDecision(false, true)
case object RecordOnly
extends SamplingDecision(isSampled = false, isRecording = true)

/** The span is recorded, and the Sampled flag will be set.
*/
case object RecordAndSample extends SamplingDecision(true, true)
case object RecordAndSample
extends SamplingDecision(isSampled = true, isRecording = true)

implicit val samplingDecisionHash: Hash[SamplingDecision] =
Hash.fromUniversalHashCode
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ class EventDataSuite extends DisciplineSuite {
Attribute("exception.escaped", true)
) |+| attributes

val data = EventData.fromException(ts, exception, attributes, true)
val data =
EventData.fromException(ts, exception, attributes, escaped = true)

assertEquals(data.name, "exception")
assertEquals(data.timestamp, ts)
Expand All @@ -90,7 +91,8 @@ class EventDataSuite extends DisciplineSuite {
Attribute("exception.escaped", false)
) |+| attributes

val data = EventData.fromException(ts, exception, attributes, false)
val data =
EventData.fromException(ts, exception, attributes, escaped = false)

assertEquals(data.name, "exception")
assertEquals(data.timestamp, ts)
Expand Down

0 comments on commit 558763e

Please sign in to comment.