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

Update scala-library, scala-reflect to 2.13.13 #523

Merged
merged 2 commits into from
Mar 14, 2024
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 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