From ecc02346ea042b840533d430e9907e08b53506b8 Mon Sep 17 00:00:00 2001 From: Maksym Ochenashko Date: Wed, 11 Sep 2024 13:36:04 +0300 Subject: [PATCH] sdk: use `Console[F].errorln` instead of `Console[F].error` --- .../metrics/autoconfigure/MetricReadersAutoConfigure.scala | 2 +- .../otel4s/sdk/trace/processor/BatchSpanProcessor.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/metrics/src/main/scala/org/typelevel/otel4s/sdk/metrics/autoconfigure/MetricReadersAutoConfigure.scala b/sdk/metrics/src/main/scala/org/typelevel/otel4s/sdk/metrics/autoconfigure/MetricReadersAutoConfigure.scala index 64f908ea6..adb1eb995 100644 --- a/sdk/metrics/src/main/scala/org/typelevel/otel4s/sdk/metrics/autoconfigure/MetricReadersAutoConfigure.scala +++ b/sdk/metrics/src/main/scala/org/typelevel/otel4s/sdk/metrics/autoconfigure/MetricReadersAutoConfigure.scala @@ -102,7 +102,7 @@ private final class MetricReadersAutoConfigure[F[_]: Temporal: Console]( Resource .eval( exporters.traverse_ { exporter => - Console[F].error( + Console[F].errorln( s"The pull-based exporter [$exporter] is not supported yet" ) } diff --git a/sdk/trace/src/main/scala/org/typelevel/otel4s/sdk/trace/processor/BatchSpanProcessor.scala b/sdk/trace/src/main/scala/org/typelevel/otel4s/sdk/trace/processor/BatchSpanProcessor.scala index 71709f4ec..58f5e5c3f 100644 --- a/sdk/trace/src/main/scala/org/typelevel/otel4s/sdk/trace/processor/BatchSpanProcessor.scala +++ b/sdk/trace/src/main/scala/org/typelevel/otel4s/sdk/trace/processor/BatchSpanProcessor.scala @@ -172,12 +172,12 @@ final class BatchSpanProcessor[F[_]: Temporal: Console] private ( .exportSpans(batch) .timeoutTo( config.exporterTimeout, - Console[F].error( + Console[F].errorln( s"BatchSpanProcessor: the export attempt has been canceled after [${config.exporterTimeout}]" ) ) .handleErrorWith { e => - Console[F].error( + Console[F].errorln( s"BatchSpanProcessor: the export has failed: ${e.getMessage}\n${e.getStackTrace.mkString("\n")}\n" ) }