Skip to content

Commit

Permalink
Update zio, zio-stacktracer, zio-test, ... to 2.1.2 (#846)
Browse files Browse the repository at this point in the history
  • Loading branch information
scala-steward authored Jun 5, 2024
1 parent 0f3439c commit e9f343e
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ inThisBuild(
List(
name := "ZIO Telemetry",
organization := "dev.zio",
zioVersion := "2.1.1",
zioVersion := "2.1.2",
homepage := Some(url("https://zio.dev/zio-telemetry/")),
licenses := List("Apache-2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0")),
developers := List(
Expand Down
2 changes: 1 addition & 1 deletion project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ object Dependencies {
val opentelemetry = "1.38.0"
val opencensus = "0.31.1"
val scalaCollectionCompat = "2.12.0"
val zio = "2.1.1"
val zio = "2.1.2"
val zioLogging = "2.1.15"
val izumiReflect = "2.3.9"
}
Expand Down
12 changes: 7 additions & 5 deletions scala-cli/opentelemetry-zio-logging/ZioLoggingApp.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//> using scala "2.13.14"
//> using dep dev.zio::zio:2.1.1
//> using dep dev.zio::zio:2.1.2
//> using dep dev.zio::zio-opentelemetry:3.0.0-RC24
//> using dep dev.zio::zio-opentelemetry-zio-logging:3.0.0-RC24
//> using dep io.opentelemetry:opentelemetry-sdk:1.38.0
Expand Down Expand Up @@ -86,21 +86,23 @@ object ZioLoggingApp extends ZIOAppDefault {
// Setup zio-logging with spanId and traceId labels
val loggingLayer: URLayer[LogFormats, Unit] = ZLayer {
for {
logFormats <- ZIO.service[LogFormats]
format = timestamp.fixed(32) |-| level |-| label("message", quoted(line)) |-| logFormats.spanIdLabel |-| logFormats.traceIdLabel
logFormats <- ZIO.service[LogFormats]
format = timestamp.fixed(32) |-| level |-| label(
"message",
quoted(line)
) |-| logFormats.spanIdLabel |-| logFormats.traceIdLabel
myConsoleLogger = console(format.highlight)
} yield Runtime.removeDefaultLoggers >>> myConsoleLogger
}.flatten


override def run =
ZIO
.serviceWithZIO[Tracing] { tracing =>
val logic = for {
// Read user input
message <- Console.readLine
// Print span and trace ids along with message
_ <- ZIO.logInfo(s"User message: $message")
_ <- ZIO.logInfo(s"User message: $message")
} yield ()

// All log messages produced by `logic` will be correlated with a "root_span" automatically
Expand Down
2 changes: 1 addition & 1 deletion scala-cli/opentelemetry/BaggageApp.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//> using scala "2.13.14"
//> using dep dev.zio::zio:2.1.1
//> using dep dev.zio::zio:2.1.2
//> using dep dev.zio::zio-opentelemetry:3.0.0-RC23

import zio._
Expand Down
2 changes: 1 addition & 1 deletion scala-cli/opentelemetry/LoggingApp.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//> using scala "2.13.14"
//> using dep dev.zio::zio:2.1.1
//> using dep dev.zio::zio:2.1.2
//> using dep dev.zio::zio-opentelemetry:3.0.0-RC23
//> using dep io.opentelemetry:opentelemetry-sdk:1.38.0
//> using dep io.opentelemetry:opentelemetry-sdk-trace:1.38.0
Expand Down
2 changes: 1 addition & 1 deletion scala-cli/opentelemetry/MetricsApp.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//> using scala "2.13.14"
//> using dep dev.zio::zio:2.1.1
//> using dep dev.zio::zio:2.1.2
//> using dep dev.zio::zio-opentelemetry:3.0.0-RC23
//> using dep io.opentelemetry:opentelemetry-sdk:1.38.0
//> using dep io.opentelemetry:opentelemetry-sdk-trace:1.38.0
Expand Down
2 changes: 1 addition & 1 deletion scala-cli/opentelemetry/PropagatingApp.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//> using scala "2.13.14"
//> using dep dev.zio::zio:2.1.1
//> using dep dev.zio::zio:2.1.2
//> using dep dev.zio::zio-opentelemetry:3.0.0-RC23
//> using dep io.opentelemetry:opentelemetry-sdk:1.38.0
//> using dep io.opentelemetry:opentelemetry-sdk-trace:1.38.0
Expand Down
2 changes: 1 addition & 1 deletion scala-cli/opentelemetry/TracingApp.scala
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//> using scala "2.13.14"
//> using dep dev.zio::zio:2.1.1
//> using dep dev.zio::zio:2.1.2
//> using dep dev.zio::zio-opentelemetry:3.0.0-RC23
//> using dep io.opentelemetry:opentelemetry-sdk:1.38.0
//> using dep io.opentelemetry:opentelemetry-sdk-trace:1.38.0
Expand Down

0 comments on commit e9f343e

Please sign in to comment.