From a8e92aa1b0794752a7f23a8d9da6e283bc8445c2 Mon Sep 17 00:00:00 2001 From: Massimo Siani Date: Sat, 10 Jun 2023 13:00:42 +0200 Subject: [PATCH] improve README --- README.md | 2 +- .../src/main/scala/natchez/akka/http/NatchezAkkaHttp.scala | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dcef3be..6439606 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,6 @@ A tiny integration library for Natchez and Akka Http. -Only a server middleware has been implemented so far. +Examples of usage are given for both the client and the server. A Tapir integration is also shown. Head over the [site](http://massimosiani.github.io/natchez-akka-http/) for further information. diff --git a/natchez-akka-http/src/main/scala/natchez/akka/http/NatchezAkkaHttp.scala b/natchez-akka-http/src/main/scala/natchez/akka/http/NatchezAkkaHttp.scala index 29019de..bd83a93 100644 --- a/natchez-akka-http/src/main/scala/natchez/akka/http/NatchezAkkaHttp.scala +++ b/natchez-akka-http/src/main/scala/natchez/akka/http/NatchezAkkaHttp.scala @@ -103,8 +103,7 @@ object NatchezAkkaHttp { .put(("cancelled", TraceValue.BooleanValue(true)), Tags.error(true)) } - private def addErrorFields[F[_]: Trace](e: Throwable): F[Unit] = - Trace[F].put(Tags.error(true), "error.message" -> e.getMessage()) + private def addErrorFields[F[_]: Trace](e: Throwable): F[Unit] = Trace[F].attachError(e) private def addRequestFields[F[_]: Trace](req: HttpRequest): F[Unit] = Trace[F].put(Tags.http.method(req.method.name), Tags.http.url(req.uri.toString()))